Data Models in DBMS
In this lesson: Types of data models in DBMS — hierarchical, network, relational, ER and object — with diagrams, pros and cons.
What is a data model
A data model is a way of organising how data is stored and connected in a database. It defines the structure, the relationships, and the rules. Over the years several models appeared — hierarchical, network, relational and object-oriented — each with a different way of arranging data.
Hierarchical model
The hierarchical model arranges data in a tree, with a parent-child structure. Each child has exactly one parent, like folders inside folders.
Company ├── Department A │ ├── Employee 1 │ └── Employee 2 └── Department B
It is simple and fast for tree-like data, but rigid: it cannot easily show a child belonging to two parents.
Network model
The network model is like the hierarchical one but a child can have multiple parents, forming a graph. This allows many-to-many relationships.
Student ── enrolled in ── Course
(a student can take many courses,
a course can have many students)
It is more flexible than the hierarchical model, but more complex to design and navigate.
Relational model
The relational model stores data in tables linked by keys. It is the most popular by far.
students(roll PK, name) courses(code PK, title) enrollments(roll FK, code FK)
Tables are simple to understand, easy to query with SQL, and keep data consistent. This balance of simplicity and power is why relational databases dominate.
Object-oriented model
The object-oriented model stores data as objects, bundling data and behaviour together, just like in object-oriented programming. It suits complex data such as images, audio and CAD designs, but is less common than the relational model for everyday applications.
Comparison
| Model | Structure | Relationships | Common today? |
|---|---|---|---|
| Hierarchical | Tree | One-to-many | Rare |
| Network | Graph | Many-to-many | Rare |
| Relational | Tables | Via keys | Most common |
| Object-oriented | Objects | Object links | Niche |
Common mistakes
- Confusing hierarchical and network. Tree (one parent) vs graph (many parents).
- Thinking all models are equal today. Relational is by far the most used.
- Mixing data model with data structure. A model is the overall design approach.
- Ignoring why relational won. Its simplicity plus SQL made it the standard.
Summary
- A data model defines how data is organised and connected.
- Hierarchical: a tree with one parent per child.
- Network: a graph allowing many parents (many-to-many).
- Relational: tables linked by keys — the most popular.
- Object-oriented: data as objects, for complex data.
Next, focus on the winner in the relational database, or its table terms in relation terms.
