10 Introduction To Data Models
10 Introduction To Data Models
We will look at the meaning behind data models and the different types of models.
We will highlight what these terms mean in the next few lessons.
Most data models also include a set of basic operations for manipulating data
in the database.
Hierarchical model #
Engine Body
Car is the parent of both Engine and Body, so each child has only one parent.
Network model #
The network model expands upon the hierarchical structure, allowing each
record to have multiple parent and child records, forming a generalized graph
structure. It was the most popular model before being replaced by the
relational model. The network model is shown in the diagram below:
Student Degree
Subject
In this figure, we can see that the Subject is the child of Student and Degree. So, it has two parent
classes.
Relational model #
The relational model represents data as relations or tables. For example, the
university database system contains multiple tables (relations) which in turn
have several attributes (columns) and tuples (rows).
Student Table
Department Table
Std_Id: Integer
Dep_Id: Integer
Std_Name: Varchar (30)
Dep_Name: Varchar(30)
Age: Integer
Dep_Location: Varchar(50)
Address: Varchar (50)
Dep_Id: Integer
The STUDENT table is related to the DEPARTMENT table through the Dep_Id attribute.
As we can see the STUDENT table consists of attributes like Std_Id , Std_Name ,
Age etc. along with their data type. Same for the DEPARTMENT table. The
arrow simply shows how these two tables are connected in this model.