Database Evaluation (SQA National 5 Computing Science): Revision Note
Exam code: X816 75
Database evaluation
What is evaluation in database design and development?
Evaluation is the final stage of the development process
You judge whether the completed database solution meets its original goals and whether the output produced by SQL queries is correct
You focus on two areas:
Fitness for purpose
Accuracy of output
Fitness for purpose
A solution is fit for purpose if it meets all of the requirements identified during the analysis stage
To evaluation fitness for purpose:
Compare the finished database solution against the functional requirements
Check if every required feature has been implemented correctly
If even one requirement is not met, the solution is not fit for purpose
Examples:
A query designed to delete a single record but removes several records is not fit for purpose because it fails to meet the intended requirement
A program expected to calculate an average but instead calculates a total is not fit for purpose because it does not achieve the original goals
Accuracy of output
Accuracy checks whether the output from SQL queries exactly matches the expected result set
Process for evaluating accuracy:
Predict the expected output using the tables, data and query logic.
Run the SQL statement to generate the actual output.
Compare expected vs actual.
If the actual result is different, the output is inaccurate even if the query still performs its main task
Fitness for purpose vs accuracy
A query can be fit for purpose but still inaccurate
Example:
The query correctly lists customers from “Edinburgh” (fit for purpose),
but misses the forename field required by the functional requirements (not accurate)
Summary
Evaluation area | Focus | What you compare |
|---|---|---|
Fitness for purpose | Meets original system goals | Implemented solution vs functional requirements |
Accuracy of output | Output is correct | Expected query result vs actual result |
Worked Example
A relational database stores details of racing drivers. The goal is to retire driver Moss Gray (Driver Number 18) by removing only his record from the Driver table.
The Driver table contains attributes including driverNum, forename, surname, and wins.
The following SQL statement was implemented to achieve this goal:
DELETE FROM Driver
WHERE wins = 0;(i) With reference to the required database evaluation criteria, explain why this SQL statement is not fit for purpose for the task of removing only driver Moss Gray
[2]
(ii) Describe the specific search criteria that should be implemented instead to ensure the output is accurate and the solution is fit for purpose.
[1]
Answers
(i)
(
WHERE wins = 0) is too broad [1 mark]It will delete all records where the driver has 0 wins, not just Moss Gray's record, thereby removing more data than was intended by the original requirement [1 mark]
(ii)
(Unique ID):
WHERE driverNum = 18[1 mark]
OR
(Combined Fields):
WHERE forename = "Moss" AND surname = "Gray"[1 mark]
Unlock more, it's free!
Did this page help you?