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

Higher Computing Science 2024 Question 11

4 marks · Analysis and evaluation

Some of the end‑user requirements described by the gym staff are to find and display the: • number of classes run by each instructor • name of the member who attends the most classes • name and address of any member who attends more than five classes per week • total cost of all the classes attended by a member. Using the end‑user requirements above, identify one functional requirement of the relational database. State an aggregate function that would be needed when implementing the functional requirement identified in part (i) above. The following sample data shows: • instructors and the classes that they run • members and the classes that they attend. Instructor Class Ins1 Class1 Ins2 Class4 Ins3 Class2 Ins3 Class3 Member Class Mem1 Class2 Mem2 Class2 Mem3 Class1 Mem1 Class3 Mem2 Class4 Using this sample data, complete an entity‑occurrence diagram. Your diagram should include the: • name of the entities • instances for each entity • association between these instances. A gym would like to make use of a relational database.

Marking scheme

• Create a query to COUNT /calculate the number of classes run by each instructor • Create a query to COUNT/find MAX/search for the member(s) who attends the greatest number of classes • Create a query to COUNT/search for the member(s) who attend more than 5 classes • Create a query to SUM/calculate the total cost of a member’s classes Award 1 mark for any one bullet • COUNT (bullet 1 or 3) • COUNT/MAX (bullet 2) • SUM (bullet 4) Award 1 mark for any one bullet Function stated must match to the requirement identified in part (i) • Entity and instance names • Correct associations between instances Diagram may be reversed Example answer:

Previous question: Higher Computing Science 2024 Question 10

Next question: Higher Computing Science 2024 Question 12