Relational algebra and functional programming
Data flows up a relational algebra expression
project(
join(Artist,
join(
select(Album, year <= 1977),
select(Track, length < 180))),
name)
- Data access starts at the leaf expressions.
- Results flow to parents.
- Parent holds on to data for as short a time as possible.
- Ideally one row (from child) at a time.
- But possibly all rows from child, saving them in memory, or
on disk if necessary. E.g., sort has to accumulate all input
before generating any output.
- Query result emerges from the root.
|