Data models are the models explaining the logical structure of the database systems. They describe the entities, attributes, and the relationship among the data elements of the specified database.
Data models organize the description and consistency constraints of the data. After the complete implementation of the database, these models show how the data is represented to each other and how they are stored, accessed, and updated inside the database systems.
Various types of data models in the database management system (DBMS) are as follows:
Flat Data Model
The flat Data Model is a model that kept all the data in the same plane. It is a first and foremost introduced traditional data model, which is not much scientific.
In this model, the database is indicated as a single table in the form of tuples (rows) and fields (columns). This DBMS data model is slow and inefficient process.
The hierarchical model is that data model which indicates the data of the database in the tree-like structure. This is the first database management system model.
This data model stores the data as records and connects them through links. Each hierarchical data model has a single parent entity for each record. A parent can have more than one child node, and all the siblings are sorted in a specific order.
In the 60s and 70s, this data model was mainly used by the Information Management System (IMS) of IBM.
In this hierarchical tree structure, only one entity is present at the top, which is called a root entity. If any database user wants to read the data from the hierarchical database, then that user has to traverse the tree from the root node to the data node.
Following are the few benefits or advantages of the Hierarchical data model:
Few disadvantages of the Hierarchical data model in the database are as follows:
The network data model is that model which denotes the data of the database as the graph. It is a simple model for indicating the objects and their relationships.
This data model was originally introduced by Charles Bachman.
Before the invention of the relational model, this was the most popular database model.
Sometimes, this model is also known as the CODASYL model because it was adopted in 1969 by the CODASYL Data Base Task Group. In this data model, data and information are more connected to each other. Due to the high-bonding, any user can access data easily and fastly.
This model is mainly used to denote the many-to-many relationship between the given data.
Following are the few benefits or advantages of the network data model in the DBMS:
Some limitations or disadvantages of the network data model are as follows:
The relational data model is a data model indicating the structure of the database in the 2-D (2-dimensional) tables. In this model, all the data or information given by the user is stored in the table rows according to the specific column.
Edgar Frank Codd (E.F. Codd) was a great scientist who invented the relational model for the databases in 1970.
In the relational model, tables are called relations, and rows and columns are called tuples and attributes.
The following example consists of a relation (table) whose name is Employee. This Employee table contains five attributes (columns) and six tuples (rows).
Five attributes of this table are Employee_ID, Employee_Name, employee_Age, Employee_Salary, and Dept_ID.
The advantages of the relational data model are as follows:
Some disadvantages or limitations of the relational data model are as follows:
Entity-Relationship Model is that model which helps in designing the structure of the database conceptually or logically. It is a high-level data model, which is developed by Peter Chen in the year of 1976. Any developer can easily understand the database system by the ER diagram. ER diagram is a tool which consists of various symbols for representing the ER model.
It is a best data model for designing a database. After designing the database, we can easily convert the designed ER diagram into the tables of the relational model.
ER model of DBMS consists of the following three components:
1. Entity
2. Attribute
3. Relationship
In the following example, the Employee and Department are the two entities. The attributes of the Employee entity are Emp_ID, Emp_Name, Emp_Salary, and Emp_Age. And, the attributes of the Department entity are Dept_ID and Dept_name. These two entities are connected by a relationship, whose name is Works_In.
Some benefits or advantages of the Entity-Relationship data model are as follows:
Some benefits or disadvantages of the Entity-Relationship data model are as follows:
The object-Oriented data model is that model representing the data and relationship as the object. This model stores the videos, audios, and graphical files which can’t be stored in the relationship model.
This model is based on the three main components whose names are object class, object identity, and object structure. This data model is mainly designed for storing and retrieving the objects which are created by the programs of object-oriented languages. It also provides the facilities of object-oriented to the database users.
Some benefits or advantages of the object-oriented data model are as follows:
Some limitations or disadvantages of the object-oriented data model are as follows:
The object-Relational data model is that model which combines the relational model with the advanced functions of the object-oriented data model.
The main objective of this model is to connect the gap between the techniques of the object-oriented data model and relational model, which are used in C++ and Java programming languages. This model supports the table structure as well as the concepts (objects, classes, and inheritance) of the object-oriented model. Due to the high complexity, we have a need to understand this model properly.
This data model helps database developers by increasing the abstraction of the data.
Some benefits or advantages of the object-relational data model are as follows:
Some limitations or disadvantages of the object-relational data model are as follows: