Added foreign keys to tables.