Question 5
AQA Computer Science June 2023 Paper 2 (7517/2)A level13 marks
On the specification
- 5.1
- 4.10 Fundamentals of databases
- 5.2
- 4.10 Fundamentals of databases
- 5.3
- 4.10 Fundamentals of databases
- 5.4
- 4.9 Fundamentals of communication and networking
- 5.5
- 4.9 Fundamentals of communication and networking4.10 Fundamentals of databases
Question text
5 A company operates a cinema which has three different screens. Each screen has a capacity determined by the number of seats the screen has. Each seat is identified by a unique seat number for the screen it is in, but two seats in different screens can have the same number. A specific seat is classified as being of one of two types: standard or deluxe. On a particular day, there will be several showings of films in each of the screens. A screen might show the same film multiple times or it might show different films at different times of day. Customers make bookings to go to the cinema. Each booking is for one specific showing of a film. A booking is for one or more seats, and the customer can select the individual seats that they want to book when they make the booking. When a booking is made, if the customer has not previously made a booking, the customer’s first name, last name and telephone number are recorded. If the booking is for more than one seat then only the details of the person who made the booking are recorded – the system does not store the details of who will be sitting in each seat. If a customer has made a booking previously then the details that were stored about them when the previous booking was made are re-used. 5 1 box . Develop a fully normalised design for a relational database to store the information required by the cinema. To help you, the Screen, Seat, Film and Showing relations have already been defined in Figure 4. Figure 4 Screen(ScreenNumber, Capacity) Seat(SeatNumber, ScreenNumber, SeatType) Film(FilmID, FilmName, Duration, Certificate) Showing(ShowingID, ScreenNumber, FilmID, ShowTime, ShowDate) Using the format shown in Figure 4 list the other three relations that will need to be created, together with the attributes that each relation will contain. Underline the attribute(s) that will form the entity identifier (primary key) in each relation. [5 marks] 5.2 The cinema had to be closed on the 29th March 2023 so that some maintenance could take place. The SQL query in Figure 5 was written to delete all of the showings on this date. Some errors were made in the query. Figure 5 DELETE FROM Showing, Film WHERE ShowDate = 29/03/2023 Describe two errors that have been made in the query. Do not refer to the use of semi-colons in your response. [2 marks] Error 1 Error 2 5.3 Describe an issue that could arise in the database if a query to delete all of the showings that had been scheduled to take place on the 29th March 2023 was executed. [2 marks] 5 4 box . The booking system can be accessed through a website which uses CRUD and REST. Describe what Uniform Resource Locators (URLs) are used for in a RESTful application. [1 mark] 5.5 Shade one lozenge on the row that correctly shows how REST enables CRUD to be mapped to database functions using SQL. [1 mark] A GETFETCH, POSTCREATE, DELETEDELETE, PUTUPDATE B GETSELECT, POSTINSERT, DELETEDELETE, PUTUPDATE C GETSELECT, POSTINSERT, DELETEDELETE, PUTCREATE D GETSELECT, POSTUPDATE, DELETEDELETE, PUTINSERT E GETUPDATE, POSTSELECT, DELETEDELETE, PUTCREATE 5.6 JSON is used to encode datasets when they are passed between the server and the booking application. Figure 6 shows an example of how data about some films can be encoded using JSON. Figure 6 {"Films":[ { "FilmID": 4301, "FilmName": "Alien Doomsday", "Duration": 106, "Certificate": "12A" }, { "FilmID": 2098, "FilmName": "Tom's Amazing Adventure", "Duration": 84, "Certificate": "U" } ]} State two reasons why JSON might have been chosen to encode the data instead of XML, assuming that the software supports both methods. [2 marks] Reason 1 Reason 2 Question parts 06.1 and 06.2 use a normalised floating point representation with an box 8-bit mantissa and a 4-bit exponent, both stored using two’s complement.