Computer Science 0478 · 9

Databases

102 questions. Open a question to solve it and check the official answer.

Reset
2024 May-June · Paper 21 · Q9(a)

Databases · 1 mark · official answer ready

(a) State whether any of the given fields would be suitable as a primary key and give a reason for your answer. ...................................................................…

2024 May-June · Paper 21 · Q9(b)

Databases · 5 marks · official answer ready

(b) Complete the structured query language (SQL) statement to return the number of cans the shop has in stock. SELECT ....................................................... (....…

2024 May-June · Paper 22 · Q10(a)

Databases · 1 mark

(a) Identify the field that will be the most appropriate primary key for this table. ..............................................................................................…

2024 May-June · Paper 22 · Q10(b)

Databases · 2 marks · official answer ready

(b) Complete the table to identify the most appropriate data type for these fields in Contract Field Data type ContractNumber Months EndDate Sport [2]

2024 May-June · Paper 22 · Q10(c)

Databases · 3 marks · official answer ready

(c) Explain the purpose of these structured query language (SQL) statements. Statement 1: SELECT SUM (Months) FROM Contract; Statement 2: SELECT COUNT (News) FROM Contract WHERE N…

2024 May-June · Paper 22 · Q10(d)

Databases · 2 marks · official answer ready

(d) Complete this SQL statement to find the contract numbers of the subscribers that take both the news and sports services. SELECT ...............................................…

2024 May-June · Paper 23 · Q8(a)

Databases · 2 marks · official answer ready

(a) State the number of fields and records in the database table. Fields ..........................................................................................................…

2024 May-June · Paper 23 · Q8(b)

Databases · 4 marks · official answer ready

(b) Give the output that would be produced by the structured query language (SQL) statement: SELECT Model, Year, Engines FROM Hangar1 WHERE Engines > 1 ORDER BY Year; ............…

2024 May-June · Paper 23 · Q8(c)

Databases · 4 marks · official answer ready

(c) Complete the SQL statement to display only the ID and model of all the aircraft that are airworthy. SELECT ID, ................................................................…

2024 February-March · Paper 22 · Q9(a)(i)

Databases · 1 mark

(i) Give the name of the field that would be used for the primary key. ............................................................................................................…

2024 February-March · Paper 22 · Q9(a)(ii)

Databases · 1 mark · official answer ready

(ii) State the reason for choosing this field for the primary key. ................................................................................................................…

2024 February-March · Paper 22 · Q9(b)

Databases · 2 marks · official answer ready

(b) Complete the table to identify the most appropriate data type for these fields in the table StorageUnits Field Data type SizeMetres Position Hoist StorageID [2]

2024 February-March · Paper 22 · Q9(c)

Databases · 4 marks · official answer ready

(c) Complete this structured query language (SQL) statement to display only the storage code, price and size in square metres of all the storage units where there is a hoist avail…

2023 October-November · Paper 21 · Q9(a)

Databases · 5 marks · official answer ready

(a) The shop needs five fields for each record. Give a suitable name and data type for each field. Field 1 name ...................................................................…

2023 October-November · Paper 21 · Q9(b)(i)

Databases · 1 mark

(i) Give the name of the field that should be used for the primary key. ...........................................................................................................…

2023 October-November · Paper 21 · Q9(b)(ii)

Databases · 1 mark

(ii) State why this field is used as the primary key. .............................................................................................................................…

2023 October-November · Paper 21 · Q9(c)

Databases · 3 marks · official answer ready

(c) Structured query language (SQL) is used to query data stored in this database. State what these SQL commands are used for. SELECT .............................................…

2023 October-November · Paper 22 · Q10(a)

Databases · 1 mark

(a) State the number of records in this database table. ...........................................................................................................................…

2023 October-November · Paper 22 · Q10(b)

Databases · 2 marks · official answer ready

(b) Give the name of the field that is most suitable to be the primary key. State the reason for this choice. Field ...............................................................…

2023 October-November · Paper 22 · Q10(c)

Databases · 2 marks · official answer ready

(c) The database only allows the data types: • Boolean • character • date/time • integer • real • text. Complete the table to show the most appropriate data type for each field. E…