database, foreign keys fixed