DB db = openDatabase("myDB");
Reln r = openRelation(db,"Employee");
Page buffer = malloc(PAGESIZE*sizeof(char));
for (int i = 0; i < nPages(r); i++) {
PageId pid = makePageId(r,i);
get_page(db, pid, buffer);
foreach tuple in buffer {
get tuple data and extract name
}
}
|