A database table called TVRange shows the main features and prices of a range of televisions. | TVCode | ScreenSize | Satellite | SmartTV | SoundBar | Price$ | |------------|------------|-----------|---------|----------|----------| | TV90SaSmSd | 90 | YES | YES | YES | 9750.00 | | TV75SaSmSd | 75 | YES | YES | YES | 8500.00 | | TV75SaSd | 75 | YES | NO | YES | 8000.00 | | TV65SaSmSd | 65 | YES | YES | YES | 6000.00 | | TV65SmSd | 65 | NO | YES | YES | 5000.00 | | TV65SaSd | 65 | YES | NO | YES | 5000.00 | | TV55SaSmSd | 55 | YES | YES | YES | 4000.00 | | TV55SaSd | 55 | YES | NO | YES | 3500.00 | | TV55SmSd | 55 | NO | YES | YES | 3500.00 | | TV50SaSmSd | 50 | YES | YES | YES | 2500.00 | | TV50Sa | 50 | YES | NO | NO | 1750.00 | | TV50Sm | 50 | NO | YES | NO | 1750.00 | | TV40Sa | 40 | YES | NO | NO | 1200.00 | | TV40 | 40 | NO | NO | NO | 950.00 | | TV32 | 32 | NO | NO | NO | 650.00 |
- (a)Give the name of the field that is most suitable to be the primary key. State the reason for this choice. Field Reason[2]
- (b)The database uses the data types: • text • character • Boolean • integer • real • date/time. Complete the table to show the most appropriate data type for each field. Each data type must be different. Field | Data type -----------|----------- TVCode | ScreenSize | SmartTV | Price$ | [2]
- (c)Complete the structured query language (SQL) query to return the television (TV) code, screen size and price of all Smart TVs in the database table. SELECT TVCode, FROM TVRange WHERE SmartTV = [4]
Mark scheme
Marking points from the official mark scheme (May/June 2023). The mark or mark type is shown in brackets.
- [1] (a) Field: TVCode
- [1] (a) Reason: Each entry in this field is a unique identifier / no duplicates
- [1] (b) TVCode: Text
- [1] (b) ScreenSize: Integer
- [1] (b) SmartTV: Boolean
- [1] (b) Price$: Real
- [1] (c) SELECT TVCode, ScreenSize, Price$
- [1] (c) FROM TVRange
- [1] (c) WHERE SmartTV = YES;
Write your answer and get it marked
On Oracle Prep you can write or photograph your own answer and have it marked by AI against this mark scheme, with feedback on what you missed.
Sign up free →