Added getDatabase() function