Added some query methods to Database