- updated AbstractDatabase.java to avoid duplicated code.