Draw it before you build it
A builder draws a plan before the first brick. A programmer draws the data before the first line of code.
A good drawing lets a team agree in five minutes. Without it, they talk for an hour and still disagree.
Today you draw all three data models.
Key words
| Word | What it means | Example |
|---|---|---|
| Block | A box in a drawing. It shows one item. | A box with Coach A in it |
| Arrow | A line with a point. It joins one block to another. | Coach A to Sam |
| Label | Words on a block or arrow that say what it is. | 5 min |
| Parent | The block that an arrow comes from. It is above its child. | Head teacher |
| Child | The block that an arrow points to. | Head of Science |
| Hierarchical model | A tree. Every item has one parent. | Folders |
| Network model | A web. An item can have many parents. | Bus routes |
| Relational model | Tables linked by keys. | Clubs and members |
| Key | A column that links a row to a row in another table. | club_id |
| Row | One record in a table. | 1, Sam, 1 |
| Column | One kind of fact in a table. | name |
The cells students fill in are left blank in this preview.
Quick check: read the drawing
Have a go
Quick check: read the drawing
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Rules for trees and webs
Draw one block for each item. Draw an arrow for each link. Put a label on a block to name it. Put a label on an arrow to say what the link means.
In a tree, arrows go from parent to child, and each block gets one arrow in. In a network, a block can get many arrows in. In the bus map below, a bus goes from the start of an arrow to its point. School gets two arrows in.
Rules for tables
A relational model is drawn as tables. Write the name of the table on top. Put the columns across the top row. Put each record in one row below.
Mark the key column. It links a row to a row in the other table. Look at the two tables below. In the members table, club_id 1 points to Chess.