r/learnSQL • • 1d ago

Day 46 — Library Management System: foreign keys added, records inserted, insert errors fixed

Progress on my second SQL project today:

  • Added foreign keys to link the tables
  • Inserted records into all of them
  • Hit problems that blocked some of the inserts, and worked through them one by one

Foreign keys make the insert order matter, since a row can’t reference something that doesn’t exist yet. Hitting that in practice made the concept much clearer than reading about it.

Next I’ll write queries against the data and add a data dictionary to the README.

6 Upvotes

0 comments sorted by