Every order, payment, booking and login ends up in a database, and the software that keeps that data correct, fast and safe is the database management system. This guide explains what a DBMS is, what happens inside one when you run a query, its main components, the types of DBMS and when to use each, and how to choose one in 2026.

What is a database management system?

A database management system (DBMS) is software that stores data and lets applications and people define, read, change and control it, while guaranteeing that the data stays consistent, survives crashes and can be used by many users at the same time. PostgreSQL, Oracle Database, MySQL, Microsoft SQL Server and MongoDB are all DBMSs.

Without a DBMS, every application would have to solve the same hard problems on its own: file formats, indexes, concurrent writes, crash recovery, access control and backups. A DBMS solves them once, so applications can focus on business logic.

Database vs DBMS

The database is the organized data itself: the tables, documents or records. The DBMS is the software that manages it. People often say “database” for both, as in “we use a Postgres database”, but the distinction matters when you talk about licensing, performance or migration: you can move a database from one DBMS to another, with effort.

DBMS vs RDBMS

A relational DBMS (RDBMS) is a DBMS built on the relational model: data in tables of rows and columns, linked by keys and queried with SQL. The model comes from Edgar F. Codd’s 1970 paper “A Relational Model of Data for Large Shared Data Banks”. Most DBMSs in use today are relational, but many are not, as the types section below shows.

A short history

  • 1960s: navigational databases. Hierarchical and network systems such as IBM IMS stored records linked by pointers. Programs had to know the exact path to the data.
  • 1970s and 1980s: relational databases. Codd’s model separated what data you want from how it is stored. SQL became the standard language, and Oracle, IBM Db2 and later SQL Server took over business computing.
  • 1990s: open source. MySQL and PostgreSQL made relational databases free to use and powered the early web.
  • 2000s and 2010s: NoSQL and big data. Web-scale companies built document, key-value, wide-column and graph databases to scale out across many servers, often trading strict consistency for availability.
  • 2020s: cloud, distributed SQL and AI. Managed cloud databases, distributed SQL systems that scale out while keeping transactions, and vector search for AI applications, increasingly built into general-purpose databases.

How a DBMS works

When an application sends a query, the DBMS does far more than look up a file. Here is the path of a single SQL query:

How a database management system runs a query. An application sends SQL through a connection. 1, the parser checks the syntax and turns the text into a tree; 2, the optimizer uses the catalog and statistics to pick the cheapest execution plan, for example an index scan instead of reading the whole table; 3, the executor runs the plan and asks the storage engine for rows; 4, the buffer pool serves pages from memory and reads missing pages from disk. On the side, the transaction manager uses locks or multiversion concurrency control to isolate concurrent transactions, and the log manager writes every change to the write-ahead log on disk before it is committed, so the database can recover after a crash. The result rows travel back to the application.WHAT HAPPENS WHEN YOU RUN A QUERYApplicationSELECT … WHERE id = 42DATABASE MANAGEMENT SYSTEM1 ParserChecks syntax, builds a query tree2 OptimizerPicks the cheapest plan3 ExecutorRuns joins, filters, sorts4 Buffer poolServes pages from memoryCatalogTables, indexes, statisticsTransaction managerLocks or MVCC, isolationLog managerWrite-ahead log, recoveryDiskData files and indexesLog files, written first
The main stages of query processing, and the components that keep data consistent and recoverable alongside them.
  • Parsing. The parser checks the SQL syntax and turns the text into a tree, then checks against the catalog that the tables and columns exist and the user may access them.
  • Optimization. There are usually many ways to run a query: which index to use, which table to read first, which join algorithm to pick. The optimizer estimates the cost of each plan from statistics about the data and chooses the cheapest. This is why the same query can be fast one day and slow the next if statistics go stale.
  • Execution. The executor runs the plan step by step: scans, index lookups, joins, filters, sorts and aggregates.
  • Buffer management. Data lives on disk in fixed-size pages. The buffer pool keeps frequently used pages in memory, so most reads never touch the disk. Sizing it well is one of the biggest performance levers.
  • Logging and recovery. Before a change is considered committed, it is written to the write-ahead log. After a crash, the DBMS replays the log to restore every committed transaction and undo unfinished ones. The same log feeds replication to standby servers.

Transactions and ACID

A transaction groups several operations so they succeed or fail as one. The classic example is a money transfer:

BEGIN;
UPDATE accounts SET balance = balance - 100 WHERE id = 1;
UPDATE accounts SET balance = balance + 100 WHERE id = 2;
COMMIT;   -- both changes become visible together, or neither does

