
Ask HN: Best resources on database design - toutouast
what are the best resources on database design for hackers?
======
mamcx
Start reading about the relational model.

Then read about normalization and denormalization of tables.

You must take on mind this: _MODEL_. Is just a way to MODEL _data_. SQL is
just a specific language for interact with RDBMS, and them constrain how
express the MODEL similar how C++ is not the best way to express the OO MODEL
but that is what you get when pick a specific implementation.

The key here is how organize data. The best designs on databases are just
well-modeled data, and understand that queries that are costly benefit from
using indexes OR (sometimes forgotten!) remodel the tables (or add more tables
with a different projection of it).

With this idea firm on mind, you can use any RDBMS in the world and be _very
good_.

You need to spice all this with the knowledge on how use a RDBMS for full
effect, so you not get the idea that is "wrong" to use views or stored
procedures or any of the tools are you disposal, similar you will use all the
power you can get from C++ or Python or whatever. But at the end of the day,
is just data organized in tables and how relate all of this.

P.D: And use Postgress for study all of this (and using on production too!).
Why? because PG is the one closer to implement the SQL standard, is solid and
have a very good tooling and implementation. Any other could work but after
using more than a dozen I think PG is the best overall pick for this...

------
lazylester
I got a lot out of Jennifer Widom's "Introduction to Databases" MOOC from
Stanford. Particularly the normalization concepts. (Don't take them too far,
though, as they say "Normalize until it hurts, denormalize until it works"!)

------
petercooper
"Best" is tricky, but Vertabelo have been doing practical data model design
walkthroughs for various scenarios over the past year or two:
[http://www.vertabelo.com/blog](http://www.vertabelo.com/blog) .. things as
diverse as data models for a 3D chess set, parking system, pet care company,
office leasing, etc.

------
mynegation
Because I like to learn by example:
[http://www.databaseanswers.org/data_models/index.htm](http://www.databaseanswers.org/data_models/index.htm)
If you meant NoSql but even if you did not:
[https://highlyscalable.wordpress.com/2012/03/01/nosql-
data-m...](https://highlyscalable.wordpress.com/2012/03/01/nosql-data-
modeling-techniques/)

------
dlahoda
[http://agiledata.org/](http://agiledata.org/)

[https://developers.redhat.com/promotions/migrating-to-
micros...](https://developers.redhat.com/promotions/migrating-to-microservice-
databases/)

------
laci27
If you work with mySQL, follow Percona's blog. It's full of awesome stuff.

------
ebbv
Could you be a bit more clear in the question? Do you want to know how to
actually write a database system? Or how to design a good schema? Or how to
write classes that implement a schema for you using a framework? Or something
else?

In any case there are books on these topics. And there’s open source software
that probably does something similar or close to what you want to do. Look at
its code and learn from it.

~~~
toutouast
This is real? That is how you learned your operating system too? By looking at
its source code?

