Data Models
A data model defines how data is structured, stored, related, and manipulated in a DBMS.
1 · Relational Data Model
| StudentID | Name | Department | Year | |
|---|---|---|---|---|
| S001 | Rahim Ahmed | CSE | 2 | rahim@uni.edu |
| S002 | Karim Hasan | EEE | 3 | karim@uni.edu |
| S003 | Nusrat Jahan | CSE | 1 | nusrat@uni.edu |
| CourseID | CourseName | Credit | Department |
|---|---|---|---|
| C101 | Database Systems | 3 | CSE |
| C102 | Data Structures | 3 | CSE |
| E201 | Circuit Theory | 3 | EEE |
2 · Entity-Relationship (ER) Model
A conceptual model representing data as entities, attributes, and relationships — e.g. Student — enrolls — Course. Purpose: design the database structure before implementation.
3 · Hierarchical Model
Data is organised in a tree with parent–child links; each child has only one parent. Examples: University → Department → Student, a file system.
4 · Network Model
An extension of the hierarchical model where a child can have multiple parents, forming a graph. Example: a student enrolls in many courses, and a course has many students.
5 · Object-Oriented Model
Data is stored as objects (like OOP), combining data (attributes) and behaviour (methods). E.g. a Person superclass with Student, Doctor, Engineer subclasses (inheritance).
6 · Semi-Structured Model
Data has no fixed schema; structure is flexible. Two common formats:
<employee id="34594"> <firstName>Heather</firstName> <lastName>Banks</lastName> <salary>72000</salary> </employee>
{
"emp_name": "Shubham",
"email": "shubh@gmail.com",
"job_profile": "intern"
}Quick comparison
| Model | Structure | M:N? | Note |
|---|---|---|---|
| Relational | Tables | ✅ (via keys) | Most widely used |
| ER | Entities + relationships | ✅ | Design-time only |
| Hierarchical | Tree (1 parent) | ❌ | Simple, rigid |
| Network | Graph (many parents) | ✅ | Complex to maintain |
| Object-Oriented | Objects (data+methods) | ✅ | OOP-style |
| Semi-Structured | XML / JSON | ✅ | Flexible, no fixed schema |