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

N5 Computing Science 2025 Question 15

8 marks · Entity-relationship diagrams and keys

Complete the entity relationship diagram by: • identifying the key attributes • drawing the relationship between the entities • naming the relationship. bandRef bandName cost Band numMembers genre eventName bandRef venue date Event eventID bookingEmail The database has been created. Sample data from each table is shown below. Band bandRef bandName cost numMembers genre RW172 Ross Wonder 1500 2 Rock ML435 Of Men and Lions 1250 5 Country BP908 Brightplay 2200 6 Rock LP241 Les Pencils 1800 2 Pop BB456 The Bright Brothers 1300 3 Electronic ME243 Miceica 2000 4 Country SI746 20 Seconds to Irvine 1100 5 Folk … … … … … Event eventID eventName date bandRef venue bookingEmail 1215 Paterson Wedding 10/04/2026 ML435 Lakeside Lodge steph@zmail.com 1318 Charity Ball 25/09/2025 RW172 The Old Poet jgritchie@cmail.com 1154 Oscar’s Luau 11/08/2025 ME243 The Old Poet YFang131@mail.com 1089 Award Ceremony 05/12/2025 SI746 Driftwater JThom@zmail.com 1706 Hogmanay Dance Off 31/12/2025 BB456 The Unicorn handD@mail.com 2011 Afternoon Tea 26/03/2026 BP908 The Old Poet andyCliff@cmail.com … … … … … … Complete the SQL statement below that will display the name of any country band playing at ‘The Old Poet’ and the date of the event. SELECT FROM WHERE Customers’ personal details have been stolen. State one requirement of the UK General Data Protection Regulation (GDPR) that the company should have implemented to prevent this from happening. A band booking company has a range of bands that can be booked for various events. It wants a database to store information on bands and their bookings. A band can play more than one event. An event can only have one band. When a band is being booked for an event the form below is completed. Event Name Date Venue E-mail Submit Please use the form below to book your band of choice. Band Ross Wonder More Info RW172 - Ross Wonder Genre is rock. Price is £1500 Has 2 members When the band has been booked, the following e‑mail is sent to the organiser. Congratulations. You are all booked. You have been given the exclusive event ID 1318. Ross Wonder is looking forward to playing at your event.

Marking scheme

• identify keys: - PK eventID, bandRef - FK bandRef in Event • 1:M from Band to Event • naming the relationship See diagram below. • SELECT bandName, date FROM Band, Event • WHERE Band.bandRef = Event.bandRef • AND genre = "Country” • AND venue = "The Old Poet" SELECT • fields can be in any order • do not award a mark if additional fields have been included FROM • table names can be in any order WHERE • order of search conditions and equi-join could change Quotes not required. • data must be held securely • prevent unauthorised access Award 1 mark for any one bullet. Must be a GDPR requirement.

Previous question: N5 Computing Science 2025 Question 14

Next question: N5 Computing Science 2025 Question 16