fixed tables and relationships in db