ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions

AH Computing Science 2024 Question 7

5 marks · Entity-relationship diagrams

State whether the Actor and Role entities are strong or weak. Describe the relationship participation between the Actor and Role entities. The genre field of the Movie table can have the values Horror, Comedy or Action. Using these data values, write the SQL clause that would be part of the CREATE statement required to correctly implement the genre field of the Movie table. Details of actors, roles and movies are stored in three database tables as shown below. Actor actorID surname firstName dateOfBirth nationality Role roleNumber actorID* movieID* Movie movieID title genre director rating The entity-occurrence diagram below shows the Actor and Role entities. Actor Role • 437263 SJ2345 • • 439208 GD5678 • • 441034 AL8901 • • 442239 • 442641

Marking scheme

Actor is a strong entity. Role is a weak entity. 1 mark for both correct. An actor may or may not have a role in one of the movies. This means that the entity Role has optional participation in the relationship. A role must be assigned to one specific actor. This means that the Actor entity has mandatory participation in the relationship. 1 mark for accurate description of relationship participation. 1 mark for correct use of optional and mandatory terminology. genre varchar(6) CHECK (genre IN ('Horror', 'Comedy', 'Action')) 1 mark for correct use varchar(6) with CHECK 1 mark for correct use of IN Notes: • field size must be between 6 and 20 characters • Do not accept OR instead of IN

Previous question: AH Computing Science 2024 Question 6

Next question: AH Computing Science 2024 Question 8