merged database classes and completed Database.java methods