A database is the organised collection of data. A database management system is the software that stores, protects, and answers questions about it. Almost nobody says this precisely in conversation, and that is usually fine, until you are choosing an engine or working out why a query is slow and the distinction turns out to be the whole point.
Every textbook opens with this definition and then never uses it. So rather than restate the glossary entry, here is what the DBMS actually does for you, and where each of those responsibilities shows up as a decision you have to make.
Table of contents
- What the DBMS is doing while you are not looking
- Where the distinction changes a real decision
- The categories, and which one you probably want
- Managed versus self-run is a DBMS question
- The vocabulary, briefly
- How this fits the rest of the stack
- FAQ
What the DBMS is doing while you are not looking
If a database were just files, reading it would be your job: parsing the format, finding the record, handling two processes writing at once, and recovering when the power goes out mid-write. The DBMS exists so none of that is your job.
The responsibilities it takes on are worth naming individually, because each one becomes visible when it fails.
- Storage and retrieval: deciding how rows sit on disk, and using indexes so a lookup does not scan everything.
- Concurrency: letting many clients read and write at once without producing garbage.
- Durability: guaranteeing that a committed transaction survives a crash, via a write-ahead log.
- Integrity: enforcing constraints, so the database rejects impossible data rather than storing it.
- Access control: users, roles, and permissions on tables and rows.
- Recovery: replaying the log after a crash so the data is consistent when it comes back.
The mental model that helps: the database is the content, the DBMS is the librarian, and SQL is the language you use to ask the librarian for things. You never touch the shelves yourself.
This is why the question is never really which database to use. It is which DBMS, because that choice determines what guarantees you get.
Where the distinction changes a real decision
Three places where confusing the two leads people wrong.
First, sizing. People ask how much RAM their database needs, when the thing consuming RAM is the DBMS: the buffer pool caching hot pages, the per-connection working memory, the sort space. A ten-gigabyte dataset does not need ten gigabytes of RAM, it needs enough for the working set the DBMS keeps hot. Getting this backwards means overpaying, or under-provisioning and blaming the query.
Second, connection limits. A database has no opinion about how many clients touch it. The DBMS very much does, because each connection is a process or thread with memory attached. This is why a serverless application that opens a fresh connection per invocation exhausts a Postgres instance that would happily serve far more traffic through a pool.
Third, performance. A slow query is rarely slow because of the data. It is slow because the DBMS chose a plan you did not expect, usually for want of an index or because its statistics are stale. You debug it by asking the DBMS what it intends to do.
-- Ask for the plan, with real timings, before changing anything.
EXPLAIN ANALYZE
SELECT o.id, o.total
FROM orders o
JOIN customers c ON c.id = o.customer_id
WHERE c.country = 'GB'
AND o.created_at > now() - interval '30 days';
A sequential scan on a large table in that output is your answer. Guessing at query rewrites without reading the plan is how afternoons disappear.
The categories, and which one you probably want
Relational systems store rows in tables with a fixed schema and relate them with keys, offering transactions and joins. Postgres and MySQL are the two that matter for most projects.
Document stores keep semi-structured documents and let the shape vary per record. Key-value stores map keys to values very fast with no query language to speak of. There are also graph, time-series, and columnar systems, each optimised for one access pattern at the expense of the others.
The opinion, plainly: default to a relational database and move away from it only when you can articulate exactly which of its guarantees you are giving up and what you get in return. Most applications are relational, most data has relationships, and a schema that rejects bad data is a feature rather than bureaucracy.
The common failure is choosing a document store to avoid writing migrations, then discovering that the schema still exists, it just lives scattered across application code instead of in one declared place. The flexibility was borrowed, not free.
Between the two mainstream relational options, Postgres has the richer feature set and stricter standards behaviour, MySQL is slightly simpler to operate and ubiquitous in shared hosting. Either is a defensible default and the difference will not be what decides your project.
Managed versus self-run is a DBMS question
Once you see the DBMS as the software rather than the data, the managed-versus-self-hosted question comes into focus. Nobody manages your data for you. What a managed service operates is the DBMS: patching it, configuring it, running backups against it, handling failover, enforcing connection limits.
Self-running means owning that list. It is entirely doable and gives you complete control, and the cost is that backup verification, version upgrades, and the replication setup become recurring items on someone’s plate rather than a checkbox.
RunxBuild offers managed MySQL and Postgres, with connection limits, backups, user management, and private networking handled as part of the instance. That is the DBMS half taken care of; the schema, the queries, and the indexes remain yours, and no service will design those for you.
Worth being explicit about the boundary: a managed DBMS does not make a bad query fast, and it will not tell you the index is missing. It removes the operational work, not the design work.
The vocabulary, briefly
- Database: the organised collection of data itself.
- DBMS: the software that manages storage, access, and integrity for it.
- RDBMS: a DBMS built on the relational model, with tables, keys, and SQL.
- Instance: a running copy of the DBMS, which can host several databases.
- Schema: the declared structure of tables, columns, types, and constraints.
- Transaction: a group of operations that either all apply or none do.
In everyday speech people say database for all of these and are understood. The precision only earns its keep when you are reading documentation, sizing an instance, or explaining to someone why the connection limit is not a bug.
How this fits the rest of the stack
Where this becomes concrete is the plan you pick, because you are paying for the DBMS instance rather than for the data sitting in it. Working out the vCPU and memory the working set needs, alongside whatever service queries it, is a more useful exercise than comparing storage figures. The RunxBuild hosting calculator shows a managed MySQL or Postgres instance beside the service and storage as separate line items.
Useful related references:
- Redis vs DynamoDB: Cache, Database, or Both
- MySQL to MySQL: Migrating a Database Between Servers
- PostgreSQL List Databases: psql \l, pg_database, and pgAdmin
- Databases on RunxBuild
FAQ
What is the difference between a database and a DBMS?
The database is the organised collection of data. The DBMS is the software that stores it, controls access, enforces integrity, and answers queries. You interact with the DBMS, and it manages the database on your behalf.
Is SQL a DBMS?
No. SQL is the query language used to talk to a relational DBMS. MySQL, PostgreSQL, and SQL Server are database management systems that understand SQL, which is why the names cause so much confusion.
What are the main types of DBMS?
Relational systems with tables and SQL, document stores for semi-structured records, key-value stores for fast simple lookups, plus graph, time-series, and columnar systems optimised for particular access patterns. Relational is the right default for most applications.
Do I need a DBMS for a small project?
If more than one process reads and writes the data, or if you need it to survive a crash intact, yes. A file-based DBMS such as SQLite covers small single-writer cases without running a server.
How much memory does a database need?
The DBMS needs enough to keep the frequently accessed portion of the data cached, plus per-connection working memory. That is usually far less than the total dataset size, so size against the working set rather than against storage.