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,
- Go to
github.com/newto create a new github repo. Pick a name, e.g.
private-bustub, and make sure it is private.
- On your development machine, clone the public BusTub, i.e.
git clone --depth 1 email@example.com:cmu-db/bustub.git.
- We will mirror the public BusTub repo into your own private BusTub repo. Suppose your GitHub name is
studentand your repo name is
cd bustubfollowed by
git push --mirror firstname.lastname@example.org:student/private-bustub.git. This copies everything in the public BusTub repo into your own private repo. You can now
rm -rf bustub.
- Clone your own private repo,
git clone email@example.com:student/private-bustub.git.
- Add the public BusTub as a remote.
git remote add public firstname.lastname@example.org:cmu-db/bustub.git
- 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.
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
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
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.
cd build make check-tests
- 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