Real-World Comparisons

6.Same Problem, Different Databases

M

In this chapter

We'll meet ten real-world database comparison pairs and see that each resolves the same way — not with a universal winner, but by naming the real workload's requirements first.

10–12 min

The Problem in Real Life

Sarah steps back from GreenMart's own fleet-and-order requirement for a moment. The reasoning she just walked through isn't specific to this one decision — it's the same reasoning behind every real database choice, anywhere.

She sketches a wider table on the whiteboard: not just GreenMart's own problem, but ten real, common ones — the same kind of "which one do I use" question, asked by real teams, over and over.

S

This isn't just our decision. It's the same decision, over and over, everywhere.

Sarah

The Same Question, Asked Ten Different Ways

No pair has a universal winner

Every comparison in this chapter resolves differently depending on the real, specific workload asking the question.

Ten pairs, one repeated pattern

Each comparison is really the same workload-analysis question this Act has already taught, asked about a different pair of technologies.

Real-World Comparisons

Every one of these ten pairs is really the same question this whole Act has been teaching: what does the real workload need, and which side of the pair actually gives it that? None of them have one universally correct answer — each depends on the exact requirements the last five chapters taught how to name.

  • MongoDB vs. DynamoDB — both are real, capable NoSQL databases, and the honest difference isn't "NoSQL vs. NoSQL," it's flexibility vs. scale ceiling. MongoDB's document model (Act 2) tolerates evolving, moderately-varied shapes gracefully; DynamoDB (Act 4) is built for a stricter access-pattern discipline in exchange for a genuinely higher, more predictable scale ceiling. A catalog that changes shape often leans MongoDB; a fleet of vehicles at massive, predictable scale leans DynamoDB — GreenMart's own real choice, from the chapters just covered.
  • Cassandra vs. DynamoDB — both scale to enormous write volume, and the real difference is who runs it and how the ring is controlled. Cassandra (Act 5) is commonly self-managed, giving GreenMart direct control over the ring and consistency levels at the cost of real operational work; DynamoDB is fully managed, trading some of that control for far less day-to-day operational burden — exactly the managed-vs-self-managed question from two chapters ago.
  • Elasticsearch vs. a database's own search — a database query answers "does this row match," exactly; Elasticsearch (Act 7) answers "which results are most relevant," approximately and ranked. A user typing a slightly misspelled product name needs Elasticsearch's fuzzy, ranked matching; an internal report pulling exact records by ID needs nothing more than the database it already lives in.
  • One database vs. multiple databases — the polyglot-persistence question from the previous chapter, restated as its own real comparison: sometimes the honest answer to "which database" is "more than one," each doing the one job it's actually strong at, accepted as real, deliberate operational complexity rather than avoided out of a false sense of simplicity.
Table — Ten Real Comparisons, One Repeated Question
ComparisonThe Real Question Being AskedLeans Toward the First Option When...
PostgreSQL vs. MongoDBFixed, well-understood schema vs. evolving, flexible shapeThe data's shape is stable and relationships matter more than flexibility
MongoDB vs. DynamoDBSchema flexibility vs. a higher, stricter-discipline scale ceilingThe catalog's shape changes often and scale stays moderate
Redis vs. a general-purpose databaseSub-millisecond in-memory speed vs. being the durable source of truthThe data is disposable, or backed by a real database elsewhere
Cassandra vs. DynamoDBSelf-managed ring control vs. fully managed operational simplicityThe team wants direct control over consistency levels and topology
Neo4j vs. PostgreSQLDeep, multi-hop relationship traversal vs. a handful of simple joinsThe real question is about paths and connections, several hops deep
Elasticsearch vs. a database's own searchRanked, fuzzy relevance vs. exact-match lookupUsers type real, imperfect search terms expecting ranked results
Time-series DB vs. PostgreSQLHigh-frequency writes with time-based rollups vs. general-purpose storageData arrives constantly, timestamped, and gets downsampled over time
Vector DB vs. PostgreSQL + pgvectorA dedicated engine at real embedding scale vs. a bolt-on for smaller scaleSemantic search is a core, high-volume feature, not an occasional one
Firestore vs. a traditional backendBuilt-in real-time sync vs. building that sync by handMultiple clients need to see the same live data update instantly
One database vs. multiple databasesOne tool stretched across two shapes vs. two tools, each doing one jobThe workload is genuinely two different shapes wearing one name

None of these ten rows has a single right answer written in stone — each one resolves the same way GreenMart's own fleet-and-order requirement just did: by naming the real workload first, then choosing the side that actually fits it.

The remaining six pairs follow the exact same pattern — a real trade-off, not a universal winner, resolved by the same workload-analysis questions this Act has already taught.

Key Takeaway

Ten different comparisons, one repeated lesson: there's no universal "better" database in any of these pairs — only a better fit for a specific, honestly-named workload, the exact skill the last five chapters just practiced.

Why This Matters

Recognizing that GreenMart's own fleet-and-order decision is really the same shape of question as "MongoDB or DynamoDB" or "one database or several" is what turns this course's thirteen separate Acts into one transferable skill, usable on the next decision this course never specifically covered.

GreenMart now has ten real, common comparisons to recognize the next time a similar choice comes up — each resolved the same way, by the workload's own real requirements. The next chapter turns all of this into one repeatable framework, applied live to GreenMart's own fleet-and-order requirement, start to finish.

Next