Implement oneObject(), allObjects() in Database, add tests