Table of Contents
A database management system (DBMS) is software that stores, retrieves, and controls access to data. The database is the collection of data and its structure. The DBMS is what lets applications query or change it while enforcing rules about which changes are valid.

What happens when an order is placed?
In a relational DBMS, an application might add an order, add its line items, and update the inventory in a single transaction. If a required operation fails, the application can roll back the transaction so the database doesn’t keep a partially recorded order. A foreign key can prevent a line item from referencing an order that doesn’t exist.
What a DBMS manages
- Schema and data: Holds the records and the definitions for tables, fields, constraints, or other structures.
- Queries: Finds and returns matching data. A query planner may choose an index or a scan, depending on the request.
- Concurrency and recovery: Coordinates simultaneous access and provides ways to recover consistent data after some failures. Backups still need to be configured and tested.
- Permissions: Controls which users and applications can read or change particular data.
Choose a DBMS for the work it has to do
| Type | Examples | Common fit |
|---|---|---|
| Relational | PostgreSQL, MySQL, SQL Server, SQLite | Related records, constraints, and SQL queries. SQLite can run inside an application. |
| Document | MongoDB | Data naturally grouped into document-shaped records. |
| Key-value | Redis | Direct lookups by key, such as cache entries or short-lived session data. |
| Column-oriented analytics | ClickHouse | Summaries and reports that scan selected columns across many records. |
For a small file edited by one person, a separate database server may add unnecessary work. If several users need to change related records reliably, decide which integrity rules, permissions, and recovery options you need. Try the SQL and relational databases course or start with a sample query that combines customers and orders.
Reader Comments 0
Sign in with email or Google to join the discussion.