Normalization & when to denormalize
Normalization removes redundancy (each fact stored once), preventing update anomalies and saving space. Denormalization deliberately duplicates data to avoid expensive joins on read-heavy paths. Start normalized; denormalize with evidence.
Indexes
An index (usually a B-tree) speeds reads on indexed columns from O(n) to O(log n) but slows writes and costs space. Index the columns you filter/join/sort on; composite index order matters (leftmost-prefix rule). Too many indexes hurt write throughput.
SQL vs NoSQL
Relational DBs give strong consistency, joins, and ACID transactions — ideal for structured, related data. NoSQL (document, key-value, wide-column, graph) trades some of that for flexible schemas and horizontal scale. Choose by access patterns, not hype.