Data Models and DBMS Types

What Are the Types of Data Models in DBMS?

Learn the main types of data models in DBMS, from hierarchical and network to relational, object-based and NoSQL models, and how they differ.

On this page
  1. What a data model is
  2. Object-based logical models
  3. Record-based logical models
  4. Physical data models
  5. Models in modern systems
  6. Dimensional models for data warehouses
  7. How to choose a model

What a data model is

A data model is a set of concepts for describing data, how pieces of data relate to each other, what they mean, and which rules they must follow. A database management system (DBMS) is built around one or more of them. If you search for what are the types of data models in dbms, you will find different answers depending on the textbook. A common split puts the models into three families: object-based logical models, record-based logical models, and physical models. Some textbooks use conceptual, implementation and physical levels instead, which cover much the same ground.

Object-based logical models

These models describe data as entities and objects, and the links between them. They do not depend on how records are stored, which makes them useful for design work.

  • Entity-relationship (ER) model. Peter Chen introduced it in 1976. It describes entities, such as customers and orders, their attributes, and the relationships between them, often in a diagram. It is mainly a design tool, and the finished design is usually implemented in a database such as a relational one.
  • Object-oriented model. Data is stored as objects with attributes and methods, grouped into classes. Object-oriented database systems were popular in the 1990s, and they fit closely with object-oriented programming. They have not replaced relational systems for most applications.
  • Object-relational model. A hybrid that adds object features, such as user-defined types, to a relational database. Several relational products offer some of these features.

Record-based logical models

These models describe the database as fixed-format records linked in a structure.

  • Hierarchical model. Records form a tree, and each child record has one parent. IBM’s IMS, built in the late 1960s, is the classic example, and some legacy systems still run on this design. The tree handles one-to-many links well, but many-to-many links need workarounds.
  • Network model. A record can have several parents, which turns the structure into a graph. CODASYL work in the early 1970s defined the model. It is more flexible than the hierarchical model, but harder to design and program. Relational systems largely replaced it during the 1980s.
  • Relational model. Data is stored in tables of rows and columns, and keys link the tables. Queries are written in SQL. E. F. Codd described the model in a 1970 paper. It is the most widely used of these models today, and most SQL databases in common use, such as MySQL and PostgreSQL, are built on it.

Physical data models

Physical models describe how data is stored: file layout, record formats, indexes, and the paths used to find it. Most people who write SQL never define a physical model directly, because the DBMS’s storage engine handles it, although administrators can tune some settings. In MySQL, the storage engine is chosen per table, a decision covered in types of mysql tables and storage engines. How the physical level relates to the logical design is explained in what is 3 type architecture in dbms.

Models in modern systems

Many newer databases are grouped under the NoSQL label. These models do not fit the three families neatly, and many products combine more than one. The main NoSQL types are:

  • Document. Each record is a self-contained document, often nested, JSON-like data. MongoDB and CouchDB are common examples.
  • Key-value. Each value is stored under a key, much like a dictionary. Redis is a widely used example.
  • Wide-column. Rows can hold different sets of columns, grouped into column families. Apache Cassandra, Apache HBase and Google Bigtable are examples.
  • Graph. Data is stored as nodes and the relationships between them, which suits questions about connections. Neo4j is a common example.

For a fuller view of the five models most often compared, including relational, see what are the 5 common database models.

Dimensional models for data warehouses

Data warehouses often use dimensional modeling, a method popularized by Ralph Kimball. A star schema puts measurements, such as sales amounts, in a central fact table, with keys that link to dimension tables such as date, product and customer. A snowflake schema normalizes those dimension tables into smaller ones. These designs usually run on relational engines, so they are better seen as a design pattern than as a separate DBMS model. For the wider field, see what is data warehousing in business intelligence.

How to choose a model

No single model fits every job. The relational model is a common starting point for applications that need structured records and reliable transactions. The other models suit particular shapes of data and access patterns. Many of them trade away some features, such as ad hoc queries or strict consistency across servers, in return for scale or flexibility.

Designing the model is a core task in the role of database designer in dbms. In relational design, normalization reduces repeated data, and what is the role of normalization in database design explains why that matters.

Keep exploring

Guides from other topics

All topics →