- Language used: C++11
- Compiler used: Clang with C++11 extensions and libc++ as standard library
Project for Cmpe 321 course. A simple storage manager that can handle simple table operations with a page by page IO.
I've written the project in C++11, so you need a compiler that's compliant with C++11. GCC 4.8 and Clang 3.4 can be used for this manner. I perdonally preferred Clang over GCC. If you want to compile the project with GCC, change the line CPP=clang++
to CPP=g++
in Makefile. The Makefile can be found in src/ directory along with the code itself.
First go into src/
directory in a terminal, then use the following command to build the program:
make
After that there will be an executable file named main in bin/
directory.
To run the program you can use make run
command in src directory if you don't want to change directories. Also you can go into bin/
directory and simply run the command ./main
.
When you run the program in a terminal, you will see a command prompt, to check out the commands' synopses and functions, you can simply enter the command help
.
The commands defined in program are:
- Table Operations:
create [table-name] [index-of-primary-key] [field-name:field-size]+
: Create a tabledelete-table [table-name]
: Delete a tablelist-tables
: List all tables- Record Operations:
insert [table-name] [field-value,]+
: Insert a record to a tabledelete [table-name] [primary-key]
: Delete the record with primary-key from tableupdate [table-name] [field-value,]+
: Update value of a record in a tablelist [table-name]
: List all records in the tablesearch [table-name] [operator] [primary-key]
: Search according to primary keyhelp
: Show this messagequit
orq
: Quit the program