Data Models Types, Uses & Examples

relational data model

A data model is a collection of concepts that can be used to describe the structure of a database. When it comes to data modeling, there are several different types of models that data analysts and data modelers can use. There are several different types of data models, and each has its own strengths and weaknesses. Some of most popular types of data models are the relational model, the dimensional model, and the hierarchical model. In this blog post, we will provide a brief overview of different types of data model and when you might use each one with the help of real world examples.

The Relational Data Model

The relational model is the most common type of data model. It organizes data into tables, where each table contains a set of columns and rows. Tables are similar to folders in a file system, where each table stores a collection of information. Rows in a table are like files in a folder, where each row contains information about one entity.  For example, a row in a customer table might contain information about a customer, such as the customer’s name, address, and phone number. Columns in a table are like fields in a file, where each column stores one piece of information about each row. For example, a column in a customer table might store customer names. Tables can be linked together via relationships. The relational model is easy to understand and use, which makes it a popular choice for many businesses. However, it can be challenging to scale a relational database as your business grows. 

Every table in the relational data model has a primary key that uniquely identifies each row in the table. The primary key is a column or set of columns that can be used to identify a specific row in the table. For example, a table of students might have a primary key that consists of the student ID number such as that shown in the below picture.

The picture below represents relational data model.

relational data model

In order to access data in the relational model, database developers and data modelers use a specific language called SQL (Structured Query Language). SQL is used to query the database and retrieve information from it. It is also used to insert new data into the database, update existing data, and delete data that is no longer needed.

The following are few popular examples of the relational databases management systems (RDBMS) which are based on the relational data model:

  • Oracle: Oracle is a relational database management system (RDBMS) that was originally developed by Larry Ellison and his team at Oracle Corporation in the 1970s. Oracle is one of the most popular RDBMSs on the market and is used by many large organizations, including the United States Department of Defense.
  • MySQL: MySQL is a relational database management system (RDBMS) that was originally developed by Michael Widenius and David Axmark in the mid-1990s. MySQL is a popular open source RDBMS that is widely used in web applications.
  • Microsoft SQL Server: Microsoft SQL Server is a relational database management system (RDBMS) that was originally developed by Microsoft in the early 1990s. SQL Server is a popular RDBMS that is used in a variety of applications, including e-commerce, data warehousing, and business intelligence.
  • PostgreSQL: PostgreSQL is a relational database management system (RDBMS) that was originally developed by the University of California, Berkeley in the mid-1980s. PostgreSQL is a popular open source RDBMS that is widely used in web applications.
  • Sybase ASE: Sybase ASE is a relational database management system (DBMS) produced by Sybase. It is a popular choice for businesses of all sizes, from small businesses to large enterprises. ASE offers a number of features that make it an attractive option for businesses, including scalability, security, and high availability.

The Hierarchical Data Model

The hierarchical model is the least common type of data model. It arranges data into a tree-like structure, where each record has only one parent record. Each item in the hierarchy is called a node, and each node can have any number of child nodes. In a hierarchical data model, each piece of data is identified by a unique path from the root of the tree to the node containing the data. Database developers and data modelers use this type of model when they want to represent data that has a clear parent-child relationship. For example, in a family tree, each person has only one parent (with the exception of twins), and each parent can have multiple children. This clear relationship makes it easy to navigate the data and find the information you need. The hierarchical model is not as popular as the other models because it is more difficult to query and update than the other two models. Firebase database is based on hierarchical data model.

The picture below represents hierarchical data model.

hierarchical data model

The Dimensional Data Model

The dimensional model is similar to the relational model in that it also uses tables with columns and rows. However, tables in a dimensional model are organized into dimensions and facts. A dimensional data model is a logical representation of the data in a Database. Dimensions are used to mining, query, and analyze data. Dimensions are used to describe the characteristics of an event, while facts are used to quantify those events. The dimensional model is popular for data warehousing and business intelligence applications.

The dimensional data model is a type of database model that is used to describe multidimensional data. It is also known as the star schema. The dimensional data model is composed of a central fact table and a number of associated dimension tables. The fact table contains the measures or facts that are to be analyzed. The dimension tables contain the attributes that describe the measures in the fact table.

A dimensional data model is created by first identifying the dimensions and then creating a schema that defines the relationships between the dimensions. The schema is used to query the data in the dimensional data model. The queries are used to extract information from the dimensional data model. The information can be used to answer business questions or to make decisions.

The picture below represents dimensional data model.

dimensional data model

The Network Data Model

The network model is similar to the relational model, but it allows more than one table to be linked together. This can make the network model more flexible than the relational model, but it can also make it more difficult to understand. The network model is best suited for applications that need to store complex relationships between data items.

A network data model is a database model that is designed to represent the relationships between data in a networked environment. The network data model is based on the concept of a network, which is a collection of nodes (or vertices) and the links (or edges) that connect them. In this model, data is represented as nodes in the network, and the relationships between data items are represented as links between those nodes. 

The picture below represents network data model

network data model

Conclusion

There are various different types of data models such as the relational model, the dimensional model, and the hierarchical model. Each type of data model has its own strengths and weaknesses. The type of data model that you choose for your business should be based on your specific needs and requirements.

Ajitesh Kumar

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking.
Posted in Data.