Added Database class with new methods