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

Higher Computing Science 2019 Question 13

12 marks · Analysis and evaluation

State two functional requirements of the relational database. The database has the following tables. Fundraiser Donation Sponsor fundraiserID name email donationID fundraiserID* sponsorID* date amount sponsorID name email Draw an entity-relationship diagram to show the relationships that exist in this database. Your answer should show the entity names and cardinality. Attributes are not required on the diagram. A sample of the data in each of the three tables is shown below. Fundraiser fundraiserID name email 1 Frazier Allston fallston@fastmail.co.uk 2 Axel Ginie aginie@freemail.com 3 Lucilia Hurworth lhurworth@cmu.edu … … Donation donationID fundraiserID sponsorID date amount DON0001 1 4 01/05/2019 25.00 DON0002 2 2 05/05/2019 10.00 DON0003 3 3 12/05/2019 10.00 DON0004 2 2 14/05/2019 25.00 DON0005 1 1 19/05/2019 5.00 DON0006 1 3 19/05/2019 10.00 DON0007 1 2 19/05/2019 15.00 DON0008 3 1 20/05/2019 15.00 … … Sponsor sponsorID name email 1 Mata Dwyer mdwyer@printfriendly.com 2 Evy Reymers ereymers@yolasite.com 3 Bob Towey btowey@behance.net 4 John Walker jwalker@clickbank.net … … Animal Help produces a report of the average donation made to each fundraiser. Write the SQL statement to produce the output shown below. fundraiserID Average donation (£) 1 13.75 2 17.50 3 12.50 Animal Help provides a report of the largest single donation made to each fundraiser. name Largest donation (£) Axel Ginie 25.00 Frazier Allston 25.00 Lucilia Hurworth 15.00 The following SQL statement is executed. SELECT name,COUNT(amount) FROM Fundraiser,Donation WHERE Fundraiser.fundraiserID = Donation.fundraiserID When tested, the actual output did not match the expected output. Identify the three errors in the above SQL statement. Error 1 Error 2 Error 3 When people make donations their payment details must be kept secure. Describe how encryption is used to ensure the secure transmission of data. A charity called Animal Help has a website that allows people to raise funds through sponsorship. Details entered are stored in a relational database. Fundraisers can see their total donations from all of their sponsors and Animal Help can view the funds being raised on their behalf.

Marking scheme

• (A query to) display the total donations made to each fundraiser • (A query to) allow the charity to display total donations made • (A query to) display the total donations from a sponsor(s) • (A query to) display the total donations from a fundraiser(s) • (A query to) insert new fundraisers/sponsors or make a new donation 1 mark for each bullet Maximum 2 marks • Select clause with fundraiserID field and average aggregate function with amount field • Alias (allow missing £ sign) and From • Group by fundraiserID 1 mark for each bullet Example: SELECT fundraiserID, AVG(amount) As ‘Average Donation (£)’ FROM Donation GROUP BY fundraiserID Do not penalise use of extra table • Aggregate function should be MAX(amount) • No alias implemented (Largest donation (£)) • Should have a Group By (Fundraiser.)name 1 mark for each bullet • Public key encrypts the data • Private key decrypts the data 1 mark for each bullet 1 mark for the concept of encrypt and decrypt without assigning to appropriate keys

Previous question: Higher Computing Science 2019 Question 12

Next question: Higher Computing Science 2019 Question 14