[prev] 15 [next]

Storage Manager Interface (cont)

Possible implementation for Scan object ...
  • query executor wants to see result tuple-at-a-time
  • DBMS read blocks from files (page-of-tuples-at-a-time)

typedef struct ScanData {
   File  file;   // file holding table data
   Page  page;   // most recently read data
   int   pageno; // current block within file
   int   tupno;  // current tuple within page
   ...
} *Scan;