34
Test work
Textbook: pp. 76–77
GoalCompletes a test variant on the database chapter: tables, keys, relationships, queries, forms and calculations.
New words
variant: one version of a test · variantvalidation rule: a condition for a value to be accepted · tekshirish qoidasicriteria: the condition a record must meet · shartinterpreting: saying what the result means · izohlash
Explanation
The test tasks cover all stages of the chapter. In each task first find what is being asked: making a table, choosing a key, setting up a relationship, writing a condition or calculating. When writing the answer use the exact names in Access: Design View, Primary Key, Relationships, Criteria, Group By, IIf. At the end check the calculations by hand and predict beforehand how many records a select query should return. When you have finished, write down the task where you made a mistake and practise that topic again.
Worked examples
Sample variant: 1) Write the field types for a “Students” table with FullName, Class and Mark – Short Text, Short Text, Number. 2) Make StudentID the primary key – Table Tools – Design – Primary Key. 3) A rule for Mark: Between 0 And 100.
4) A query for students of class 10A with marks of 4 or higher: "10A" in Class and >=4 in Mark in the same row. 5) Price 7500, quantity 4: [Price]*[Qty] = 30000; with 12% VAT, 30000*112/100 = 33600. 6) IIf([Mark]>=3,"Pass","Fail") gives Fail when Mark = 2.
Class activity
“Work on mistakes”: after the test each student explains one mistake to a partner and they write the correct solution together.
Practice
1
Which type is chosen for a Mark field filled only with whole numbers?
Number
2
If the price is 6000 and the quantity is 5, what is [Price]*[Qty]?
30000
3
In IIf([Mark]>=3,"Pass","Fail"), what is the result when Mark = 3?
Pass
4
Why is it useful in a test to count the expected number of records by hand after writing a condition?
If the result does not match the prediction, a mistake in the condition is seen at once.