Data Models
Data Models
Data Model gives us an idea that how the final system will look
like after its complete implementation.
defines the data elements and the relationships between the data
elements.
Data Models are used stored,
to show how data is
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. Apart from the
Relational model, there are many other types of data models
Data models
Some of the Data Models in DBMS are:
1.Hierarchical Model
2.Network Model
3.Entity-Relationship Model
4.Relational Model
5.Object-Oriented Data Model
6.Object-Relational Data Model
7.Flat Data Model
8.Semi-Structured Data Model
9.Associative Data Model
10.Context Data Model
Hierarchical Model
Hierarchical Model was the first DBMS model. This
model organises 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. Example: We can represent the relationship
between the shoes present on a shopping website in
the following way:
Features of a Hierarchical
Model
One-to-many relationship:
The data here is organised in a tree-like structure where the one-to-
many relationship is between the datatypes.
Also, there can be only one path from parent to any node. Example: In
the above example, if we want to go to the node sneakers we only have
one path to reach there i.e through men's shoes node.
Parent-Child Relationship:
Each child node has a parent node but a parent node can have more
than one child node. Multiple parents are not allowed.
Deletion Problem:
If a parent node is deleted then the child node is automatically deleted.
Pointers
are used to link the parent node with the child node and are used to
navigate between the stored data. Example: In the above example the
' shoes ' node points to the two other nodes ' women shoes ' node and
' men's shoes ' node.
Advantages of Hierarchical Model