Easier to read with cream paper, a tint, more contrast or larger text? Choose your colours and text, once, for every page.

Preview

AC 2.8: Reading and drawing entity relationship diagrams

This is the first page of the lesson. Read it and have a go at the activities. The rest is in the full lesson.

65 minutes

From a story to a picture

A librarian tells you: "We have members and books. A member can borrow many books over time, and a book is borrowed many times."

From that story you can draw the plan of the system. This lesson gives you steps to do it, and a way to read someone else's plan.

Key words

WordWhat it means
Entity relationship diagrama picture of the tables in a database and how they link, called an ERD
Entitya thing we keep facts about, drawn as a box
Attributeone fact about an entity, listed inside the box
Primary keythe field that gives every record its own unique id; underline it
Foreign keya field that points at a record in another table; put a star after it
Cardinalityhow many records link on each side: one or many
Link tablean extra table that turns a many-to-many link into two one-to-many links
Databasean organised store of tables that you can ask questions

The cells students fill in are left blank in this preview.

By the end of this lesson

Note

I can read an ERD, and draw or complete one from a description, with keys marked and cardinality shown.

Starter

Have a go

Starter

3 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

Read the diagram

Have a go

Read the diagram

5 questions
Have a go: your answers are marked here and then forgotten. Sign in if you would like your score kept, and to pick up where you left off.Sign in to keep your score

Your answers are marked here and are not kept. A college account keeps every student’s marks.

The lesson goes on

7 more parts of this lesson are in the full curriculum, with the tasks, the final check and the labs. A college account gives your students all of it.