3. Conceptual, logical and physical models
A data model is drawn at three levels: the business's concepts and how they relate, the logical entities with their attributes and keys, and the physical tables of one database. Each level answers a different question for a different reader.
The clip draws Harbour Mutual's customers, policies and claims three times. First as concepts, Customer, Policy and Claim, joined by named relationships. Then as logical entities, each with its attributes, its key and the foreign keys that carry the relationships. Then as physical tables for PostgreSQL, with each column's type. The boxes stay the same; what they say changes at each level.
The intuition: one house, three drawings
An architect draws a house three times. The sketch for the family shows rooms and how they connect: the kitchen opens onto the garden. The plan for the builder adds walls, doors and measurements. The working drawings for each trade add the pipe diameters and the cable types. All three describe one house; each is drawn for someone who must decide something.
Alex does the same with Harbour Mutual's data. When the claims director asks whether a claim can belong to two policies, Alex shows boxes and lines: Customer holds Policy, Policy has Claim. When a developer asks how to store a claim, Alex shows the attributes and keys. When the database administrator asks about indexes and types, Alex shows the physical tables. Showing a director the physical tables wastes the meeting; showing a developer only boxes leaves every decision open.
The levels also protect each other. If the claims system moves from SQL Server to PostgreSQL, the physical model changes and the logical one does not. If the business starts insuring pets, the concepts change, and the change flows down to the logical and physical models in a controlled way.
The theory: levels, independence and the entity-relationship model
The idea of levels comes from the ANSI/SPARC study group, which proposed in 1975 a three-schema architecture for databases: external schemas (each user's view), one conceptual schema (the whole organisation's data, independent of storage) and one internal schema (how the data is stored). Its goal was data independence: change the storage without changing the programs (physical independence), and add to the conceptual schema without breaking existing views (logical independence).
Modellers today use three similar levels, with slightly different names. The conceptual model shows the business concepts and how they relate, in the business's words, with few or no attributes. The logical model adds every attribute, its kind of value, the keys, and the relationships with their cardinality, usually in a normalised form; it is still independent of any one database product. The physical model is the logical model built for one technology: tables, column types, constraints, indexes, partitions and any deliberate redundancy for speed.
| Level | Shows | For | Changes when |
|---|---|---|---|
| Conceptual | Concepts, named relationships, scope | Business owners, the architect | The business changes what it does |
| Logical | Entities, attributes, keys, cardinality, normal form | Analysts, designers | What must be recorded changes |
| Physical | Tables, types, constraints, indexes, partitions | Engineers, database administrators | The technology or the workload changes |
Moving down the levels is called forward engineering: deriving a logical model from a conceptual one, then generating DDL (the SQL that creates tables) from the logical one. Moving up is reverse engineering: reading an existing database's tables to rebuild its logical model. Harbour Mutual's warehouse was never modelled; Alex reverse-engineers it first.
One logical model can have several physical models. Chapter 7 generates four from the same logical model (normalised, star schema, Data Vault and Delta tables), each right for a different use. A physical choice that copies data for speed is legitimate, as long as the logical model still says which copy is the truth.
Each level must trace to the next. Every logical entity should map to a concept, and every physical table to a logical entity. A table that traces to nothing is either a technical helper (a log, a staging area) or a sign that the models have drifted from the system.
Why it matters
Most arguments about data are level confusions. The claims director and the developer argue about whether a claim can have two policies; one is talking about the business rule, the other about a column. Naming the level ends the argument.
The levels are also how Alex keeps the merger manageable. The two companies' conceptual models are compared first (chapter 39): agree on what a customer is before mapping a single column.
Where it goes wrong
- Skipping the conceptual level. Starting with tables lets the first system's design decide what the business means.
- The physical model as the only model. Without a logical model, a change of database becomes a change of meaning nobody noticed.
- The conceptual model as a poster. Drawn once for a workshop and never kept in step with the systems.
- Too much detail too early. A conceptual model with every attribute is a logical model nobody can read.
- No traceability. When nothing links the levels, they drift apart until each tells a different story.
Check yourself
Choose an answer to each question, then press Check.
Sources
The works this page draws on, summarised in its own words rather than quoted. Read them for the full argument.
- ANSI/X3/SPARC Study Group on Database Management Systems, interim report (1975)The three-schema architecture (external, conceptual, internal) and the aim of data independence.
- P. P. Chen, "The Entity-Relationship Model: Toward a Unified View of Data", ACM Transactions on Database Systems 1(1), 1976Entities, relationships, attributes and cardinality.
- G. Simsion and G. Witt, Data Modeling Essentials, 3rd edition (Morgan Kaufmann, 2005)The modelling levels as practitioners use them, and forward and reverse engineering.
- DAMA International, DAMA-DMBOK, 2nd edition (2017)Data modelling and design as a knowledge area, and the conceptual, logical and physical levels.
Practise it
The chapters that put this theory to work on Harbour Mutual and Kestrel:
- Chapter 5: Conceptual models: the business in boxes
- Chapter 6: Logical models
- Chapter 7: Physical models: one logical model, four physical designs
- Chapter 39: Stage 2: Common meaning
The tools to try it in:
- Model studio · Draw conceptual, logical and physical models, generate DDL for PostgreSQL, Spark SQL and T-SQL, and run it on Harbour Mutual's data in your browser.
Terms taught here: Conceptual modelEntityRelationshipLogical modelCardinalityPhysical modelDDL