Databases
102 questions. Open a question to solve it and check the official answer.
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. ...................................................................…
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 ....................................................... (....…
Databases · 1 mark
(a) Identify the field that will be the most appropriate primary key for this table. ..............................................................................................…
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]
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…
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 ...............................................…
Databases · 2 marks · official answer ready
(a) State the number of fields and records in the database table. Fields ..........................................................................................................…
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; ............…
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, ................................................................…
Databases · 1 mark
(i) Give the name of the field that would be used for the primary key. ............................................................................................................…
Databases · 1 mark · official answer ready
(ii) State the reason for choosing this field for the primary key. ................................................................................................................…
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]
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…
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 ...................................................................…
Databases · 1 mark
(i) Give the name of the field that should be used for the primary key. ...........................................................................................................…
Databases · 1 mark
(ii) State why this field is used as the primary key. .............................................................................................................................…
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 .............................................…
Databases · 1 mark
(a) State the number of records in this database table. ...........................................................................................................................…
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 ...............................................................…
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…
