Operations on Records
Common operation on records ... access record via RecordId :
Record get_record(Relation rel, RecordId rid) {
(pid,tid) = rid;
Page buf = get_page(rel, pid);
return get_bytes(rel, buf, tid);
}
|
Cannot use a Record directly; need a Tuple :
Relation rel = ...
Record rec = get_record(rel, rid)
Tuple t = mkTuple(rel, rec)
|
Once we have a Tuple , we can access individual attributes/fields
|