Another SQL-3 Example
Find theaters showing Herbert films within 100 km of Andorra:
-
- theater attribute of nowshowing: ref to an object in another table. Use -> as shorthand for deref(theater).name
- set-valued attributes get compared using set methods
-
select N.theater->name, N.theater->address, F.name
from nowshowing N, frames F, countries C
and Radius(N.theater->location, 100) || C.boundary
and F.stars ' ‘Herbert the Worm’