finished database model