What Is a DBMS
How a Database Management System Works
What is a DBMS? A DBMS, or database management system, is the software that creates, stores, protects and manages databases. The data is the database; the DBMS is the program that keeps that data usable.
Applications rarely touch the stored files directly. Instead, they send requests, usually written in SQL or a similar query language, and the DBMS decides how to find, change or return the data. This layer hides the storage details, so a developer can ask for all orders placed last week without knowing how those records are arranged on disk.
Systems that store data in linked tables are called RDBMSs, or relational database management systems, as described in relational databases. Examples include MySQL, MariaDB, PostgreSQL, Microsoft SQL Server and Oracle Database. MongoDB is also a DBMS, but it uses a document model instead of tables, and SQLite runs inside the application rather than as a separate server.
What a DBMS Takes Care Of
A DBMS handles several jobs that would be difficult to build reliably inside every application:
- Storage: writing data to disk efficiently and keeping it in a consistent format.
- Query processing: reading a request, choosing an efficient way to answer it and returning the results.
- Concurrency: letting many users read and write at the same time without their changes interfering with each other.
- Access control: deciding which users or programs may read or change which data.
- Recovery: restoring a consistent state after a crash, typically by replaying a log of recent changes.
Consider two customers buying the last item in stock at the same moment. The DBMS coordinates the two writes so that the item is not sold twice. Storing orders in a plain text file would leave that coordination to the shop's own code, which is error-prone.
Frequently asked questions
Is MySQL a DBMS or a database?
MySQL is a DBMS. It is the software that runs on a server and manages one or more databases. A single MySQL server can hold several databases, each with its own tables, and the same program manages all of them. The difference between MySQL and the SQL language is explained in SQL vs MySQL.
Do I need to install a DBMS to use a database?
Not always. Hosting providers usually run the DBMS for you and offer databases through a control panel. SQLite runs inside the application, so no separate server is needed. Managed database services run the DBMS on the provider's infrastructure, so you use it without operating the server yourself. More background is in the database knowledge base.