Data Models in DBMS
A Data Model is a collection of concepts used to describe the structure of a database.
It defines how data is stored, organized, related, and accessed within a database system.
1. What is a Data Model?
A data model provides a logical way to describe data, relationships between data, and constraints that apply to the data.
- Defines data structure
- Defines relationships
- Defines rules and constraints
2. Purpose of Data Models
- To simplify database design
- To represent real-world data
- To improve data consistency
- To provide a clear database blueprint
3. Types of Data Models
3.1 Hierarchical Data Model
In this model, data is organized in a tree-like structure with a single root. Each child has only one parent.
Company
└── Department
└── Employee
- One-to-many relationship
- Simple and fast access
- Difficult to represent many-to-many
3.2 Network Data Model
This model allows multiple parent-child relationships. It is represented using graph structures.
Student ─── Course │ │ └──────────┘
- Supports many-to-many relationships
- More flexible than hierarchical model
- Complex to design
3.3 Relational Data Model
This is the most widely used data model. Data is stored in tables consisting of rows and columns.
STUDENT +---------+--------+-------+ | RollNo | Name | Marks | +---------+--------+-------+ | 101 | Amit | 78 | | 102 | Riya | 85 | +---------+--------+-------+
- Easy to understand
- Uses SQL for data access
- Supports data independence
3.4 Object-Oriented Data Model
This model stores data as objects, similar to object-oriented programming. It supports inheritance, encapsulation, and polymorphism.
- Supports complex data types
- Used in advanced applications
4. Comparison of Data Models
Model Structure Relationship ------------ -------------- ------------------ Hierarchical Tree One-to-many Network Graph Many-to-many Relational Table All types Object-Oriented Objects Complex relations
5. Advantages of Data Models
- Provides clear database structure
- Helps in database design
- Improves data consistency
- Easy maintenance and expansion
Practice Questions
- Define data model.
- What are the types of data models?
- Explain hierarchical data model with diagram.
- Why relational model is most popular?
- Differentiate between hierarchical and network models.
Practice Task
Prepare notes with diagrams on:
✔ Definition of Data Model
✔ Types of Data Models
✔ Advantages of Data Models
✔ Comparison of Data Models