Databases: Include a lesson on database structure #28863
DrantDumani
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Back when the NodeJS path used MongoDB, there was no solid or recommended database structure. Now that both paths use Postgresql, I think we should have a lesson that explains one to one, one to many, and many to many relationships.
We currently don't do this, and I've noticed a pitfall where people will use postgres arrays to simulate many to many relationships instead (which is understandable if they were following the MongoDB lessons).
I think we should have a lesson that explains these three relationships, and how one would generally structure SQL tables as far as these relationships are concerned. Such a lesson could begin with a very brief history and the reasoning behind database normalization before delving into the relationships.
Finally, because postgresql does support arrays, we can even offer a small section on when it would be a good idea to use them, such as when users will need to store multiple values that do not form relationships with other tables (such as questions with multiple choice answers
@Asartea , mentioning you here, because you said you had some thoughts on this subject as well.
Beta Was this translation helpful? Give feedback.
All reactions