Transactional databases guarantee four properties, known as ACID:

PropertyMeaningHow the DBMS delivers it
AtomicityAll changes in a transaction happen, or none doUndo information and the log
ConsistencyData always moves from one valid state to anotherConstraints, keys, triggers
IsolationConcurrent transactions do not see each other’s half-finished workLocks or multiversion concurrency control (MVCC)
DurabilityCommitted data survives crashes and power lossWrite-ahead log flushed to disk

Most modern relational databases use MVCC: each transaction sees a consistent snapshot of the data, so readers do not block writers. Isolation levels, from read committed to serializable, let you trade strictness for throughput. Distributed databases face an extra trade-off: when the network between servers fails, a system must choose between staying available and staying consistent, which is why many NoSQL systems offer tunable or eventual consistency.

Components of a DBMS

Every DBMS is organized differently, but most share these building blocks:

  • Query language interface: accepts SQL or another query language over a network protocol or driver, such as JDBC in Java.
  • Parser: checks syntax and permissions and builds the internal representation of the query.
  • Query optimizer: chooses the cheapest execution plan based on statistics and indexes.
  • Execution engine: runs the plan and produces the result.
  • Storage engine: organizes data on disk in pages, files and indexes such as B-trees or LSM-trees. Some DBMSs, MySQL for example, let you choose between storage engines.
  • Buffer manager: caches pages in memory and decides which to evict.
  • Transaction manager: starts, commits and rolls back transactions and enforces isolation.
  • Lock manager or MVCC mechanism: coordinates concurrent access to the same data.
  • Log and recovery manager: writes the write-ahead log and restores the database after failures.
  • Metadata catalog (data dictionary): describes every table, column, index, user and statistic.
  • Security and access control: users, roles, privileges, encryption and auditing.
  • Replication and backup tools: copy data to standby servers and take consistent backups for disaster recovery.

Database languages

SQL commands are grouped into four families by what they do:

LanguagePurposeTypical commands
DDL: data definitionDefine and change the structureCREATE, ALTER, DROP
DML: data manipulationRead and change the dataSELECT, INSERT, UPDATE, DELETE
DCL: data controlGrant and revoke accessGRANT, REVOKE
TCL: transaction controlGroup changes into transactionsBEGIN, COMMIT, ROLLBACK

Types of database management systems

DBMSs differ above all in their data model: the shape in which they store data and the kinds of questions they answer quickly.

Six common data models, each holding the same customer in a different shape. Relational: rows and columns in tables linked by keys. Document: one JSON document per customer with nested orders. Key-value: a key such as customer:42 pointing to a value the database does not look inside. Wide column: rows with flexible columns grouped into column families, spread across many servers. Graph: nodes for the customer and products, with edges such as BOUGHT between them. Vector: the customer or a text turned into a list of numbers, an embedding, so that similar items can be found by distance.SAME CUSTOMER, SIX DATA MODELSRelationalTables, rows, keysidnamecity42Anna K.Gdańsk43Ben O.Leeds44Chen L.LyonDocumentJSON documents{ "id": 42, "name": "Anna K.", "orders": [ { "sku": "A1" } ]}Key-valueKey → opaque valuecustomer:42cart:42session:9fWide columnColumn families, shardedr1r2r3GraphNodes and edgesBOUGHTAnnaShoesBagVectorEmbeddings, similarity“red running shoes”→ [0.12, −0.48, 0.91, …]
The same data in six models. The right one depends on how the data is read and written, not on fashion.

Relational DBMS

The relational model is by far the most widely used. Relational systems account for about 71% of all database popularity tracked by DB-Engines, and the four most popular DBMSs are all relational (DB-Engines). Fifty years after Codd’s paper, it is still the default choice for business software.

A relational database stores data in tables. Each row is one record, such as a customer or an order, and each column holds one attribute with a defined data type. A primary key identifies every row, and foreign keys link rows across tables: an order row points to its customer. The schema, the definition of tables, columns, types and constraints, is set up front, so the database itself rejects data that breaks the rules, such as an order for a customer who does not exist.

Data is queried with SQL, a declarative language: you describe the result you want and the optimizer decides how to get it. Joins combine tables at query time, so each fact is stored only once. Designers use normalization to split data into tables that avoid duplication, and indexes to keep lookups fast. Together with full ACID transactions, this makes relational databases the safest home for data where correctness matters.

  • Strengths: strong consistency and transactions, data integrity enforced by the database, flexible ad hoc queries and reporting, a mature ecosystem of tools and decades of operational know-how.
  • Limits: schema changes need migrations, scaling writes beyond one server takes partitioning or a distributed SQL system, and deeply nested or highly connected data can be awkward to model.
  • Typical uses: orders, accounts, payments, bookings, inventory, ERP and CRM systems, and most back ends of web applications.
  • Examples: PostgreSQL, Oracle Database, Microsoft SQL Server, MySQL, MariaDB, IBM Db2, SQLite.

