NUKnightLab/sql-mysteries

ERD clarification

karataev opened this issue · 1 comments

First of all, thanks for the great interactive SQL tutorial!

I'm reading the reference and I have a question about the tables connections.

image

Why is there no connection between income ssn and person ssn? I'm new to SQL and can't figure out is it a bug or everything is correct here?

Good eye! That's a "bug" in the database schema. Technically, SSN isn't implemented as a foreign key in "person". Unfortunately, by the time I noticed it, the students who created this had graduated, and I don't have the original tools which generated the "fake" data.

It's probably possible to export the data, recreate the schema correctly, and import the data. Then, the other challenge is updating the actual reference document, because we didn't store an editable version anywhere I can find.

@Joonpark13 do you still have the source document somewhere and if so, can you share it?