ExamBank Scot · AH Computing Science question bank · All AH Computing Science questions
15 marks · Maintenance
Name the type of maintenance required. The project manager creates a Gantt chart to plan the development work that will be needed. The design section of the Gantt chart is shown below. Design Tasks Data dictionary Entity‑occurrence diagram Entity‑relationship diagram Query design The project manager claims that use of this Gantt chart for planning will help to: • improve efficiency and ensure work is completed on time • manage resources. By making reference to the section of the Gantt chart shown, explain why you agree or disagree with these claims. The following data dictionary has been produced when redesigning the relational database. Entity: Customer Attribute name Key Type Size Required Validation custID PK varchar 5 yes firstName varchar 15 yes lastName varchar 20 yes address varchar 50 yes email varchar 30 yes Entity: Order Attribute name Key Type Size Required Validation orderID PK integer yes Auto increment orderDate date yes custID FK varchar 5 yes Existing custID from Customer table orderSent varchar 1 yes Restricted choice: y, Y, n, N Entity: Product Attribute name Key Type Size Required Validation prodID PK integer yes Auto increment type varchar 7 yes Restricted choice: Desktop, Laptop, Tablet make varchar 10 yes Restricted choice: Cell, Orange, Race, Sung model varchar 20 yes rating integer no Range: 1 to 5 price float yes >= 50.00 Entity: OrderProduct Attribute name Key Type Size Required Validation orderID PK/FK integer yes Existing orderID from Order table prodID PK/FK integer yes Existing prodID from Product table orderQuantity integer yes >=1 Complete the following SQL statement used to create the Order table. CREATE TABLE Order( orderID int NOT NULL auto_increment, orderDate date NOT NULL, custID varchar(5) NOT NULL, orderSent varchar(1) NOT NULL _______________________________ _______________________________ _______________________________ ); The SQL statement below is executed successfully. SELECT type, make, model, price FROM Product WHERE price < 200 OR price > 400; Re‑write the WHERE clause using Advanced Higher logical operators. The following query is used to display details of products that were ordered fewer than 12 times in April 2023. SELECT * FROM Product WHERE EXISTS (SELECT prodID FROM OrderProduct, Order WHERE OrderProduct.prodID = Product.prodID AND orderDate LIKE "*/04/2023" GROUP BY prodID HAVING COUNT(*) < 12); Explain how these results are generated by making reference to the use made of: • the subquery • the EXISTS operator • the HAVING clause A query is used to display the number of each type of product that costs less than £300. The sample output from the query shown below is based on products made by Cell, Race and Sung and shows only those with fewer than five available. type Number of products available Tablet 3 Desktop 2 Complete the following SQL query used to produce the sample output shown. SELECT type, COUNT(*) AS 'Number of products available' FROM Product WHERE price < 300 ____________________________ ____________________________ ____________________________ The changes made to the updated website must be tested. The test plan includes the following test cases: Test Expected Result Actual Result Test Successful? Select the following computer: Type = Desktop Make = Race Model = CL2 Specified computer selected using drop‑down lists for type, make and model Add selected computer to the cart Selected computer appears in cart Choose delivery date of Friday 17 June 2023 and make payment Delivery date selected from calendar and payment made Two testers are chosen to complete these tests: • Jill — a member of the development team • Ben — an existing customer asked to test the updated website. Name the type of testing Jill is undertaking. Give one reason for your choice. Name the type of testing Ben is undertaking. Give one reason for your choice. A company sells computers using a database‑driven website. Maintenance is needed to ensure that the website is compatible with the latest 2023 versions of web technologies, including the server‑side database used to store product and order details and the programming languages used in the development of the website.
Adaptive For example: Efficiency: The Gantt chart provided gives no indication of the duration of any of the tasks. This would make it difficult for the project manager to monitor progress and ensure that the work was carried out on schedule. Efficiency: The Gantt chart indicates that two of the tasks can be carried out at the same time. This is helpful when assigning personnel to the tasks to ensure that staff are available when they are needed and once finished, are then free to work on other developments. Resources: The Gantt chart provided indicates 4 different tasks requiring different skills. This would be helpful for the project manager when assigning people to the individual tasks to ensure that the correct skills sets are available. Resources: There will be no impact of the management of resources since there is no indication of any specific hardware or software that will be needed to complete the design tasks listed. Award 1 mark each for a discussion of efficiency and management of resources. Discussion must make reference to the section of Gantt chart provided. See below. Award 1 mark for primary key Award 1 mark for foreign key Award 1 mark for check Accept use of OR rather than IN for CHECK clause. PRIMARY KEY orderID, FOREIGN KEY (custID) REFERENCES Customer(custID), CHECK (orderSent IN ("y", "Y", "n", "N")) WHERE price NOT BETWEEN 200 AND 400 1 mark for correct use of NOT 1 mark for correct use of BETWEEN For every product in the Product table, the subquery checks whether the prodID appears in the OrderProduct table. When the prodID is found, the subquery then checks whether the relevant order was placed in April 2023. When this is the case, 1 is added to the total number of orders found. HAVING is used to check that only products that have been ordered fewer than 12 times will be returned by the subquery. Since the subquery does generate matching rows, EXISTS returns the value TRUE and the outer query displays the required results. Award 1 mark for description of how subquery is used to check for prodID in orders placed in April 2023. Award 1 mark for description of use made of HAVING. Award 1 mark for description of use made of EXISTS. AND make IN ("Cell", "Race", "Sung") GROUP BY type HAVING COUNT(*) < 5; 1 mark for correct use of IN 1 mark for correct use of HAVING Final testing As a member of the development team, Jill must check that all aspects of the updated system is working correctly before it is released for end-user testing. Award 1 mark for correct type of testing together with suitable supporting statement End-user testing As an existing customer, Ben is an end-user of the updated system and tests the system to check its usability. Award 1 mark for correct type of testing together with suitable supporting statement