Data Models Overview
A data model is a way of seeing the world. Hierarchical, network, relational, and object models differ in what they make easy and what they make awkward.
In plain English
A data model is a map. A tree map, a road map, and a grid map can all describe the same city.
The one idea
A data model is a vocabulary for structure, constraints, and operations; choose the one that matches the relationships in the domain.
The model decides which questions are cheap to ask. A tree is excellent for a hierarchy and awkward for a graph with shared members.
By the end
- 01Define a data model.
- 02Compare hierarchical, network, relational, and object models.
- 03Know the strengths and weaknesses of each.
- 04Recognize why the relational model became dominant.
What a data model provides
A data model defines data structures, constraints, and operations. It gives designers a vocabulary for entities, attributes, and relationships, and gives the DBMS a way to validate and manipulate data. The model is separate from the physical storage used to implement it.
Hierarchical and network models
The hierarchical model organizes records as a tree: one parent, many children. It is fast for one-to-many navigation but awkward for many-to-many relationships. The network model generalizes the tree into a graph of records and sets, supporting many-to-many links. Both are navigational: the program follows pointers rather than declaring what it wants.
Relational and object models
The relational model represents data as relations (tables) and accesses it declaratively with relational algebra or SQL. It separates logical structure from physical navigation, which made it the dominant model. Object and document models add nested structures, inheritance, and flexible schemas, which suit complex or evolving data but complicate joins and constraints.
hierarchical: parent -> children
network: record <-> set <-> record
relational: table(rows, columns)
object: objects with identity, methods, referencesThe org chart that became a graph
A company starts with a strict hierarchy: every employee reports to one manager.
Store the company as a tree of divisions, departments, and employees.
Hierarchical navigation is fast and simple.
A senior engineer joins two projects in different divisions.
The tree must duplicate the employee or add a pointer that the model does not own.
Move the shared relationships into a graph-like model.
The employee becomes one node with many connections.
ConclusionThe model is not a neutral container. It is a claim about which relationships are first-class.
The trade-off
No free correctness.
Gain
A model that makes the common query natural and the schema understandable.
Cost
Every model hides some other query or forces a workaround.
Verdict
Choose for the relationships you cannot afford to fake.
Recap
What to keep.
Takeaways
- +A data model defines structures, constraints, and operations.
- +Hierarchical models are trees; network models are graphs.
- +Both legacy models are navigational.
- +The relational model is declarative and separates logic from storage.
- +Object and document models favor nested and flexible data.
Traps
- !Thinking a data model is the same as a file format.
- !Assuming the relational model cannot represent complex data.
- !Confusing network sets with relational tables.
Focus
- →Match each model to its structure.
- →Explain navigational versus declarative access.
- →Know one strength and one weakness of each model.
Check yourself
Before you turn the page.
Which model organizes records as a tree?
What is a key advantage of the relational model?