Speaker context: Students just finished hands-on Redis. Now we shift to MongoDB — flexible schema, rich queries, disk persistence. The key tensions to surface: (1) schema design matters MORE in MongoDB than SQL, not less; (2) embedding vs. referencing is the central decision; (3) CAP theorem becomes concrete here. The $lookup lab task often runs over — have a pre-run version ready to demo. The schema design challenge (Task 4) has no single right answer; grade on justification.
Run this live. Walk through each stage, pausing to explain what the intermediate result looks like. Ask: "What would happen if I moved $match after $group?"
Task 4 has no single right answer. Grade on justification quality. Key discussion point: comments can grow unbounded → reference. Tags can be embedded if count is small (< 20). Author name is often embedded (denormalized) on posts for fast display.