

- 42, color, red
- 42, size, M
- 42, price, $149.99

- Describe different types of non-relational databases
- Compare relational and non-relational approaches
- Perform and interpret CRUD operations in a NoSQL database (we’ll use MongoDB as a concrete example)

NoSQL databases are not a single technology. They include document stores, key-value stores, wide-column stores, graph databases, time-series databases, and vector databases—each optimized for different workloads and query patterns.

- Store related data together in a single document (typically JSON/BSON).
- Great for objects with many optional or evolving fields because you can add attributes without schema migrations.
- Example document for a MeowTube video (JSON):
dislikes—you can simply insert it into the document without changing a schema or running migrations:
- Think of these as supercharged dictionaries: a unique key maps to a value (often a blob or JSON document).
- Extremely fast for single-key lookups.
- You lose automatic grouping of related data; you must fetch multiple keys and assemble results in the application.
- Rows resemble tables but columns are flexible per row.
- Each row can have variable columns; you design “wide tables” optimized for specific access patterns.
- Excellent for very large datasets and distributed workloads (e.g., regional sales metrics across millions of products).

- Model data as nodes (entities) and edges (relationships).
- Extremely efficient at traversing relationships (e.g., “users who liked videos uploaded by Fluffy”).
- Ideal for social networks, recommendation engines, and fraud detection, where relationship queries are frequent and complex.
- Optimized for timestamped data where “when” is as important as “what”.
- Rather than updating a single record, time-series DBs append new entries with timestamps to build a full history (e.g., daily views for a video).
- Great for monitoring, metrics, analytics, and trend detection.

- Store vectors (lists of numbers) produced by machine learning models that capture semantic meaning.
- Support nearest-neighbor searches to find similar items even when text or IDs don’t match exactly (e.g., “cat skateboard” → “fluffy kitten longboard”).
- Useful for semantic search, recommendations, and AI-driven retrieval.

When to choose what
- Use a relational database when you need transactions and strict schema/enforced integrity.
- Use document stores when your objects are hierarchical, have many optional fields, or the schema evolves quickly.
- Use key-value stores for caches and sessions when you only need single-key access.
- Use wide-column stores for huge, sparse datasets distributed across many machines.
- Use graph databases when relationships are first-class and you need fast traversals.
- Use time-series DBs for metrics and monitoring.
- Use vector DBs for semantic search and AI-driven recommendations.
- MongoDB — document store used in NoSQL examples
- Cloud Computing Fundamentals — upcoming course for scaling patterns and distributed architectures
- Database Design Patterns — background on normalization and trade-offs
Flexible schemas simplify development but don’t eliminate the need for thought: design for your query patterns, enforce constraints where necessary, and keep sensitive data properly separated and secured.