PeachDB is a simple database management system that is written in C.
- Bison (version 3)
- Flex
- CMake
For macOS, install the following packages using Homebrew
$ brew install bison flex cmake gcc make
Write the following lines in your .zshrc
file
export PATH="/opt/homebrew/Cellar/bison/3.8.2/bin:$PATH"
export PATH="/opt/homebrew/Cellar/flex/2.6.4_2/bin:$PATH"
$ mkdir cmake-build-debug
$ cd cmake-build-debug
$ cmake ..
$ make
$ ./PeachDB "select id, name from table;"
OR
$ echo "select id, name from table;" | ./PeachDB
select id, name from table;
insert into table (id, name) values (1, 'John Doe');