Modern relational databases have also absorbed many ideas from NoSQL: PostgreSQL, Oracle and SQL Server store and index JSON documents, spatial data and vectors alongside ordinary tables. Spatial data is what map and GIS applications run on; our overview of GIS software and Google Maps alternatives covers that side.

Document databases

Store data as JSON-like documents, each of which can have its own structure. Good when records are naturally nested and the schema changes often, such as product catalogs, content and user profiles. Example: MongoDB. PostgreSQL’s jsonb type offers much of the same flexibility inside a relational database.

Key-value stores

The simplest model: a key points to a value, and lookups by key are extremely fast. Used for caches, sessions, rate limits and queues. Examples: Redis, Valkey, Amazon DynamoDB.

Wide-column stores

Rows with flexible columns grouped into families, partitioned across many servers. Built for very high write volumes and huge data sets with known access patterns, such as event logs, messaging and IoT. Examples: Apache Cassandra, ScyllaDB, HBase.

Graph databases

Store entities as nodes and relationships as edges, so queries that follow many hops of relationships stay fast. Used for fraud detection, recommendations, network analysis and knowledge graphs. Example: Neo4j.

Time-series databases

Optimized for timestamped measurements arriving in order: metrics, sensor data, prices. They compress well and make time-window queries cheap. Examples: InfluxDB, TimescaleDB, Prometheus for monitoring.

Vector databases

Store embeddings, lists of numbers produced by AI models that capture the meaning of text, images or products, and find the items closest to a query. They power semantic search and retrieval for AI assistants. Specialized engines include Pinecone, Milvus and Qdrant, but general-purpose databases now do this too: DB-Engines lists vector search among the models of Oracle, PostgreSQL (via pgvector), MongoDB and Redis (DB-Engines).

In-memory databases and data grids

Keep the working data set in RAM, often spread across a cluster, for microsecond access. Used for real-time pricing, trading, session stores and search. Examples: Redis, Hazelcast, Apache Ignite, SAP HANA. See what Hazelcast is used for.

Distributed SQL (NewSQL)

Relational databases that scale out across many servers and regions while keeping SQL and ACID transactions. Examples: CockroachDB, YugabyteDB, Google Spanner, TiDB.

Analytical databases and data warehouses

Built for queries over millions or billions of rows, such as reports, dashboards and machine learning features. Most store data by column rather than by row:

Row storage versus column storage for the same orders table with columns id, date, customer and amount. A row store keeps each order's values together on disk, which is fast for reading or writing one whole order and suits transactional, OLTP, systems. A column store keeps all values of one column together, so a query such as the sum of amount reads only that column, compresses well and suits analytics, OLAP, over millions of rows.ROW STORE VS COLUMN STORERow store (OLTP)One order’s values sit togetherid 1date 1cust 1amt 1id 2date 2cust 2amt 2id 3date 3cust 3amt 3id 4date 4cust 4amt 4Fast: read or update one whole orderColumn store (OLAP)One column’s values sit togetherid 1id 2id 3id 4date 1date 2date 3date 4cust 1cust 2cust 3cust 4amt 1amt 2amt 3amt 4Fast: SUM(amt) reads one column only
Transactional systems (OLTP) read and write whole rows; analytical systems (OLAP) scan a few columns across many rows.

Examples: Snowflake, Google BigQuery, Databricks, Amazon Redshift, ClickHouse, and DuckDB for analytics inside an application.

Cloud and multi-model databases

Two trends cut across all the types above. Most new databases run as managed cloud services, such as Amazon RDS and Aurora, Azure SQL Database or MongoDB Atlas, where the provider handles patching, backups and failover. And most major engines are now multi-model: PostgreSQL, Oracle and SQL Server handle relational, JSON, spatial and vector data in one system.

DB-Engines ranks database systems monthly by how often they are mentioned, searched for, discussed and asked for in job offers. In September 2026 the top four were all relational (DB-Engines):

