Data Models
In DBMS (Database Management System), a data model defines how
data is stored, organized, and manipulated. It provides a way to describe
the structure of the database, relationships between data, and the
constraints applied to it.
Here’s a clear breakdown for you:
Types of Data Models in DBMS
1. Conceptual Data Models
Describe what data is stored and the relationships between them,
independent of how they will be implemented.
Example: Entity-Relationship (ER) Model
The entity-relationship (E-R) data model uses a collection of basic
objects, called
entities, and relationships among these objects.
An entity is a “thing” or “object” in the real world that is
distinguishable from other objects. The entity- relationship model is
widely used in database design.
o Entities (like Student, Course)
o Attributes (like Student_Name, Course_ID)
o Relationships (like Enrolled_in)
Used mainly in database design phase.
2. Logical Data Models
Defines how the data will be structured in a logical manner, focusing on
rules and constraints. This is what most DBMSs actually use internally.
More detailed than conceptual model, still independent of physical
storage.
Types:
a) Hierarchical Model: (1960s – Earliest)
- First model introduced (by IBM in 1960s → IMS database
system).
- Data arranged in tree-like structure (parent-child).
- It organizes data into a tree-like structure, where:
o Data is stored as records (nodes).
o Relationships are parent–child (1-to-many).
o Each child record has only one parent, but a parent can have
many children.
o Limitations:
Supports only 1-to-many relationships.
Rigid structure, difficult to modify.
Redundancy if a child belongs to multiple parents.
b) Network Model: (late 1960s – CODASYL model)
- Introduced soon after hierarchical model by CODASYL
(Conference on Data Systems Languages).
- Data represented as records connected by links (graph-like). The
Network Data Model is one of the older data models in DBMS
(popular before the relational model took over). It represents data
in the form of records and relationships that are organized like a
graph (nodes and edges).
o Data is stored as records (nodes).
o Relationships are represented as edges (links) between
records.
o Unlike the hierarchical model (which is strictly parent-
child), a network model allows:
o Many-to-many relationships (a record can have
multiple parent and child records).
o More flexible connections compared to the hierarchical
model.
o Limitations:
o Very complex to design and navigate.
o Requires programmers to manually follow pointers
(navigational access).
Comparison (Hierarchical vs Network)
Feature Hierarchical Model Network Model
Structure Tree (1-to-many) Graph (many-to-many)
Relationship Each child → 1 parent Child can have multiple
parents
Flexibility Less flexible More flexible
Complexity Simple More complex
Example Company–Dept– Student–Course–Professor
Use Employee
c) Relational Model: (1970s – Most Revolutionary)
- Introduced by E. F. Codd (IBM Researcher) in 1970 (paper: “A
Relational Model of Data for Large Shared Data Banks”).
- Data is represented as tables (rows = records, columns =
attributes). The relational model uses a collection of tables to
represent both data and the relationships among those data. Each
table has multiple columns, and each column has a unique name.
Tables are also known as relations. The relational model is an
example of a record-based model.
- Record-based models are so named because the database is
structured in fixed-format records of several types. Each table
contains records of a particular type. Each record type defines a
fixed number of fields, or attributes. The columns of the table
correspond to the attributes of the record type. The relational data
model is the most widely used data model, and a vast majority of
current database systems are based on the relational model.
Advantages:
Simplicity and ease of use.
Powerful query capabilities (SQL).
Flexibility to model most real-world scenarios.
Dominates the database world even today (MySQL, Oracle,
PostgreSQL, SQL Server).
d) Object-Oriented Model:
The Object-Oriented Data Model is an advanced data model that
combines database concepts with object-oriented programming (OOP)
concepts.
It was introduced in the 1980s–1990s when traditional relational
databases couldn’t handle complex data like images, audio, video,
engineering designs, etc.
Combines database concepts with object-oriented programming (objects,
classes, inheritance).
Main Idea
Data is represented as objects (just like in Java, C++, Python).
An object = attributes (data fields) + methods
(functions/operations).
Supports complex data types (e.g., multimedia, spatial,
CAD/CAM).
Advantages
Can handle complex data types (multimedia, CAD, GIS).
Integrates programming + database concepts.
Supports reusability via inheritance.
Better modeling for real-world objects.
Disadvantages
More complex than relational model.
Lacks standardization (different systems implemented differently).
Query languages (like OQL – Object Query Language) are less
popular than SQL.
Slower adoption compared to relational DBs.
3. Physical Data Models
Describes how data is actually stored on the hardware.
Includes details like file structures, indexing, hashing, partitions,
etc.
Example: Whether a table is stored row-wise or column-wise,
indexing strategies, B+ trees.
Used by DBA and system designers for optimization.
Examples of Physical Data Models
Unlike conceptual/logical models (ER, relational, hierarchical, etc.),
physical models are implementation-specific.
Here are common examples:
1. Indexed File Organization
Data is stored in files with indexes for faster search.
2. Partitioned Model
Large tables are split into partitions (horizontally or vertically).
Improves query performance and parallelism.
3. Clustered & Heap Storage
Heap Files: Records stored in no particular order.
Clustered Files: Records stored based on a key attribute for
efficient retrieval.
4. Hashing Models
Data is stored using Hash keys and functions.