Short answer
There is no official list of seven types of DBMS. Sources count them differently, because they group products by data model, by how they are deployed, or by the workloads they suit. One way to reach seven is to group them by data model:
- Hierarchical
- Network
- Relational
- Object-oriented
- Key-value
- Document
- Graph
Hierarchical and network
Hierarchical databases organize records in a tree, where each record has one parent. IBM’s IMS, built in the late 1960s, is the classic example, and some legacy systems still use it. Network databases allow a record to have several parents, which forms a graph of records. They are more flexible than hierarchical systems but more complex to design and program. CODASYL work in the early 1970s defined the network model.
Relational
Relational databases store data in tables of rows and columns, linked by keys and queried with SQL. Most SQL products, such as MySQL, Microsoft SQL Server and PostgreSQL, are relational. The model dates to E. F. Codd’s 1970 paper, and it is the most widely used of the seven.
Object-oriented
Object-oriented databases store data as objects, which are instances of classes with attributes and methods, much as object-oriented programs do. They were popular in the 1990s. Today they are less common as a standalone choice, and object features are more often added to relational products.
Key-value, document and graph
A key-value store works like a dictionary: each key maps to a value, and lookups are by key. Redis is a widely used example. Simple lookups are quick, but queries are limited to the key.
A document database stores each record as a self-contained document, often nested, JSON-like data. Each document can have a different structure. MongoDB and CouchDB are common examples.
A graph database stores nodes and the relationships between them, which suits data dominated by connections, such as social networks or product recommendations. Neo4j is a common example.
Where the count changes
Other lists add categories that the seven above leave out:
- Wide-column stores, such as Cassandra and HBase, hold rows that can have different sets of columns.
- In-memory DBMSs keep data in main memory for speed. This describes where data is kept rather than how it is structured.
- Cloud platforms describe how a database is deployed, not what data model it uses.
Some products combine several models; these are called multi-model databases. For the classic set of four, without the NoSQL types, see what are the four types of database models.
Choosing
Start from the shape of your data and the questions you will ask of it, rather than the category name. Relational databases remain a common starting point for structured data. For a fuller look at the five models most often compared, see what are the 5 common database models.