Hi, everyone! Hope everyone is well. I am new to the community! I am currently in search of some sound resources on database design and data modeling. It would be nice to find some sources that include both theory and a couple of case studies showcasing the implementation of good data modeling design practices/patterns. Anything helps! Thanks in advance!
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
Hello! Welcome to Dev, it's great to have you here.
There are lots of resources here on Dev for you to get started with:
Excellent series from Adam
Effective Database Design: Part 1
Adam McNeilly ・ Dec 3 '18 ・ 3 min read
Post from Josh
Beginners Database Design Primer
Josh Ghent ・ Mar 15 '18 ・ 5 min read
Post from me about Entity Diagrams
Entity Relationship Diagrams explained by Sonic the Hedgehog
Helen Anderson ・ May 20 '19 ・ 2 min read
I also like this comment from Yaser
I searched and read through tons of resources and heck when I was learning db design (and I still), I found that most of them are just useless.
The main reasons for the sissy resources existence are:
After reading the book, you will end up saying:
After years of trial and error in backend field, I can say that db design is something you learn over time.
But, there are many stuff that I can say that are the "super fundamentals" (in no order... If you have any others, plz lemme know 😉):
That being said if I told you we need to design an app that keeps the names of the books which the users read (given that you have a Book and User table), you should know which relationship it is directly.
Never jump to NoSQL without playing with relational database for long so that you have a solid understanding of relational first.
Make the db works for you... Not the opposite.
Before you do any design, start with collecting the info of what your app is capable to do (business capabilities).
This will help you to make the db works for you cuz you made the design based on what you need.
I've seen many many people doing super complex queries, cuz they designed the db just to hold the info without having in mind how they will use the info and compose it into the UI.
Never design to solve future problems. Your design should focus on solving the current problems with taking consideration into the future problems (so that you will adapt with no pain).
Never do the db design before having a wireframe (or preferably a mockup) for your app...
I believe best db/architecture designs are just result of a great UI.
Besides that, you will know what API you need by merely looking at the UI.
Don't spend too much time reading theory, doing actual db design 10 times is better than reading 10 books about design.
Master the mighty skill in db design: Normalization.
Think OOP (opinionated one).
The more you think about classes and objects, the better.
This is cuz nowadays, every famous framework has an ORM that comes with it.
So, instead of thinking about diagrams and such, think (more) about the relationships among the objects.
That covers the ACID vs BASE.
And, it also covers the 4 main types of NoSQL: key-value, document, column-based, graph.
Understand the use cases of each, and ask yourself questions like: why most systems are currently using relational and not NoSQL?
Thanks man