Lecture 5 _Updated
Lecture 5 _Updated
Database Models
By:
Syed Anwaar Mehdi
(Lecturer CUI Sahiwal)
Importance of Data Models
Key Features:
Tree-like structure (upside-down).
Pavement
Improvem
ent
Disadvantages:
Complex to implement
Difficult to manage and lacks standards
Cannot handle many-to-many (M:N)
relationships
Structural changes require major program
modifications.
Network Database Model
Network Database Model
Network Database Model
History & Purpose:
Introduced in the 1960s (CODASYL).
Created to improve flexibility over the
hierarchical model.
Separates data structure from physical
storage.
Characteristics:
Uses nodes and links to represent data.
Allows many-to-many (M:N)
relationships.
Uses a data management language to
define and manipulate data.
Network Database Model
Key terms in network Model:
Node: An object of interest (e.g., a city in
a map)
Link: A relationship between two nodes
(e.g., a road between cities)
Path: A sequence of nodes and links (e.g.,
a route from one city to another)
Cost: Numeric value for finding the best
path
Duration: Time taken in a network (used
in logistics, routing).
Network Database Model
Network Hierarchy:
Organizes data at multiple levels
(parent-child relationships).
Sibling nodes: Nodes with the same
parent.
Sibling links: Links with the same parent.