Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERD clarification #9

Open
karataev opened this issue Oct 27, 2019 · 1 comment
Open

ERD clarification #9

karataev opened this issue Oct 27, 2019 · 1 comment

Comments

@karataev
Copy link

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?

@JoeGermuska
Copy link
Member

JoeGermuska commented Oct 28, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants