Heapfile Test Page
The tests comprise of inserting, deleting, scanning, and updating
records in a heap file. The user may choose how many records (N) to
insert. All records have three fields: an int, a real, and a 15
character string.
Test 1: Insert and Scan
A heap file is created that is used in other tests as well.
N records are inserted, and then the heap file is scanned. These
are fixed size records. So the scan order reflects the insertion
order.
Test 2: Delete
The heap file created in Test 1 is opened. 50% of the
records inserted in Test 1 are deleted here. The remaining
records are scanned.
Test 3: Record Count and Updates
Uses the records from Test 1. Updates one of the fields in the
record but the length of the record is left unchanged. Then
the records are scanned to check the updates.
Test 4: Temporary Heap Files and Variable Length Records
Creates a temporary (non-persistent) heapfile. The records
in it are not saved to disk. (When the destructor is called,
the heap file is destroyed.) Some variable-length records are
added. Then a scan is done to check the insertions.
Test 5: Error Conditions
This test checks some error conditions. The heapfile created
in test 1 is opened. A record whose length is greater than
the page size is inserted. As expected, the insertion fails.
Heap File Page
Back to the Components Page
Back to the Minibase Home Page