New ORM version of database class