Database Models Comparison
| Feature | Hierarchical Model | Network Model | Relational Model | Object-Oriented Model |
| Structure | Tree-like structure | Web-like structure (graph) | Tables with rows & columns | Objects with data & methods |
| Relationship | One-to-many (parent-child) | Many-to-many | Flexible, using keys | Complex relationships |
| Analogy | Family Tree 🌳 | Spider’s Web 🕸️ | Excel Spreadsheets 🧾 | Real-world Objects 🚗 |
| Key Advantage | Fast for specific queries | More flexible than Hierarchical | Very flexible & easy to use | Handles complex data well |
| Key Disadvantage | Very rigid, can’t do many-to-many | Can be very complex | Slower for some queries | Not widely used for business |
| Examples | File systems, IBM Information Management System (IMS) | Integrated Data Store (IDS), IDMS | MySQL, PostgreSQL, Oracle | GemStone, ObjectDB |
Quick Notes:
- Hierarchical and Network Models are older models focusing on rigid structures.
- Relational Model is widely used and supports SQL.
- Object-Oriented and Document Models are ideal for modern applications.
- Graph and Time-Series Models are specialized for specific use cases like relationships and logs.
MCQ
Which database model organizes data in a tree-like structure with parent-child relationships?
A) Relational Model
B) Hierarchical Model
C) Network Model
D) Graph Model
Answer: B
In which database model are relationships defined using primary and foreign keys?
A) Network Model
B) Document Model
C) Relational Model
D) Key-Value Model
Answer: C
Which database model is best suited for applications requiring many-to-many relationships?
A) Hierarchical Model
B) Network Model
C) Key-Value Model
D) Columnar Model
Answer: B
In the Document Model, data is commonly stored in which formats?
A) CSV and TSV
B) JSON and XML
C) PDF and TXT
D) SQL and HTML
Answer: B
Which database model is best for unstructured or semi-structured data?
A) Relational Model
B) Document Model
C) Hierarchical Model
D) Network Model
Answer: B
For a social network application, which database model is most suitable to represent relationships?
A) Graph Model
B) Relational Model
C) Key-Value Model
D) Columnar Model
Answer: A
Which database model is optimized for analytics and large-scale queries?
A) Columnar Model
B) Key-Value Model
C) Time-Series Model
D) Object-Oriented Model
Answer: A
Which of the following database models is commonly used for caching due to its simplicity and speed?
A) Document Model
B) Relational Model
C) Key-Value Model
D) Graph Model
Answer: C
In the Hierarchical Model, each child node:
A) Can have multiple parents
B) Can have only one parent
C) Cannot have any parent
D) Has no restrictions on relationships
Answer: B
Which database model stores data as objects with attributes and methods?
A) Object-Oriented Model
B) Columnar Model
C) Document Model
D) Time-Series Model
Answer: A
Which database model is specifically designed to handle geographic and spatial data?
A) Time-Series Model
B) Spatial Model
C) Relational Model
D) Document Model
Answer: B
For metrics and logs organized by timestamps, which database model is most appropriate?
A) Graph Model
B) Time-Series Model
C) Network Model
D) Key-Value Model
Answer: B
