Databaseworksheet
Databaseworksheet
A database table called TVRange shows the main features and prices of a range of
televisions.
Give the name of the field that is most suitable to be the primary key.
Field ..........................................................................................................................................
Reason .....................................................................................................................................
Complete the table to show the most appropriate data type for each field. Each data type must be
different.
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.
....................................................... TVRange
WHERE SmartTV = ;
Q3.A music streaming service has a new database table named Songs to store
details of songs available for streaming. The table contains the fields:
• SongNumber – the catalogue number, for example AG123
• Title – the title of the song
• Author – the name of the song writer(s)
• Singer – the name of the singer(s)
• Genre – the type of music, for example rock
• Minutes – the length of the song in minutes, for example 3.75
• Recorded – the date the song was recorded.
(a) Identify the field that will be the most appropriate primary key for this table.
............................................................................................................................................. [1]
(b) Complete the table to identify the most appropriate data type for the fields in
Songs
Fiel Data
d type
SongNumber
Title
Recorded
Minutes
[2]
(c) Explain the purpose of the structured query language (SQL) statements.
...................................................................................................................................
................
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................