[prev] 76 [next]

The Projection Operation (cont)

The projection operation needs to:

  1. scan the entire relation as input
    • already seen how to do scanning

  2. remove unwanted attributes in output tuples
    • implementation depends on tuple internal structure
    • essentially, make a new tuple with fewer attributes
      and where the values may be computed from existing attributes

  3. eliminate any duplicates produced   (if distinct)
    • two approaches: sorting or hashing