DSA Factory
Free Keys, ER and normalization lessonsKeys, ER and normalization · Stage 1 · Modelling the real world · Step 1

Entities, relationships and cardinality

Turn a description of a business into entities, attributes and relationships, and read one-to-many and many-to-many correctly. About 13 minutes.

Quick check

A hospital rule: a doctor may treat many patients over time, and a patient may be treated by many doctors. Where should the date of a treatment be stored?

  1. AOn the treatment relationship, since it belongs to a (doctor, patient) pair
  2. BOn the doctor
  3. COn the patient
Show the answer

On the treatment relationship, since it belongs to a (doctor, patient) pair. The date depends on both together, not on either alone.

Lock it in

4 questions on this idea

Short questions that apply the idea to new cases: trace it, work out a number, put steps in order. A wrong answer explains itself.

Answer them in your browserFree account, no card. Your progress is saved, and the idea comes back in a quick review later.
Sign up free to solve