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

Adding a discussion about primary and foreign keys #342

Open
bjbecerra opened this issue Oct 4, 2022 · 2 comments
Open

Adding a discussion about primary and foreign keys #342

bjbecerra opened this issue Oct 4, 2022 · 2 comments
Labels
good first issue Good issue for first-time contributors type:enhancement Propose enhancement to the lesson

Comments

@bjbecerra
Copy link

Hi! I wanted to make a suggestion for the https://datacarpentry.org/sql-ecology-lesson/03-sql-joins/index.html Combining Data with Joins episode. In the first part of this lesson https://datacarpentry.org/sql-ecology-lesson/00-sql-introduction/index.html , there is some mention of primary and foreign keys as necessary in relational databases. However, in the episode that is actually doing JOINs on tables, the word "key" doesn't appear even once. I think it'd be a good addition to bring back that concept that was introduced in the beginning of the lesson, and then stress the importance of joining on keys. It could further explain the importance of a relational database to the learner as well. Thanks to all who contribute and maintain this lesson :)

@jd-foster
Copy link
Contributor

Hi and thanks for the suggestion. You make a good point, and reading through it again I see that the concept requiring unique keys for doing a JOIN is made implicitly by using "ID" columns (species_id, plot_id).
A paragraph of non-implicit explanation would be welcome.

@jd-foster jd-foster added type:enhancement Propose enhancement to the lesson good first issue Good issue for first-time contributors labels Oct 7, 2022
@mostafizur67
Copy link

Hi,

I also agree that we need to discuss about Key, Primary Key, and Foreign Key. In addition, we can also give them a short explanation from the existing example we already have in the lesson, like

surveys.species_id = species.species_id;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good issue for first-time contributors type:enhancement Propose enhancement to the lesson
Projects
None yet
Development

No branches or pull requests

3 participants