working database model