Summative Assessment - Databases and SQL - KS4
Summative Assessment - Databases and SQL - KS4
Summative assessment
Databases and SQL
The table above (tblSpeeds) is data collected from a speed camera on a motorway.
The camera captures the car registration plate and the speed at which the car was
travelling. The car reg is used to find the registered owner of the car, and the data is
stored in a flat file database.
Q1. Which of the fields above would be most suitable to be the primary key? [1]
A. CaptureID
B. Registered_owner
C. Car_reg
D. Speed
Q3. What would be the most appropriate data type for car_reg? [1]
A. TEXT
B. INTEGER
C. REAL
D. NULL
Q4. What would be the most appropriate data type for Speed? [1]
A. TEXT
B. INTEGER
C. REAL
D. NULL
Q5. The data is in a flat file database. Describe one problem that can arise from having a
flat file database. [2]
Q6. Write down the exact output for the following query: [1]
1 SELECT Registered_owner
2 FROM tblSpeeds
3 WHERE Speed > 75;
Q7. The authorities want to offer a speed awareness course to those drivers recorded as
travelling between 71 and 80. Write a query to extract the appropriate records from
tblSpeeds. You must show all the fields in your output. [3]
1
2
3
Q8. The camera has captured a new car travelling down the motorway. Write an SQL
script to insert the following data into tblSpeeds. [4]
1
2
Q9. The registered owner of vehicle YM15PTO has written to say that they are no longer
the registered owner. Write a script to update the registered_owner field in
tblSpeeds for this vehicle to ‘Asif Shah’. [3]
1
2
3
Q10. It has been proven that the camera needed calibrating and an incorrect speed was
recorded for CaptureID number 6.
Write an SQL query that will delete this record from tblSpeeds. [2]
1
2
Total /19
Feedback
Resources are updated regularly — the latest version is available at: ncce.io/tcc.
This resource is licensed under the Open Government Licence, version 3. For more information on this
licence, see ncce.io/ogl.