3.Data Models
3.Data Models
The Data Model is a collection of conceptual tools for describing data, data relationship, data semantics, and
consistency constraints. A Data Model is a logical structure of Database. A data model provides a way to describe the
design of a database at the physical, logical and view level. The purpose of a data model is to represent data and make
the data understandable. Data Models are used to show how data is stored, connected, accessed and updated in the
database management system. Though there are many data models being used nowadays but the Relational model is the
most widely used model. Some of the Data Models in DBMS are:
1. Hierarchical Model: Hierarchical Model was the first DBMS model. This model organizes the data in the
hierarchical tree structure. The hierarchy starts from the root which has root data and then it expands in the form of a tree
adding child node to the parent node. This model easily represents some of the real-world relationships like food recipes,
sitemap of a website etc.
❖ The data can be accessed faster as compared to the hierarchical model. This is because the data is more
related in the network model and there can be more than one path to reach a particular node. So the
data can be accessed in many ways.
❖ As there is a parent-child relationship so data integrity is present. Any change in parent record is
reflected in the child record.
Disadvantages of Network Model
❖ As more and more relationships need to be handled the system might get complex. So, a user must be
having detailed knowledge of the model to work with the model.
❖ Any change like updation, deletion, insertion is very complex.
3. Entity-Relationship Model
Entity-Relationship Model or simply ER Model is a high-level data model diagram.
In this model, we represent the real-world problem in the pictorial form to make it easy for the stakeholders to
understand. It is also very easy for the developers to understand the system by just looking at the ER diagram. ER
diagram has the following three components:
❖ Entities: Entity is a real-world thing. It can be a person, place, or even a concept. Example: Teachers,
Students, Course, Building, Department, etc are some of the entities of a School Management System.
❖ Attributes: An entity contains a real-world property called attribute. This is the characteristics of that
attribute. Example: The entity teacher has the property like teacher id, salary, age, etc.
❖ Relationship: Relationship tells how two attributes are related. Example: Teacher works for a
department.
Advantages of ER Model:
❖ Simple
❖ Effective Communication Tool
❖ Easy Conversion to any Model
Disadvantages of ER Model
❖ No industry standard for notation
❖ Hidden information
4.Relational Model:
Relational Model is the most widely used model. In this model, the data is
maintained in the form of a two-dimensional table. All the information is stored in the form of row and columns. The
basic structure of a relational model is tables. So, the tables are also called relations in the relational model.
6. Object-Relational Model
It is a combination of both the relational model and the object-oriented model. This model
was built to fill the gap between object-oriented model and the relational model. We can have many advanced features
like we can make complex data types according to our requirements using the existing data types. The problem with this
model is that this can get complex and difficult to handle. So, proper understanding of this model is required.
It is a simple model in which the database is represented as a table consisting of rows and
columns. To access any data, the computer has to read the entire table. This makes the modes slow and inefficient.
8. Semi-Structured Model
Semi-structured model is an evolved form of the relational model. We cannot differentiate between data and schema in
this model. Other examples of semi-structured data include JSON, which is commonly used for exchanging data between
web applications, and log files, which often contain a mix of structured and unstructured data.
Associative Data Model is a model in which the data is divided into two parts. Everything
which has independent existence is called as an entity and the relationship among these entities are called association.
The data divided into two parts are called items and links.
Item: Items contain the name and the identifier(some numeric value).