BeeDB is a software project that teaches students the architecture and implementation of DataBase Management Systems. This project is related to the Basic Module "Architecture & Implementation of DBMS".
Go to file
Maximilian Berens 406befa0cb Small changes to the readme 2020-04-26 16:53:46 +02:00
lib/argparse Initialized BeeDB 2020-04-26 16:38:08 +02:00
src Initialized BeeDB 2020-04-26 16:38:08 +02:00
.clang-format Initialized BeeDB 2020-04-26 16:38:08 +02:00
.gitignore Initialized BeeDB 2020-04-26 16:38:08 +02:00
.pre-commit-hook Initialized BeeDB 2020-04-26 16:38:08 +02:00
CMakeLists.txt Initialized BeeDB 2020-04-26 16:38:08 +02:00
LICENSE Initialized BeeDB 2020-04-26 16:38:08 +02:00
README.md Small changes to the readme 2020-04-26 16:53:46 +02:00
beedb.ini Initialized BeeDB 2020-04-26 16:38:08 +02:00

README.md

BeeDB

BeeDB is a software project that teaches students the architecture and implementation of DataBase Management Systems. This project is related to the Basic Module Architecture & Implementation of DBMS. The course is usually teached every summer term, see dbis page of TU Dortmund for more information.

Attention: Please do not publish and share your solution with other students!

Dependencies

  • git
  • cmake (at least version 3.9)
  • build-essential
  • bison and flex

How to build

  • cmake .
  • make

OR, if you prefer a separate build folder:

  • mkdir build && cd build
  • cmake ..
  • make

Default build is in Debug mode. If you want to build in Release mode use cmake . -DCMAKE_BUILD_TYPE=Release or set CMAKE_BUILD_TYPE in CMakeLists.txt.

How to use

Usage: beedb [options] db-file
Positional arguments:
db-file                 	File the database is stored in. Default: bee.db
Optional arguments:
-h --help               	show this help message and exit
-l --load               	Load SQL file into database.
-q --query              	Execute Query.
-c --console            	Run console after loading file or executing query.
--buffer-manager-frames 	Number of frames within the frame buffer.
--scan-page-limit       	Number of pages the SCAN operator can pin at a time.
--enable-index-scan     	Enable index scan and use whenever possible.
--enable-hash-join      	Enable hash join and use whenever possible.
--stats                 	Print all execution statistics

Configuration

Some configuration outside the console arguments is stored in the file beedb.ini.

  • The number of pages stored as frames in the buffer manager (buffer manager.frames)
  • The replacement strategy of frames in the buffer manager (buffer manager.strategy)
  • The k parameter for LRU-K replacement strategy (buffer manager.k)
  • The number of how many pages can be pinned by a scan at a time (scan.page-limit)
  • Enable or disable usage of index scan (scan.enable-index-scan)
  • Enable or disable usage of hash join (join.enable-hash-join)

Non-SQL Commands

  • :explain [plan,graph]: Prints the query plan, either as a table or graph (a list of nodes and edges).
  • :get [option-name]: Prints either all (when no additional argument is given) or the specified option of the database configuration.
  • :set option-name numerical-value: Changes the specified option. Only numerical values are valid.
  • :show [tables,indices,columns]: A quick way to show available tables, their columns or indices.

Examples

Import

./beedb -l movies.sql

Run a single query

./beedb -q "SELECT * FROM movie"

Open the BeeDB Console

./beedb

Run a query and open console afterwards

./beedb -q "SELECT * FROM movie" -c

For developers

  • If you want to commit to the repository please make git-hook before commit.

Credits