I’m unable to complete my last task (foreign keys must have the same names as what is referenced). Help me please.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:108.0) Gecko/20100101 Firefox/108.0
Challenge: Celestial Bodies Database - Build a Celestial Bodies Database
Link to the challenge:
Do your tables have data? The check won’t pass unless data is added.
this is the fifth table.I’m stuck in the last task.
i was hoping you wouldn’t share images as I can’t directly quote from an image.
Anyway, it seems you have not followed the instruction to make your foreign key columns match the names of the referenced columns.
For eg. I see you have a planet table which has a planet_id
This planet_id is referenced by the star table. But it is not referenced by the column in star table whose name is also planet_id.
I hope you can understand me? The tables should use column names that match the column names of the referenced table’s column.
Unrelated example because I can’t recall the exact details of this challenge right now:
If I have a table of students and a table of courses. The student table’s class_id column is a foreign key that references the course table’s class_id column. Both columns in both tables have the same name.
1 Like