The Database Landscape
One honest warning before the course settles in: "database" is a wider word than the last two pages let on. It covers several genuinely different families of tools, the way "vehicle" covers bicycles and freight trains — all of them move things, and picking one before you know the cargo is how projects go wrong. This page draws the whole map once, so you always know where you are and never mistake the chapter for the whole world.
Here is the honest shape of it: one family — relational databases — sits at the center of this book and of most of the working world. The others, gathered loosely under the name NoSQL, each solve a specific problem the relational family handles less gracefully. They get their own honest tour in Chapter 10. Today you just need the map.
Relational: the Center of the Map
Relational databases keep data in tables — the films, screenings, customers, and bookings from the last page will each become one — with declared relationships between them: the pointing you just met, made precise. You talk to them in SQL. PostgreSQL, MySQL, and SQLite are all relational engines, and when someone says "the database" at work with no other context, this family is almost always what they mean.
This is the family the next eight chapters teach, and the reason is not tradition. Its core ideas — structure declared up front, rules the database itself enforces, changes that happen completely or not at all — are the vocabulary in which all database conversations are conducted, including the NoSQL ones. Even a pitch for a document database is an argument about what to trade away from the relational baseline. Learn the baseline first and every other family becomes legible.
The NoSQL Families, in One Sentence Each
Four families, four shapes of data they love. Document databases (MongoDB is the household name) store each record as a self-contained nested document — wonderful when records vary in shape. Key-value stores (Redis) do one thing at lightning speed: hand back a value when given its name — the engine behind the caches that make busy websites feel instant.
Search engines (Elasticsearch) make text genuinely findable — typo-tolerant, ranked by relevance — which ordinary databases only pretend to do. And graph databases (Neo4j) store connections as first-class things, for questions like "friends of friends of friends" where the relationships are the data. Chapter 10 gives each family a fair portrait, including what each one gives up — because every one of them gives up something.
Why Relational First Is Not Nostalgia
It would be easy to assume the order of this book is historical — relational is older, so it goes first. The real reason is practical. The relational family fits the widest range of jobs, keeps the most doors open, and fails the most gracefully when your plans change. The Marquee's booking data — structured, interconnected, and unforgiving of errors — is exactly the data it was built for, and most business data looks like the Marquee's.
So this book hands you a rule of thumb to carry, and you should hold it as a starting point rather than a law: relational by default; something else when a specific reason says so. Real reasons exist — Chapter 10 names them honestly, and Chapter 11 builds the full decision framework. What the rule protects you from is the other thing: choosing a database the way people choose sneakers, by what's fashionable this season.
- "NoSQL is the modern replacement for SQL." The NoSQL families solve specific problems — varying shapes, raw lookup speed, text search, deep connections. The relational family didn't get replaced; it stayed the default while specialists grew around it.
- "I have to pick a side." Real systems routinely run one relational database and a cache and a search engine, each doing its job. Chapter 10 ends with the Marquee doing exactly that. Loyalty is for sports teams.
- "Relational databases can't handle modern scale." Some of the biggest products on the internet run on relational cores. Scale arguments are real but specific — Chapter 10 states them honestly — and they are about architecture, not family fashion.
- "NoSQL means SQL is forbidden." The name is best read as "not only SQL". Several NoSQL systems have grown SQL-like query languages, and the analytics world (Chapter 11) speaks SQL over entirely different machinery.
- The map prevents the two beginner failure modes at once: never hearing of anything beyond tables, and chasing whichever database is loudest on social media this year.
- "Relational by default, something else for a specific reason" is the single most useful engineering prior a newcomer can carry — it turns database marketing into a question you know how to ask.
Knowledge Check
Which data does each NoSQL family love? Match the job to the family: "hand back a value instantly when given its name."
- Document databases
- Key-value stores
- Search engines
- Graph databases
Why does this book teach the relational family first?
- Because it's the oldest family, and history should come first
- Its ideas are the vocabulary every database conversation uses, NoSQL included
- Because the NoSQL families aren't serious enough for production use
- Because relational databases are simply the right choice in every possible situation
What does the rule of thumb "relational by default" actually say?
- Always use a relational database, whatever the project
- Use whichever database is newest right now, since older defaults are always going stale
- Start with relational; choose something else when a specific reason justifies it
- Avoid NoSQL databases until they mature
A team says: "we run Postgres for orders, Redis as a cache, and Elasticsearch for product search." What is this an example of?
- A team that couldn't decide on a database
- The normal mature setup: a relational core with specialists on their jobs
- Wasteful over-engineering that should be one database
- Proof that the team is steadily moving away from relational databases for good
You got correct