Database Management Systems (DBMSs) do the critical work of defining how data is structured, accessed, altered, and protected.
A Database Management System (DBMS) is a software program that provides Application Programming Interfaces (APIs) to an underlying physical data store (stored on disk, or even in RAM) for use by client applications. Any application (with rare exceptions) that stores, access, and manipulates data stored on disk, uses a DBMS to manage that access, rather than directly interacting with the underlying data files.
The DBMS has three core components:
Schema management system
The first, and arguably most important, thing that a database management system does is, well, store the data. While that sounds simple, different DBMSs have wildly different approaches to storing data. Some systems only store data in RAM (meaning that when the process ends, the data is not permanently retained), while most store data in files on disk that do persist past one session, and the most advanced replicate data to multiple locations at once. The format of that data can vary widely as well: small or large files, organized by row, by column, or by content.
Data storage engines also can be configured to encrypt data files for security purposes, and can be optimized in different ways to provide systems that are very fast at ingesting data, exceptionally good at preventing errors, or good at handling disparate types of data.
No DBMS would be very useful if it didn’t allow applications to read or write data to their underlying data store. In order to expose those functions to consuming code, the DBMS exposes APIs, often in the form of domain-specific languages (DSLs).
There is usually a Query Language, with syntax for retrieving and storing data of different types. SQL (Structured Query Language) and MQL (MongoDB Query Language) are examples of query languages designed for different data structures. In addition to providing a syntax, database management systems usually provide a network access point for connecting to the database and issuing commands.
Database drivers are the application libraries used by programmers to connect their code to databases and interact with the data stored in them (or store new data). The query and update engine of a database management system is also responsible for managing concurrent requests that might otherwise interfere with each other (like two different applications both trying to reserve the same inventory).
While some databases are truly “schemaless,” those are the few exceptions. Most databases structure the data they manage, and allow you to (pre)define how you want your data to be structured, and will enforce that schema (meaning the database management system will reject requests to add data that does not match your criteria).
Rigid schemas, like those seen in typical relational databases, are useful when you know the exact specifications of each record in advance, and don’t need to change often, because they allow for the storage engine to be highly optimized, and provide strong assurances that all data is exactly the same shape and size.
Flexible schemas, like those seen in document databases, are powerful when you're working with unstructured data, or have constantly changing, variability in your data set, or need to respond to more rapidly changing requirements because they allow you to predefine some parts of your structure while leaving others more open.
A database management system must have all three components, and manage the interaction between them so that accessing and manipulating the data in your database is consistent, reliable, and powerful.
In theory there is no limit on the different types of database management systems that it is possible to create, but there are a few popular DBMSs worth mentioning.
In addition to DBMSs that are specialized by schema and query type, there are also database management systems specialized in different storage types, like In-Memory Database Management Systems (IMDBMSs).
There are also cloud database management systems where a SaaS provider is responsible for managing the regular database maintenance tasks (such as updates, etc). MongoDB Atlas is an example of this.
We use database management systems to create centralized, shared, consistent interfaces to programmatically accessed data. Database management systems help provide a logical structure to the data we’re working with, efficient storage, and distributed access. Using a DBMS is faster, more secure, more powerful, and easier than directly managing data yourself.