BORING EDUCATION — LIVE EXPERIMENTProduct is live. Experiments are running. Feedback is being collected. Improvements are underway.Welcome to Boring Education. We're glad you're here while we're figuring out how to make learning better.
BORINGEDUCATION

1.3bFree

Three database models: tree, web and tables

Your guide: Miss HiraExplains computers with chai, cricket and your phone.

The problem

In a college, each teacher reports to one head of department: a neat tree. But a teacher teaches several sections, and each section has several teachers: that is no longer a tree. How should a database draw these links?

The book describes three logical models. Each one answers a single question differently: how many parents may one entity have, and what connects them?

Hierarchical: an organizational chart or inverted tree, where each entity has only one parent and the top is the root. Network: an entity may have many parents, so it is more flexible. Relational: simple tables with no physical links; relationships come from matching data values.

Step 1 / 7

Notes, short questions and MCQs

Read the full notes: key terms, model answers and MCQs with answers

The problem

In a college, each teacher reports to one head of department: a neat tree. But a teacher teaches several sections, and each section has several teachers: that is no longer a tree. How should a database draw these links?

The book describes three logical models. Each one answers a single question differently: how many parents may one entity have, and what connects them?

Hierarchical: an organizational chart or inverted tree, where each entity has only one parent and the top is the root. Network: an entity may have many parents, so it is more flexible. Relational: simple tables with no physical links; relationships come from matching data values.

Key terms

Data model
A collection of concepts used to describe the structure of a database: which entities exist and how they are related.
Hierarchical model
Shaped like an organizational chart. Each entity is subordinate to one entity above it, like an employee with one boss. The top entity is the root.
Network model
Like the hierarchical model, but an entity may take part in as many subordinate relationships as needed. More complex diagrams, more flexibility.
Relational model
A collection of simple files or relations with no structural or physical connections. Relationships come from the data content itself, not from pointer chains.

Short questions with model answers

  1. Q1. Name the model: (a) Principal → HODs → teachers, each teacher with one HOD. (b) Teachers linked to many sections, sections to many teachers. (c) Two tables joined by the same roll number.

    • (a) hierarchical
    • (b) network
    • (c) relational

    hierarchical · network · relational

  2. Q2. In the book's network diagram, list the parents of Entity-4 and Entity-6.

    • Entity-4 ← Entity-1, Entity-2
    • Entity-6 ← Entity-2, Entity-4

    Each has two parents

  3. Q3. Students(Roll, Name, SectionID) has the row (12, Ali, B). Sections(SectionID, Room) has the rows (A, 7) and (B, 12). Which room is Ali in?

    • Students: SectionID = B
    • Sections: B → Room 12

    Room 12

Common mistakes

  • ✗ Drawing an entity with two parents in a hierarchical model.

    ✓ In a hierarchy each entity reports to only one entity above it. Two parents make it a network.

  • ✗ Placing the root at the bottom of the inverted tree.

    ✓ It is called inverted because the root is at the top, like the head of an organizational chart.

  • ✗ Saying relational tables are linked by pointers.

    ✓ The relationships are based on the data content of the entities, not pointer chains or other structural connections.

MCQs

  1. 1. A collection of concepts used to describe the structure of a database is a:

    1. (a) data warehouse
    2. (b) data model
    3. (c) data structure
    4. (d) data type
    Show answer

    (b) A data model describes the entities and how they relate.

  2. 2. The hierarchical data model has the general shape of a(n):

    1. (a) organizational chart
    2. (b) table
    3. (c) circle
    4. (d) web
    Show answer

    (a) It looks like an organizational chart, an inverted tree with the root at the top.

  3. 3. In which model can an entity have more than one parent?

    1. (a) hierarchical
    2. (b) network
    3. (c) sequential
    4. (d) none
    Show answer

    (b) Network entities may take part in as many subordinate relationships as desired.

  4. 4. Relationships in the relational model are based on:

    1. (a) pointer chains
    2. (b) physical connections
    3. (c) the data content
    4. (d) the root entity
    Show answer

    (c) Matching values in the data link the tables, as SectionID links Students and Sections.

  5. 5. True or false: the network data model is more popular and widely used than the relational model.

    1. (a) True
    2. (b) False
    Show answer

    (b) False. Relational databases, such as Microsoft Access, are the most widely used, and the book notes they are easier to change.

Quick revision

  • Hierarchical: an inverted tree with a root at the top; every entity has exactly one parent.
  • Network: entities may have many parents, giving more flexibility than a simple hierarchy.
  • Relational: simple tables with no physical links; relationships come from matching data values.