\(
\def\T#1{\bf #1}
\def\A#1{\rm #1}
\def\K#1{\underline{\bf #1}}
\def\Set#1{\cal #1}
\def\BSet#1{\boldsymbol{\cal #1}}
\def\nmapsto{\mathop{{\not}{\mapsto}}}
\def\except{-}
\def\tuple#1{\langle{\rm #1}\rangle}
\def\dollar{\$}
\def\IF{\boldsymbol{\leftarrow}}
\)
Example: extended projection
Example: $\T{R}_{1} := \T{R}_{2}\times\T{R}_{3}$
$\boldsymbol{\Set{Q}_{1}}$.
Products in customer's favorite colour
Show, for each customer (reporting the customer's name),
the products by name
that come in the customer's favourite colour.
$\boldsymbol{\Set{Q}_{2}}$.
Products not in customer's favorite colour
Show, for each customer (reporting the customer's name),
the products by name that do not
come in the customer's favourite colour.
$\boldsymbol{\Set{Q}_{3}}$.
Two or more in common
$\boldsymbol{\Set{Q}_{4}}$.
Customers with all colours
$\boldsymbol{\Set{Q}_{5}}$.
Most expensive items