DB-Engines popularity scores, September 2026: Oracle 1122, MySQL 845, Microsoft SQL Server 699, PostgreSQL 683, MongoDB 381, Snowflake 212, Databricks 168, Redis 158, IBM Db2 111, SQLite 97.DB-ENGINES POPULARITY SCORE, SEPTEMBER 202603006009001200Oracle1,122MySQL845Microsoft SQL Server699PostgreSQL683MongoDB381Snowflake212Databricks168Redis158IBM Db2111SQLite97
Source: DB-Engines Ranking, September 2026. The score measures popularity, not installations or quality.

PostgreSQL is the one gaining ground: it was the only one of the four leaders to raise its score over the previous year, and it is the most used database among developers, chosen by 58.2% of professional developers in Stack Overflow’s 2025 survey, ahead of MySQL at 39.6% (Stack Overflow, 2025). By data model, relational systems account for about 71% of all popularity (DB-Engines):

Share of total DB-Engines popularity by database model, October 2026: relational 71.0%, document stores 10.9%, key-value stores 4.7%, search engines 3.9%, vector 2.8%, wide column 2.3%, graph 1.6%, time series 1.2%.SHARE OF POPULARITY BY DATA MODEL, OCTOBER 20260%20%40%60%80%Relational71%Document10.9%Key-value4.7%Search engine3.9%Vector2.8%Wide column2.3%Graph1.6%Time series1.2%
Source: DB-Engines, ranking by database model, October 2026.

Popular DBMS examples

DBMSTypeLicenseTypical use
PostgreSQLRelational, multi-modelOpen sourceGeneral-purpose default for new applications, with JSON, GIS and vector extensions
Oracle DatabaseRelational, multi-modelCommercialLarge enterprise systems in banking, telecom, government
MySQL / MariaDBRelationalOpen source and commercialWeb applications and content platforms
Microsoft SQL ServerRelationalCommercialBusiness applications on the Microsoft stack
MongoDBDocumentSource-available and commercialFlexible schemas, catalogs, content
Redis / ValkeyKey-value, in-memoryOpen sourceCaching, sessions, queues, real-time counters
Apache CassandraWide columnOpen sourceMassive write volumes across data centers
Neo4jGraphOpen source and commercialFraud detection, recommendations, knowledge graphs
Snowflake / BigQueryAnalytical, columnarCloud serviceData warehousing and analytics

PostgreSQL keeps adding features that used to require separate systems. Version 18, released in September 2025, introduced asynchronous I/O, with gains of up to 3x in some read-heavy scenarios, plus a uuidv7() function for timestamp-ordered keys that index better (PostgreSQL).

How to choose a database management system

Start from the data and the questions you will ask of it, not from a product list:

  • Shape of the data. Structured records with relationships point to relational; nested, varied records to documents; connected entities to graphs; measurements over time to time series.
  • Consistency needs. Money, inventory and bookings need ACID transactions. Activity feeds and analytics can usually live with eventual consistency.
  • Read and write patterns. Many small transactions (OLTP) and large scans (OLAP) want different engines. Most companies end up with one of each.
  • Scale and latency. Estimate data volume, requests per second and acceptable response times. A well-tuned relational database goes further than most teams expect.
  • Operations. Who will run it: your team or a cloud provider? Consider backups, monitoring, upgrades and high availability.
  • Ecosystem and skills. Drivers for your language, tooling and the people you can hire. For Java systems, JDBC, JPA and Hibernate work with every major relational database.
  • Total cost. Licenses, cloud fees, support and the cost of leaving later.

Our rule of thumb: start with PostgreSQL unless you have a concrete reason not to, and add specialized stores, such as a cache, a search engine or a warehouse, only when a measured need appears.

When the database becomes the bottleneck

As traffic grows, the database is usually the first thing to slow down. The fix is rarely a new DBMS. In order of effort: find the slow queries and add the right indexes, refresh statistics, tune memory and connection pools, add read replicas, cache hot data, and only then partition or move hot workloads to specialized stores.

For one UK hotel metasearch engine, availability search had outgrown SQL Server. We moved the search into an in-memory data grid and kept SQL Server as the system of record:

Case study: a UK hotel metasearch engine. Stratoflow moved availability search out of SQL Server into an in-memory data grid, with the database kept as the system of record. The engine now answers 300 million queries a day at 80% lower infrastructure cost and 60% lower response time.CASE STUDY: TRAVELUK hotel metasearch engineAvailability search moved out of SQL Server intoan in-memory data grid; the database stayed thesystem of record.300 millionqueries a day80% lowerinfrastructure cost60% lowerresponse timeSearch requestsIn-memory data gridSQL Serversystem of recordfast loaderRead the case study

If your system is slowing down under data load, our performance engineering team finds the bottleneck and fixes it against agreed targets. See also our guides to Java performance problems and low-latency Java applications.