0 · Recall Warm-up
Answer from memory first. Answers are in the Answer Vault at the bottom.
- What does physical data independence protect, and from what? from Lesson 0.1.3
- Which is harder: logical or physical data independence? from Lesson 0.1.3
- What is metadata, and where does a DBMS keep it? from Lesson 0.1.2
1 · The Hook
Before building a house, an architect first draws a sketch the family can understand: "three bedrooms, kitchen next to the dining room". Then come engineering drawings with wall thicknesses. Finally the builders work out which bricks and pipes go where.
Database design works the same way. Different stages need different languages for describing data: one that people can discuss, one that a DBMS can implement, and one for disk details. Each such language is a data model.
2 · Predict First
The college says: "Each student belongs to one department; a department has many students." Which is the better first step: (a) decide immediately how student records will be laid out on disk, or (b) draw a picture of students, departments and the "belongs to" link? Why?
Make a guess in your head. The answer opens Section 3.
3 · Core Concept
Predict First — the answer
(b). First capture what the college needs in a form the college staff can check, without any technical detail. Storage layout comes last. This picture is a conceptual model, and the standard picture language for it is the ER model (Phase 1).
Data model
A data model is a set of concepts used to describe the structure of a database: what kinds of things are stored, how they are connected, and what rules hold. Most data models also include basic operations for reading and changing data.
Three kinds of data model
| Kind | Level of detail | Audience | Examples |
|---|---|---|---|
| Conceptual (high-level) | Things and connections, as users think of them. No implementation detail. | Users, designers | Entity–Relationship (ER) model |
| Representational (logical, implementation) | Concepts users can understand that a DBMS can also implement directly. | Designers, programmers | Relational model (tables), older network and hierarchical models |
| Physical (low-level) | How data is stored: record formats, ordering, access paths. | DBA, DBMS | File organisations, indexes |
Where ER and relational fit: the design process
- Requirements collection: talk to users; write down what data and which operations they need.
- Conceptual design: draw the ER diagram (Phase 1). The college can read and check it.
- Logical design: convert the ER diagram to a relational schema, a set of tables (Phase 2, Lesson 2.4.x).
- Refinement: check the tables for redundancy and fix them by normalisation (Phase 4).
- Physical design: choose file organisations and indexes (Phase 5).
This is also the order of this course. Phases 1 to 5 follow the design process from picture to disk; Phase 3 teaches how to ask questions of the tables, and Phase 6 how many users can use them safely at the same time.
Connection to the three-schema architecture
The conceptual schema of Lesson 0.1.3 is usually written in a representational model (relational tables in practice). The ER diagram is the designer's drawing of it. The internal schema is written in physical-model terms.
4 · Visual
The design process; each step uses a lower-level data model.
5 · Worked Examples
Example 1 Easy
Name the kind of data model: (a) ER model; (b) relational model; (c) "student records stored sorted by roll number with an index on dept".
Solution
(a) conceptual; (b) representational (logical); (c) physical.
Example 2 Medium
Put in design order: normalisation, ER diagram, choosing indexes, relational tables, requirement interviews.
Solution
Requirement interviews → ER diagram → relational tables → normalisation → choosing indexes.
Example 3 GATE
"The ER model is used to specify the logical design implemented directly by the DBMS." True or false?
Solution
False. The ER model is a conceptual model for design and discussion. DBMSs implement representational models such as the relational model; the ER diagram is converted into tables before implementation.
6 · GATE Traps
- ER is conceptual; relational is representational (logical). A DBMS implements the relational model, not ER diagrams.
- "Logical model" can mean the representational model (relational). Do not confuse it with the "logical level" naming of the conceptual schema; the context tells which is meant.
- Physical design (indexes, file layout) comes last.
7 · Memory Hook
"Sketch, Plan, Build." Sketch = ER (conceptual), Plan = tables (relational), Build = disk (physical).
8 · Connect the Dots
Lesson 0.1.3 gave three schema levels; this lesson gave the languages (data models) used to write them, and the design process that runs from an ER sketch to disk. Before drawing ER diagrams we need a small math toolkit; the relational model is built on sets, which come next in Chapter 0.2.
9 · Self-Test
GATE format. Try every question before opening the vault.
Q1 · MCQ · 1 mark(s) — Data models
The Entity–Relationship model is a:
- (A) physical data model
- (B) storage format
- (C) query language
- (D) conceptual (high-level) data model
Q2 · MCQ · 1 mark(s) — Data models
Which model is implemented directly by most modern DBMSs?
- (A) Relational model
- (B) Physical model
- (C) ER model
- (D) Flowchart model
Q3 · MCQ · 1 mark(s) — Design process
Which step comes immediately after conceptual design?
- (A) Normalisation
- (B) Physical design
- (C) Logical design (ER to tables)
- (D) Requirements collection
Q4 · MSQ · 2 mark(s) — Data models
Which belong to the physical level?
- (A) Choosing an index on roll number
- (B) Deciding that each student belongs to one department
- (C) Storing records sorted by roll number
- (D) Drawing a "belongs to" link between STUDENT and DEPARTMENT
Q5 · NAT · 1 mark(s) — Design process
Number the steps: requirements = 1, conceptual design = 2, … What number is physical design?
Numerical answer: ________
10 · Rule Card
- Data model = concepts for describing data structure, connections, rules (and operations).
- Conceptual (ER) → representational/logical (relational) → physical (files, indexes).
- Design process: requirements → conceptual (ER) → logical (tables) → refinement (normalisation) → physical.
- DBMSs implement the relational model; ER diagrams are converted to tables.
11 · Concept Ledger
Unlocked in this lesson. From here on, these terms may be used.
data modelconceptual data modelrepresentational (logical) data modelphysical data modelER model (to be taught)relational model (to be taught)database design processnormalisation (to be taught)
12 · Answer Vault
Reveal answers when you’re ready
Recall Warm-up
- It protects the conceptual schema from changes to the internal schema.
- Logical.
- Data about data (structure, types, rules), kept in the catalog.
Self-Test
Q1 Answer: (D) · 1 mark(s)
ER is used for conceptual design.
- (A) is wrong: It has no storage detail.
- (B) is wrong: It is a model, not a format.
- (C) is wrong: It does not query data.
Re-read: Lesson 0.1.4 — Data models: conceptual vs logical vs physical; where ER and relational fit
Q2 Answer: (A) · 1 mark(s)
DBMSs implement the relational model; ER is converted to it.
- (B) is wrong: Physical describes storage, not what users query.
- (C) is wrong: Conceptual only.
- (D) is wrong: Not a data model.
Re-read: Lesson 0.1.4 — Data models: conceptual vs logical vs physical; where ER and relational fit
Q3 Answer: (C) · 1 mark(s)
Requirements → conceptual → logical → refinement → physical.
- (A) is wrong: Comes after the tables exist.
- (B) is wrong: Comes last.
- (D) is wrong: Comes before.
Re-read: Lesson 0.1.4 — Data models: conceptual vs logical vs physical; where ER and relational fit
Q4 Answer: (A) (C) · 2 mark(s)
Indexes and record ordering are storage decisions. B and D are conceptual.
- (B) is wrong: A requirement about the data, not storage.
- (D) is wrong: Part of the ER (conceptual) model.
Re-read: Lesson 0.1.4 — Data models: conceptual vs logical vs physical; where ER and relational fit
Q5 Answer: 5 · 1 mark(s)
Requirements (1), conceptual (2), logical (3), refinement/normalisation (4), physical (5).
Re-read: Lesson 0.1.4 — Data models: conceptual vs logical vs physical; where ER and relational fit