Start reading about the relational model.<p>Then read about normalization and denormalization of tables.<p>You must take on mind this: <i>MODEL</i>. Is just a way to MODEL <i>data</i>. 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.<p>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).<p>With this idea firm on mind, you can use any RDBMS in the world and be <i>very good</i>.<p>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>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...
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"!)
"Best" is tricky, but Vertabelo have been doing practical data model design walkthroughs for various scenarios over the past year or two: <a href="http://www.vertabelo.com/blog" rel="nofollow">http://www.vertabelo.com/blog</a> .. things as diverse as data models for a 3D chess set, parking system, pet care company, office leasing, etc.
Because I like to learn by example: <a href="http://www.databaseanswers.org/data_models/index.htm" rel="nofollow">http://www.databaseanswers.org/data_models/index.htm</a>
If you meant NoSql but even if you did not: <a href="https://highlyscalable.wordpress.com/2012/03/01/nosql-data-modeling-techniques/" rel="nofollow">https://highlyscalable.wordpress.com/2012/03/01/nosql-data-m...</a>
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?<p>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.