A NoSQL database trades relational flexibility for performance characteristics aligned with particular data models and access patterns. Choosing one requires understanding how the application reads and writes data. section 5.4.1
Common NoSQL models optimize different workloads:
- Document databases store variable-structure, JSON-like documents and suit hierarchical data retrieved together. section 5.4.1
- Key-value stores provide extremely fast lookups when the key is known, supporting sessions, caching, and simple retrieval. section 5.4.1
- Wide-column stores distribute data across clusters to sustain massive write volumes, with stricter schema and query constraints. section 5.4.1
Blog posts and comments
Storing a blog post with its comments in one document can avoid joins and retrieve related data quickly. Finding every comment by a particular user becomes expensive because it may require scanning post documents. section 5.4.1










