Update DatabaseManagerAgent.java

Refactor agent;