This project is a simple DBMS implemented using C, as the education material of the Introduction to Database Systems in National Chiao Tung University
- make >= 4.1
- gcc >= 5.4.0
- g++ >= 5.4.0
- gtest >= 1.8.1
- python >= 3.6.0
$ make check
$ python3 test/system/system_test.py ./shell [test_case..]
if no test_cases is specified, it will run all system tests by default
$ make
$ ./shell
The current table schema is hard coded, the schema in the include/User.h, you can check the User_t to get the detail of each field.
field_name | data_type |
---|---|
id | int |
name | char[255] |
char[255] | |
age | int |
Command | Description |
---|---|
insert | The insert command only allow insert one User_t record at a time |
select | The select command will only print out all the User_t records in the current databases |
The memory only will not store any record after the process terminate
$ ./shell
The File mode will store the record into the specify <DB file>, the next execute can automatically reload the record by the same execution command.
$ ./shell <DB file>
├─ include/ Header files
├─ src/ Source files
│ ├─ shell.c Entry point, which contains main()
│ └─ Util.c Some utility functions
├─ test/ Unit tests & system tests
│ ├─ include/ Test header files
│ ├─ system/ System tests
│ └─ *.c Unit tests source file
└─ Makefile Makefile for make