Tightened up the database model