The main premise of this project was to visualize the index file organization used in real database systems.
The program provides some basic tree operations: inserting, updating and deleting a record.
This project was created for the subject of Database Structures, 5th semester of Computer Science on Gdańsk University of Technology.
Disk operations on the index file are performed using pages (to simulate disk
access on a physical hard disk). Pages are buffered in main program memory
utilizing a vector. It can contain up to
Disk operations on the data file are also simulated to be page(or block)-based. Disk write or read only happen if there were a cache miss; only one block of records is buffered.
The program handles some positional arguments that allow choosing the operating mode:
-a
,--automatic <path>
- instructions are taken from an instructions file, which is described in the next section-i
,--interactive
- instructions are accepted from the console, following the same format as the instructions file-v
,--verbose
- prints out details about each executed instruction
This application generates some logs in .csv
format. This file is used for
conducting performance analysis and contains every instruction and it's time of
execution.
This file accepts the following format:
<tree degree>
<max index of randomly generated records>
<instruction 1>
<instruction 2>
...
i
- insert record with a random keyi <key>
- insert record with a set keyip <key>
- insert, then print the contents of the treed <key>
- delete record of a given keydp <key>
- delete record, then print the treeu <key> <identity> <name> <surname> <age>
- update a record with given datap
- prints the contents of the treeend
- end the execution