Database Evaluation (SQA National 5 Computing Science): Revision Note

Exam code: X816 75

Robert Hampton

Written by: Robert Hampton

Reviewed by: James Woodhouse

Updated on

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!

Join the 100,000+ Students that ❤️ Save My Exams

the (exam) results speak for themselves:

Robert Hampton

Author: Robert Hampton

Expertise: Computer Science Content Creator

Rob has over 16 years' experience teaching Computer Science and ICT at KS3 & GCSE levels. Rob has demonstrated strong leadership as Head of Department since 2012 and previously supported teacher development as a Specialist Leader of Education, empowering departments to excel in Computer Science. Beyond his tech expertise, Robert embraces the virtual world as an avid gamer, conquering digital battlefields when he's not coding.

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science & English Subject Lead

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.