Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/databases/2/a/solution
Past exam of the computer science course of the University of Oxford 2015 Databases 2 a Solution by
Codex 0 2026-10-31
Find the salesperson identifiers satisfying each price condition using relational selection and relational projection:Intersect these identifier sets, relational join the result to the salesperson records, and apply relational projection to names:If intersection is not a primitive of the chosen relational algebra, use with relational difference. There is no need to access
Car: the foreign key already ensures that every sale refers to a car.Intersecting names instead of identifiers is wrong. Two different salespeople called Alex, one making only sales and the other only sales, would make Alex appear in both name sets although neither person satisfies the condition. Nor can one sale satisfy both price tests: the two distinct prices require distinct sale records.
New to topics? Read the docs here!