All subjects · Information Technology · WIT11 2 hour written exam on IT systems, networks and data

Entities, relationships and entity relationship diagrams

Edexcel IAL Information Technology · WIT11 2 hour written exam on IT systems, networks and data

Spec points 5.2.3 and 5.2.4: entities and one-to-one, one-to-many and many-to-many relationships, and interpreting and creating entity relationship diagrams (ERDs). The sample paper had a 9-mark ERD. In June 2025 most candidates scored 8 or more marks on the ERD question, but the one-to-one relationship mark was rarely awarded.

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Entities and relationships

An entity is a thing about which data is stored (Customer, Order, Product); each becomes a table. A relationship is a link between entities.

Drawing an ERD

1. Draw a box for each entity, named in the singular.

2. Draw a line for each relationship between related entities.

3. Show the relationship type with consistent notation: 'one' and 'many' symbols (for example crow's foot, where the forked end is the many side), or labels 1 and M. Pearson's sample mark scheme accepts any consistent notation and logical abbreviations.

4. List each entity's fields, underlining primary keys and marking foreign keys with an asterisk.

5. Check: every M:M resolved with a link table; every foreign key matches a primary key; nothing left unconnected.

Example: a shop

Entities: Staff(staffID, name), Customer(customerID, name, email), Sale(saleID, date, customerID*, staffID*), Product(productID, description, price), Sale_detail(saleID*, productID*, quantity).

Relationships: Customer 1:M Sale; Staff 1:M Sale; Sale 1:M Sale_detail; Product 1:M Sale_detail. Sale_detail's primary key is the composite saleID + productID, and each is also a foreign key.

Worked example

Students can join many clubs and each club has many students. Show how this is implemented.

  1. The relationship Student to Club is many-to-many.
  2. Create a link table Membership(studentID*, clubID*, dateJoined).
  3. Its primary key is the composite studentID + clubID.
  4. Student 1:M Membership and Club 1:M Membership.

Answer: A Membership link table with composite key studentID + clubID turns M:M into two 1:M relationships.

Key idea: Entities become tables. 1:1, 1:M (foreign key on the many side), M:M (resolve with a link table whose composite key is the two foreign keys). ERDs: entity boxes, lines, consistent one/many notation, keys marked.

Check yourself

  1. One teacher teaches many classes, each class has one teacher. What relationship is Teacher to Class?
    • One-to-one
    • Many-to-many
    • One-to-many
    • No relationship
    Show answer

    One-to-many. One teacher, many classes.

  2. How is a many-to-many relationship implemented in a relational database?
    • With a link table holding the primary key of each table as a foreign key
    • By putting a list of IDs in one field
    • By merging the two tables into one
    • It cannot be stored at all
    Show answer

    With a link table holding the primary key of each table as a foreign key. The link table creates two one-to-many relationships.

  3. In a one-to-many relationship between Customer and Order, where does the foreign key go?
    • In Customer (the one side)
    • In a third table only
    • In Order (the many side)
    • In a separate database
    Show answer

    In Order (the many side). Each order records its one customer.

  4. Each country has one capital city and each capital belongs to one country. What relationship is this?
    • One-to-many
    • One-to-one
    • Many-to-many
    • Many-to-one
    Show answer

    One-to-one. One on each side.

  5. In Sale_detail(saleID*, productID*, quantity), what is the primary key?
    • quantity
    • saleID alone
    • productID alone
    • The composite of saleID and productID
    Show answer

    The composite of saleID and productID. A sale has many products and a product appears in many sales, so only the pair is unique.

  6. Explain why a link table is needed between Book and Author when a book can have several authors and an author can write several books.
    Show answer

    The relationship is many-to-many, which cannot be stored directly, so a link table holding bookID and authorID as foreign keys turns it into two one-to-many relationships.. Identify M:M and what the link table does.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.