Question 18

AQA Computer Science June 2024 Paper 2 (8525/2)GCSE14 marks

On the specification

18.1
3.7 Relational databases and structured query language (SQL)
18.2
3.7 Relational databases and structured query language (SQL)
18.3
3.7 Relational databases and structured query language (SQL)
18.4
3.7 Relational databases and structured query language (SQL)
18.5
3.7 Relational databases and structured query language (SQL)
18.6
3.7 Relational databases and structured query language (SQL)
18.7
3.7 Relational databases and structured query language (SQL)
Question text

18 1 box . Define the term database. [1 mark] 18.2 Explain what is meant by data inconsistency within a database. [2 marks] 18.3 Define the term foreign key. [2 marks] A relational database is being developed to store information about actors and the films they have performed in. The database contains three tables: Film, Performance and Actor. Some of the contents of the tables are shown in Figure 8. Figure 8 Film FilmID Title Year 100 Forrest Gump 1994 101 Toy Story 3 2019 102 Back to the Future 1985 Performance PerformanceID FilmID ActorID 52 100 8 53 101 8 54 102 9 Actor ActorID Firstname Lastname 8 Tom Hanks 9 Lea Thompson 18.4 State the identifier of a field from the Actor table in Figure 8. box [1 mark] 18.5 A list of all the films from the year 2019 in the database is needed. The following SQL is run to produce the list: FilmID, Title, Year FROM Film WHERE Some parts of the SQL have been replaced by labels. State the SQL that should have been written in place of the labels and . [2 marks] 18.6 The film with the title Toy Story 3 has been entered incorrectly into the database and should have the title Toy Story 4. Write the SQL to make this change. [3 marks] Figure 8 has been included again below. box Figure 8 Film FilmID Title Year 100 Forrest Gump 1994 101 Toy Story 3 2019 102 Back to the Future 1985 Performance PerformanceID FilmID ActorID 52 100 8 53 101 8 54 102 9 Actor ActorID Firstname Lastname 8 Tom Hanks 9 Lea Thompson 18.7 A film called Gladiator from the year 2000 is to be added to the database with a box FilmID of 103 The following SQL is run: INSERT INTO ( ) Some parts of the SQL have been replaced by labels. State the SQL that should have been written in place of the labels , and . [3 marks]