Theory
The same data, four shapes
Meera's shop has customers, orders and items, all related. But how should that be organised inside a database? It turns out there is more than one way to shape data, and history tried several before settling.
A database model is the underlying shape: a tree, a web, a design sketch, or a set of tables. Knowing the four the syllabus lists, and why one of them won, is a classic exam question and the reason every database you will ever use looks the way it does.
Theory
Four ways to organise a library
You could organise a library as a strict family tree where each book has exactly one shelf-parent (hierarchical), as a web of cross-references where a book links to many others (network), as an architect's blueprint drawn before building (E/R), or as plain card-catalogue tables linked by reference numbers (relational). All hold the same books; they differ in how easy it is to find and rearrange them. The tables won.
At a glance
The four models
| Model | Shape | Note |
|---|---|---|
| Hierarchical | Tree: one parent per child | Rigid; weak at many-to-many |
| Network | Graph: many parents allowed | Flexible but complex to navigate |
| E/R | Design diagram | For DESIGNING, not storing |
| Relational | Tables linked by keys | Dominant: simple + SQL |
Theory
Why relational won
The relational model (E.F. Codd, 1970) stores data as tables (relations) of rows and columns, with tables linked by shared keys. It won for reasons that matter every day:
- Simple: everyone understands a table.
- Flexible: add a column or link two tables without rebuilding everything (data independence!).
- Powerful querying: backed by SQL, a whole language for asking questions.
- Solid theory: normalization rules keep it clean.
Hierarchical and network models made you navigate pointers by hand; relational lets you just describe what you want. That is why MySQL, Oracle, PostgreSQL, all relational, run the world.
Quiz
In the HIERARCHICAL model, how many parents can a child record have?
- Exactly one
- As many as needed
- Exactly two
- None; there are no parents
Show the answer
Exactly one
The hierarchical model is a strict tree: each child has exactly one parent. This is its defining limit, real data often needs many-to-many (a student in many courses, a course with many students), which a one-parent tree cannot express cleanly. The network model relaxed this to allow many parents. That one-parent-vs-many distinction is the key exam contrast between the two.
Think first
Meera's problem with a tree
Meera's data has a many-to-many reality: each customer buys many items, and each item is bought by many customers. Why does a strict hierarchical (tree) model struggle here, and how does the relational model handle it?
Show the answer
A tree forces one parent per child, so it cannot naturally say 'this item belongs to many customers AND this customer has many items', you end up duplicating data messily. The relational model handles it with a separate linking table (orders) using keys to connect customers and items freely, no duplication, any many-to-many relationship expressed cleanly. This flexibility is exactly why relational replaced the older models.
Watch out
Where marks leak
Confusing hierarchical (tree, one parent) with network (graph, many parents), the single most-tested distinction. Treating E/R as a storage model, it is a design/conceptual model (a diagram), you design in E/R then implement as relational. And in 'why is relational popular?' answers, list simplicity, SQL, flexibility and theory, not just 'it uses tables'. Naming Codd as its originator is a nice extra mark.
Theory
Everything ahead is relational
From here, the whole subject is the relational model: the next lessons DESIGN with E/R diagrams, then the key lessons and normalization make relational tables clean, then Unit 4 queries them with SQL. You are learning the winning model from the ground up. Next: the E/R model itself, entities, attributes and relationships, the vocabulary of database design.
Summary
Key takeaways
- A database model is the shape data is organised in.
- Hierarchical: a tree, each child has exactly ONE parent; rigid, weak at many-to-many.
- Network: a graph, a child may have MANY parents; flexible but complex to navigate.
- E/R: a design/conceptual diagram, used to plan before building, not to store.
- Relational: simple TABLES linked by keys (Codd); dominant thanks to simplicity, SQL, flexibility, theory.
- Memory hook: family tree vs web vs blueprint vs card-catalogue tables, tables won.