Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Harry-Chen/SimpleDB
Final project for course 'Introduction to Databases' of Tsinghua University, Fall 2017
https://github.com/Harry-Chen/SimpleDB
Last synced: 2 months ago
JSON representation
Final project for course 'Introduction to Databases' of Tsinghua University, Fall 2017
- Host: GitHub
- URL: https://github.com/Harry-Chen/SimpleDB
- Owner: Harry-Chen
- Created: 2018-08-11T13:46:10.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-11T13:47:06.000Z (over 6 years ago)
- Last Synced: 2024-08-02T01:25:34.951Z (6 months ago)
- Language: C++
- Size: 11.1 MB
- Stars: 40
- Watchers: 7
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimpleDB
A project for the database class, Fall 2017, Tsinghua University## Dependencies
* `bison` and `flex`
* `gcc` >= 5.4.0
* `CMake` >= 3.0.2
* `Doxygen` >= 1.8.0 and `graphviz` >= 2.38.0 (optional for generating documentation)## Environment
Tested on Linux, including WSL Ubuntu 16.04 and Arch Linux, with latest version of GCC.
The code can be built on Windows with MinGW, but not tested.## Build without tests
```bash
mkdir build && cd build
cmake .. && make
cd src # the executive name is 'SimpleDB'
```
Please do not build in `Release` or `RelWithDebInfo` mode, for there will be strange behaviours.## Execute
The program always read from `STDIN`. However you can do a redirection to read from file.
```bash
./SimpleDB # the simple way
./SimpleDB db_name # automatically USE db_name
./SimpleDB db_name init < foo.sql # execute foo.sql in initialization mode
```
If you are inserting a huge amount of data, *please* be sure to use initialization mode!
When in initialization mode, all constraints will be ignored when inserting or modifying records in order to increase the speed.## Build with tests
```bash
mkdir build && cd build
cmake .. -DENABLE_TEST=ON # Unix-Like systems (including WSL)
cmake .. -DENABLE_TEST=ON -Dgtest_disable_pthreads=ON # Windows (even if using MinGW)
make
make test #run the test
```
## Generate documentation
Just run `doxygen` in the root directory of source, then open `doc/html/index.html`.