Databases (source code)

= Databases
{scope}
{title2=A12070W1}

Solutions to all three questions of the examination dated 3 June 2015. The cover permits answers to two questions.<Databases examination paper by the University of Oxford (2015)>[Cover and printed pp. 2–4]{ref}

Use classical <relational algebra> with <set semantics>. Write $C,S,U,P$ for the paper's `Car`, `Sales`, `Customer` and `Salesperson` <database relations>. A <natural join> between $C$ and $S$ matches `serialnumber`; joins involving a salesperson explicitly match `salespersonid` to `empid`. Identifiers, rather than names, distinguish customers and salespeople. The calculations use the ordinary non-null <relational model>; the <SQL> aggregate below also explains its empty-input behavior.