Ask smart questions
Answers are for parents and teachers.
1
The Boats table is shown. A query shows Boat and Price, with the criteria Type = "Rowing" and Free = "Yes" in the same row, sorted by Price ascending. List the results.
| Boat_ID | Boat | Type | Price | Free |
|---|---|---|---|---|
| 1 | Swan | Rowing | 6.00 | Yes |
| 2 | Heron | Rowing | 5.50 | No |
| 3 | Kite | Sail | 9.00 | Yes |
| 4 | Lark | Rowing | 4.50 | Yes |
| 5 | Wren | Rowing | 5.00 | Yes |
Rowing boats that are free: Swan 6.00, Lark 4.50 and Wren 5.00 (Heron is rowing but not free; Kite is a sail boat). Sorted ascending: Lark 4.50, Wren 5.00, Swan 6.00.
2
Using the Boats table of the first task, how many records does the query find if Type = "Sail" is in the Criteria row and Price < 5 is in the or row? Name them.
| Boat_ID | Boat | Type | Price | Free |
|---|---|---|---|---|
| 1 | Swan | Rowing | 6.00 | Yes |
| 2 | Heron | Rowing | 5.50 | No |
| 3 | Kite | Sail | 9.00 | Yes |
| 4 | Lark | Rowing | 4.50 | Yes |
| 5 | Wren | Rowing | 5.00 | Yes |
Sail: Kite. Price below 5: Lark (4.50). A boat is found if it meets either row, so 2 records are found: Kite and Lark.
3
Explain, with one example from a school sports table, the difference between putting two conditions in the same row and putting them in different rows.
Same row means AND: for example Sport = "Netball" and Year = 8 finds only Year 8 netball players. Different rows means OR: Sport = "Netball" in one row and Year = 8 in the next finds all netball players plus all Year 8 pupils, so more records.
4
A weather company keeps temperature readings from 2 000 stations every 10 seconds. How many readings is that in one minute? Which of the five Vs does it show?
There are 6 readings per station per minute, so 2 000 × 6 = 12 000 readings. It shows volume (many readings) and velocity (they keep arriving quickly).
5
Design a short database for a library’s book clubs. List two tables with a primary key for each, a foreign key to link them, and write one query with an OR in words.
Example: Clubs(Club_ID primary key, Club_name, Room) and Members(Member_ID primary key, Name, Club_ID foreign key). Query: show Name and Club_name for members whose Club_name is "Poetry" or whose Name starts with "A*".