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.

2. Purpose of Data Models

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

3.2 Network Data Model

This model allows multiple parent-child relationships. It is represented using graph structures.

Student ─── Course
   │          │
   └──────────┘

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    |
+---------+--------+-------+

3.4 Object-Oriented Data Model

This model stores data as objects, similar to object-oriented programming. It supports inheritance, encapsulation, and polymorphism.

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

Practice Questions

  1. Define data model.
  2. What are the types of data models?
  3. Explain hierarchical data model with diagram.
  4. Why relational model is most popular?
  5. 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