Back to Topic 3.2 — Database design
3.2.2Computer Science SL5 flashcards

ERDs

Practice Flashcards

Flip to reveal answers
Card 1 of 53.2.2
3.2.2
Question

What does an ERD show?

Click to reveal answer

Track your progress — Sign up free to save your progress and get smart review reminders based on spaced repetition.

All 5 Flashcards — ERDs

Sign up free to track progress and get spaced-repetition review schedules.

Card 1definition

Question

What does an ERD show?

Answer

The entities a database stores and the relationships between them. Each box is one kind of thing that will become a table; each line is a relationship, labelled with the verb joining them.

Card 2comparison

Question

What is the difference between cardinality and modality?

Answer

Cardinality is how many — one or many, drawn as a bar or a crow's foot. Modality is whether the relationship is compulsory — mandatory drawn as a second bar, optional as a circle.

Card 3process

Question

How do you work out a relationship's cardinality?

Answer

Say it as a sentence in both directions. 'A teacher teaches many classes' and 'a class is taught by one teacher' together give one-to-many, with the crow's foot on the Class end.

Card 4concept

Question

Why must a many-to-many relationship be resolved?

Answer

A column holds only one value, so neither table can hold several foreign keys. It is replaced by a linking entity with one row per pair, keyed on both foreign keys together.

Card 5concept

Question

Where does the foreign key go in a one-to-many relationship?

Answer

In the table on the many side. A Class holds TeacherID, because the alternative would need a Teacher row to hold an unknown number of class columns.

Track your progress with spaced repetition

Sign up free — Aimnova tells you exactly which cards to review and when, so you remember everything before your IB exam.

Start Free