final database model