Lesson 4.10.1.1

4.10.1.1 Entity relationship modelling Quiz: AQA Computer Science, Unit 10

20 questions

In partnership with Revision Ninja

Lesson 4.10.1.1, Entity relationship modelling: 20 multiple choice questions for the AQA Computer Science (7517), Unit 10: Fundamentals of databases, written with Revision Ninja.

Host it live on the board and students join with a game code on their own devices, or revise alone with Free Play. The answers are revealed in the game.

Host this setFree Play

The 20 questions

  1. In an entity relationship diagram, what does an entity represent?

    • The unique identifier that the database uses to sort all of its rows in ascending order.
    • A thing or object about which data is stored, such as a customer or an order.
    • A single value held in one field of a record, such as a postcode stored for a customer.
    • The connection that links two tables together through a foreign key in a database.
  2. What is an attribute in an entity relationship model?

    • A rule that stops the same value from being entered twice in one column of a table.
    • A connection between two entities that shows how many instances of each are linked together.
    • A table that stores the links between two other tables in the same database system.
    • A property or piece of data that describes an entity, such as a customer's surname.
  3. In the notation Entity1 (Attribute1, Attribute2), what is underlined to show?

    • The attribute that has been removed from the entity but is kept for historical records.
    • The attribute that users search for most often when they query the database system.
    • The attribute whose value is calculated from the values of the other attributes.
    • The attribute or attributes that form the entity identifier, such as a primary key.
  4. What is a one-to-many relationship?

    • Many instances of the first entity are linked to many instances of the second entity.
    • One instance of the first entity is linked to many instances of the second, such as one customer placing many orders.
    • Each instance of the first entity has no link to any instance of the second entity.
    • Each instance of the first entity is linked to exactly one instance of the second entity.
  5. What is a one-to-one relationship?

    • Each instance of one entity is linked to many instances of the same entity.
    • Each instance of one entity is linked to any number of instances of the other entity.
    • Each instance of both entities is linked to a shared list of values held in one field.
    • Each instance of one entity is linked to exactly one instance of the other, such as one person having one passport.
  6. How is a many-to-many relationship normally implemented in a relational database?

    • By creating a third linking table that holds foreign keys referencing both entities.
    • By removing the primary key from both tables so that links can be made freely between any rows, without any identifier at all.
    • By storing every linked record as a repeated group within one table row.
    • By adding a single foreign key column to one of the two original tables only.
  7. A customer can place many orders, but each order belongs to one customer. Which relationship is this?

    • Many-to-many, because orders and customers can both be shared between customers.
    • No relationship, because orders and customers are stored in separate tables.
    • One-to-many, from customer to order.
    • One-to-one, because each customer is linked to exactly one order.
  8. Students enrol in many courses, and each course has many students. What is the relationship and how is it implemented?

    • One-to-many, implemented by storing the course name in the student record, so each student record lists every course they have taken.
    • Many-to-many, implemented with a linking table such as Enrolment that holds both keys.
    • One-to-one, implemented by giving each course one student only.
    • No relationship, because students and courses are unrelated entities.
  9. Which entity description is written in the correct form?

    • Book = ISBN, Title, Author, all stored as text fields.
    • Book [ISBN; Title; Author] with each field stored separately.
    • Book (ISBN, Title, Author)
    • Book: ISBN and Title and Author recorded in one row.
  10. A teacher teaches many classes, and each class has exactly one teacher. Which best describes this relationship?

    • Many-to-many, because a teacher can teach several classes at once.
    • One-to-many, from teacher to class.
    • One-to-one, because each class is linked to one teacher only.
    • No relationship, because teachers and classes are kept in separate tables.
  11. Which attribute is the best choice as the identifier for Student (StudentID, Name, DateOfBirth)?

    • Name, because names are always recorded in full for every student enrolled.
    • StudentID, because it is unique to each student and does not change.
    • DateOfBirth, because every student in the school has one recorded for them.
    • Name and DateOfBirth together, because they are always entered when a student joins.
  12. A Product entity has ProductID, Name and Price. A Supplier supplies many products, and each product has one supplier. What is this relationship?

    • One-to-many, from supplier to product.
    • Many-to-many, because a supplier can supply several products to several customers.
    • No relationship, because the product and supplier entities hold no shared data.
    • One-to-one, because each product can have only one supplier at any time.
  13. Customer (CustomerID, Name) and Order (OrderID, Date, CustomerID). Which attribute links Order to Customer?

    • Date in Order, because dates are used to find the customer's name.
    • OrderID in Customer, as the primary key used to link to every order.
    • CustomerID in Order, as a foreign key that refers to Customer.
    • Name in Order, as the foreign key that points to the customer table.
  14. Which is a valid way to resolve a many-to-many relationship between Actor and Film?

    • A Performance entity with no foreign keys, so that it can link to any actor or film.
    • A Performance entity with ActorID and FilmID as foreign keys, plus any attributes of the performance.
    • A Film entity that contains every actor's name stored in one long text field.
    • An Actor entity with a FilmID attribute that stores only one film for each actor.
  15. A customer may have zero orders. A customer can also have many orders. What does this imply for the relationship?

    • The relationship must be many-to-many, because customers can have many orders.
    • Each order must be linked to at least two customers in the Customer table.
    • Each customer must always have at least one order before the record can be stored in the database, so that a customer always has history.
    • The customer side allows zero or many orders, so a customer may exist without any order.
  16. A data model has Patient, Appointment and Doctor entities. Each appointment involves one patient and one doctor. Where should the foreign keys be placed?

    • In Doctor, which holds PatientID only, with no link to appointments.
    • No foreign keys are needed, because the three entities are kept in separate tables.
    • In Appointment, which holds PatientID and DoctorID as foreign keys.
    • In Patient, which holds AppointmentID and DoctorID as foreign keys.
  17. Evaluate: why can a many-to-many relationship in a data model not be implemented directly in a relational database?

    • Relational tables can only link records through foreign keys, so the link must be resolved using a linking table.
    • It prevents any attribute from being used as a key in any of the tables.
    • SQL requires every many-to-many relationship to be stored as a single text attribute.
    • It makes the database faster because it avoids the need for any joins between tables.
  18. Which attribute is the most appropriate identifier for a Vehicle entity with Registration, Make, Model and Colour?

    • Colour, because all cars of the same colour are grouped together in the database.
    • Registration, because each vehicle registration is intended to be unique to one vehicle.
    • Model, because every vehicle model has a unique year and colour assigned to it.
    • Make and Model together, because the user always enters both of these values for each vehicle.
  19. A customer can have several addresses, and an address can be shared by several customers. What structure is needed?

    • Two separate tables that each store the full name of the other customer.
    • A single Address table with the CustomerID repeated for every customer that uses it.
    • An extra attribute called Addresses inside the Customer entity that holds a list of values.
    • A linking entity, such as CustomerAddress, that holds CustomerID and AddressID.
  20. Which example best illustrates a one-to-one relationship?

    • A school and its many pupils, where each school enrols many pupils.
    • Students and courses, where each student takes many courses and each course has many students.
    • A country and its one capital city, where each country has exactly one capital.
    • A customer and the many orders placed by that customer over time.

All AQA Computer Science quizzes