Testing and evaluation

When testing queries, it is good practice to document expected results and actual results. A comparison can then be made, with testing passed if the expected result and actual result is the same.

In the example shown below, the design and implementation (SQL) are also shown to provide a clear context for the testing that follows.

The query being tested is designed to run on the data held in the following versions of the pupil and orchestra tables.

Pupil table

PupilIDFirst NameSurnameClassPastoral Care TeacherMerit Points
0001ZainabSingh1T1Mr Harley74
0002DavidBoland1I2Mrs Aitken12
0003AmyJones1M1Mr Gilchrist55
0004JamesMcNamee1T1Mr Harley88
0005PawelMcTavish1I1Mrs Aitken19
0006AntoniaGallagher1M2Mr Gilchrist21
0007AmyMcNamee1T1Mr Harley63
0008AyshaMatazinadze1T1Mr Harley45
0009BeatricePanner1T2Mr Harley77
0010ThomasGlacney1M1Miss Armstrong91
0011FrankieAl-Robeye1M2Mr Gilchrist71

Orchestra table

OrchestraMemberIDPupilIDGroupTuition
010004WoodwindYes
020007StringsNo
030008BrassYes
040003BrassNo
050009PercussionNo