updated Database.cpp