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

AH Computing Science 2022 Question 8

15 marks · Feasibility studies and user surveys

Part of the booking process requires a new customer to register before making an appointment. When registering, customers must provide their full name and contact telephone number. Name the type of feasibility study that is highlighted in the requirements for this part of the booking system. Justify your answer. Part of the use case diagram for the website is shown. browse site register user make appointment modify registered appointment user Describe the relationship between the actors in this diagram. The attributes in each of the four entities required in the booking system are listed below. Customer (cLastName, cFirstName, contactNumber, customerID) Appointment (appDate, appTime, customerID*, stylistID*, treatmentID*) Stylist (stylistID, sLastName, sFirstName, ratePerHour) Treatment (treatmentID, description, price) When making an appointment, a customer must select the type of treatment required but can choose a particular stylist or leave the attribute stylistID in the entity Appointment blank for the details to be assigned later. Draw an entity‑relationship diagram to represent the tables in the booking system. You should indicate: • the name of each entity and relationship • whether each entity is strong or weak • whether relationship participation is mandatory or optional • the cardinality of each relationship. Once the tables have been created correctly, sample test data is stored in the tables. The incomplete SQL query shown below will be used to display the full name of all the stylists who have provided at least three hair colouring treatments in the months of April and May 2022. SELECT sLastName, sFirstName FROM Appointment, Treatment, Stylist WHERE description = "Hair colouring" AND appDate AND Appointment.stylistID = Stylist.stylistID AND Appointment.treatmentID = Treatment.treatmentID GROUP BY sLastName, sFirstName A '2022-04-01' AND '2022-05-31' B ; State the missing operator and clause labelled A and B. A query to list the customers who are due to be treated by the stylists with stylistID 2, 5 or 7 is being designed. One possible design of this query is shown. Search criteria Fields(s)/ calculations Customer last name, customer first name, contact number Table(s) quer(‑ies) Customer C Inner query Fields(s)/ calculations customerID Appointment Search criteria D Table(s) State the missing search criteria labelled C. The missing search criteria labelled D applies to a subquery. Describe how the logical operator IN could be used in the implementation of the search criteria for the subquery. Test data in the Customer and Appointment tables is shown below. Customer cLastName cFirstName contactNumber customerID Smith John 01632774488 1 Ali Muhammad 01632776655 2 McMillan Arthur 07709223344 3 Doherty Lesley 07141189100 4 Appointment appDate appTime customerID stylistID treatmentID 2022‑01‑10 09:00:00 1 1 2022‑31‑12 09:00:00 2 1 1 2022‑02‑01 16:00:00 2 2 1 2022‑01‑10 14:00:00 1 3 2 The test plan for the database includes the following query. Query Expected output SELECT cFirstName, cLastName FROM Customer, Appointment WHERE Customer.customerID = Appointment.customerID AND stylistID NOT LIKE "*"; State the expected output of this query and explain your answer. Once developed, all aspects of the website will be tested. The test plan for the completed website includes the persona and test case described below. Persona Test Case Lesley is a 27‑year‑old who likes to make regular bookings to have her hair coloured every 12 weeks. Log on to the system using customer ID 4. Make a booking for a hair colouring treatment on 22nd July 2022 and a follow‑up booking 12 weeks later. Some screen shots resulting from this section of testing are shown below. introductory screen APPOINTMENT BOOKING LOG ON REGISTER Log in using your customer ID Users must register before or your contact number. booking any treatment. Adding payment details is optional. appointment date APPOINTMENT BOOKING 22 Jul 2022 Leave blank if no preference Treatment required BOOK CLEAR CANCEL treatment APPOINTMENT BOOKING 22 Jul 2022 Leave blank if no preference Treatment required Trim Hair Colouring BOOK Cut CLEAR CANCEL Welcome Lesley Welcome Lesley Date of Appointment Date of Appointment Stylist Available Stylist Available Name and describe the type of testing illustrated above. Explain whether the solution shown is fit for purpose. Hair by Harvey is a hair salon. A team of developers is creating a database‑driven website to allow customers to book appointments for treatments at the salon.

Marking scheme

Legal feasibility The description makes refers to personal data that would be stored by the system and this has an implication for GDPR. 1 mark for correct type of feasibility with reason Note: mark should not be awarded if no justification is provided This shows that the Registered User actor is a form of the User actor and will inherit all of its characteristics. 1 mark for the correct description ER Diagram – see below for solution 1 mark for strong entities correct 1 mark for weak entities correct 1 mark for two mandatory relationships correct (Appointment → Customer and Appointment → Treatment) 1 mark for four optional relationships correct (Customer → Appointment, Appointment → Stylist, Stylist → Appointment and Treatment → Appointment) A: BETWEEN B: HAVING COUNT(*)>=3; 1 mark for BETWEEN operator 1 mark for HAVING with COUNT customerID = ANY 1 mark for correct condition IN would be used in the search criteria to specify the ID of the stylists. For example: stylistID IN (2, 5, 7) 1 mark for correct description of use of IN Accept correct code as alternative to description Query Output: John Smith Explanation: For example: The query will select the only record from the Appointment table that has no entry in the stylistID field. This record has a customerID of 1 which matches the customer name in the expected output. 1 mark for query output 1 mark for explanation of how this output would be generated. During final testing, all tasks required to satisfy the test case are carried out by one of the development team who adopts the persona described. 1 mark for final testing 1 mark for description The solution shown is not fit for purpose because there is no option to make a follow-up booking so each booking needs to be made individually. The solution shown is fit for purpose since it is possible to book a follow- up appointment by making an entirely new appointment. 1 mark for indicating that solution is not fit for purpose together with a supporting reason OR 1 mark for indicating that solution is fit for purpose together with a supporting reason

Previous question: AH Computing Science 2022 Question 7

Next question: AH Computing Science 2022 Question 9