Where Databases Run
For eight and a half chapters, "the database" has floated placeless — a guardian, a schema, an answerer of queries, located nowhere in particular. But the Marquee's database is a program, and programs run on actual machines. Where? The modern menu has three honest entries: a machine you run yourself, a machine you rent, or a managed service, where a provider runs the database engine and you bring the schema and the SQL.
One page of geography, then. A useful way to hold the menu while we walk it: cooking at home, cooking in a rented kitchen, or hiring a caterer. In all three, the recipe is yours — and in all three placements below, the schema, the queries, the indexes, and the permissions are yours. What varies is who owns the stove and who scrubs the ovens. Keep that, and the rest of the page is details.
A Machine You Run
The original arrangement: the Marquee buys a computer (or repurposes one in the back office), installs PostgreSQL on it, and runs it. Full control — every setting, every version, every byte on the disk is Lora's to command. And full responsibility: installing, upgrading, applying security patches, replacing the disk that will eventually fail, keeping Chapter 7's backups actually running, and answering the 3 a.m. call when the machine goes quiet on a holiday weekend.
Honesty requires saying: for a small team, this arrangement is increasingly a deliberate niche rather than the default. It still makes sense when data legally must stay in the building, or when a team has the skills and wants the control. But "we run our own database server" is now a choice one justifies, not the assumption it was for decades.
A Machine You Rent
The halfway house, named for completeness. Cloud providers rent out computers by the hour; you can rent one, install PostgreSQL on it yourself, and run it exactly as if it sat in the back office. Someone else owns the hardware and replaces the failed disks — everything else, from patches to backups to the 3 a.m. call, is still yours. Same recipe, same scrubbing, rented kitchen.
Managed Databases
The third entry is where most new projects land. A managed database means the provider runs the engine as a service: they install it, patch it, take the backups, stand ready to scale it up, and hand you what a database ultimately is to an application anyway — a connection string. You will see the names in any job listing: Amazon RDS, Google Cloud SQL, Azure SQL Database. Treat those as sightings, not subjects; how clouds price and operate such things belongs to our Cloud from Zero course, and this book needs only the concept.
Here is the fact that makes this page reassuring rather than daunting. Managed engines are the same engines: RDS Postgres is PostgreSQL, rented by the month. Compare what the Marquee's connection looks like against a database on Lora's own machine and against a managed one:
postgresql://marquee_site:••••••••@localhost:5432/marquee postgresql://marquee_site:••••••••@marquee-db.abc123xyz.eu-west-1.rds.amazonaws.com:5432/marquee
One field changed — the address. The account, the schema behind it, the SQL you would send, the GRANTs from the last page: identical. Everything this book taught remains exactly your job in a managed database, because the provider runs the engine, not your data model. They will keep the server alive; they will never tell you your bookings table needs a UNIQUE constraint, or that your slow query wants an index. And Chapter 7's backup questions — how often, restore-tested when? — remain yours to ask, even when the answers come from a provider's brochure.
SQLite, the Un-Server
One placement remains, and it breaks the frame on purpose. SQLite — an engine you met in Chapter 1's landscape — is not a server at all. It is a library that lives inside an application, reading and writing the entire database as a single ordinary file. No installation, no connection string, no account dialing in; the app opens its file and speaks SQL to it directly. That "is a library" trick is why SQLite runs on every phone on Earth — your messages, photos metadata, and browser history almost certainly sit in SQLite files right now — which should retire any suspicion that a serverless database is a toy. It is, by installed count, the most deployed database in existence.
SQLite matters to you personally for one more reason: because there is nothing to set up, it is the likely engine of your first hands-on practice after this book. Open a file, CREATE TABLE, and every query from Chapters 3 through 5 just works. The recipe, once again, travels with you — which is really this page's only lesson, told four ways.
- "Managed means the provider designs my database." They run the engine — patches, backups, scaling. Schema, queries, indexes, permissions: everything this book taught remains exactly your job, and no provider will notice your missing constraint for you.
- "Cloud databases speak a different SQL." Same engines, rented: RDS Postgres is PostgreSQL. The connection string changes; the knowledge doesn't move an inch.
- "SQLite is a toy." It's the most deployed database in existence — every phone and every browser ships it. Having no server makes it small-setup, not small-league; where it genuinely fits and doesn't is a Chapter 11 conversation.
- "With a managed service, backups are no longer my concern." The provider takes them, but Chapter 7's questions stay yours to ask: how often, kept how long, and restore-tested when? "The provider handles it" is an answer only after you've read what they actually promise.
- "Who scrubs the ovens" is the actual decision small teams face when a project starts, and you can now hold that conversation without cloud folklore.
- Realizing the skill set is placement-independent is this course's portability guarantee: schema, SQL, indexes, and permissions travel unchanged from a laptop file to a managed cloud engine.
Knowledge Check
The Marquee moves its database to a managed service. Which of these stops being Lora's team's job?
- Designing the schema and all of its many constraints
- Installing and patching the database engine
- Choosing which columns to index
- Granting each account its permissions
The Marquee's app moves from a local database to a cloud one. What changes in the connection string?
- The address it dials — the rest stays the same
- The SQL dialect, since cloud engines speak differently
- The account name, which the provider assigns
- Everything — a cloud connection string is a different format entirely
What makes SQLite different from the other placements on this page?
- It uses its own query language instead of SQL
- It's the only engine here that costs money
- There's no server — it's a library reading one file inside the app
- It can only ever be used by professional mobile application developers
A teammate says: "We're on a managed database now, so backups aren't our problem." What's the honest reply?
- Managed services don't actually take any backups
- Then we should probably just go back to running our own physical machine ourselves
- Backups only matter for the bookings table anyway
- The provider takes them — but how often, and restore-tested when, is ours to ask
You got correct