[prev] 57 [next]

Operations for Access Methods

Tuple get_tuple(RecordId rid)
  • fetch the tuple specified by rid; return reference to Tuple
Tuple get_tuple_from_page(Page p, int recNum)
  • get the recNum'th tuple from an already-buffered page
Access methods typially involve iterators, e.g.

Tuple next_tuple(Scan s)

  • return Tuple immediately following last accessed one
  • returns NULL if no more Tuples left in the relation
  • Scan holds data on progress through file (e.g. current page)
  • Scan may include condition to implement WHERE-clause