Learn Database design
Model data, choose keys and indexes, and reason about transactions and scale
Database design is the craft of turning a problem domain into tables, keys, constraints and indexes that stay correct and fast as data grows. It also covers how databases keep data safe under concurrency (transactions, isolation, MVCC) and how systems scale out with replication and sharding. These ideas apply to every relational database and shape when a NoSQL store is the better fit.
Before you start
How deep do you want to go?
1. EssentialsRead and write simple code, do the everyday basics
2. PracticalUse it productively at work, with the usual idioms
3. AdvancedThe less common features, performance and trade-offs
4. ExpertInternals and the edge cases experts know