Finish the class of database model.