Skip to content
forked from cmu-db/bustub

The BusTub Relational Database Management System (Educational)

License

Notifications You must be signed in to change notification settings

chungjin/bustub

 
 

Repository files navigation

BusTub Logo


Build Status CircleCI

BusTub is a relational database management system built at Carnegie Mellon University for the Introduction to Database Systems (15-445/645) course. This system was developed for educational purposes and should not be used in production environments.

WARNING: IF YOU ARE A STUDENT IN THE CLASS, DO NOT DIRECTLY FORK THIS REPO. DO NOT PUSH PROJECT SOLUTIONS PUBLICLY. THIS IS AN ACADEMIC INTEGRITY VIOLATION AND CAN LEAD TO GETTING YOUR DEGREE REVOKED, EVEN AFTER YOU GRADUATE.

Cloning this repo

To create a private BusTub,

  1. Go to github.com/new to create a new github repo. Pick a name, e.g. private-bustub, and make sure it is private.
  2. On your development machine, clone the public BusTub, i.e. git clone --depth 1 [email protected]:cmu-db/bustub.git.
  3. We will mirror the public BusTub repo into your own private BusTub repo. Suppose your GitHub name is student and your repo name is private-bustub. Then cd bustub followed by git push --mirror [email protected]:student/private-bustub.git. This copies everything in the public BusTub repo into your own private repo. You can now cd .. and rm -rf bustub.
  4. Clone your own private repo, git clone [email protected]:student/private-bustub.git.
  5. Add the public BusTub as a remote. git remote add public [email protected]:cmu-db/bustub.git
  6. You can pull in changes from the public BusTub with git pull public master.

We suggest working on your projects in separate branches. If you don't understand how Git branches work, learn how. If you don't do this, you might lose all your work at some point in the semester, and nobody will be able to help you.

Build

Linux / Mac

To ensure that you have the proper packages installed on your machine, run sudo build_support/packages.sh. Then run

mkdir build
cd build
cmake ..
make

Debug mode:

cmake -DCMAKE_BUILD_TYPE=Debug ..
make

Debug build enables AddressSanitizer, which can generate false positives for overflow on STL containers. If you encounter this, define the environment variable ASAN_OPTIONS=detect_container_overflow=0.

Windows

If you are using a rather new version of Windows 10, you can use the Windows Subsystem for Linux (WSL) to develop, build, and test Bustub. All you need is to Install WSL. You can just choose "Ubuntu" (no specific version) in Microsoft Store. Then, enter WSL and follow the above instructions.

If you are using CLion, it also works with WSL.

Testing

cd build
make check-tests

TODO

  • update: when size exceed that page, table heap returns false and delete/insert tuple (rid will change and need to delete/insert from index)
  • delete empty page from table heap when delete tuple
  • implement delete table, with empty page bitmap in disk manager (how to persistent?)
  • index: unique/dup key, variable key

About

The BusTub Relational Database Management System (Educational)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.8%
  • Python 4.5%
  • CMake 2.2%
  • Other 0.5%