Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhiyiyo/cmu15445
CMU15-445 Fall2019
https://github.com/zhiyiyo/cmu15445
database dbms sql
Last synced: 16 days ago
JSON representation
CMU15-445 Fall2019
- Host: GitHub
- URL: https://github.com/zhiyiyo/cmu15445
- Owner: zhiyiYo
- License: mit
- Created: 2022-06-26T10:10:32.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-07-16T09:01:38.000Z (over 2 years ago)
- Last Synced: 2024-10-11T09:27:30.099Z (about 1 month ago)
- Topics: database, dbms, sql
- Language: C++
- Homepage: https://www.cnblogs.com/zhiyiYo/tag/CMU15445/
- Size: 395 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
-----------------
[![Build Status](https://travis-ci.org/cmu-db/bustub.svg?branch=master)](https://travis-ci.org/cmu-db/bustub)
[![CircleCI](https://circleci.com/gh/cmu-db/bustub/tree/master.svg?style=svg)](https://circleci.com/gh/cmu-db/bustub/tree/master)BusTub is a relational database management system built at [Carnegie Mellon University](https://db.cs.cmu.edu) for the [Introduction to Database Systems](https://15445.courses.cs.cmu.edu) (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](https://git-scm.com/docs/git-push#Documentation/git-push.txt---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](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging). 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](https://github.com/google/sanitizers), 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](https://docs.microsoft.com/en-us/windows/wsl/install-win10). 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](https://blog.jetbrains.com/clion/2018/01/clion-and-linux-toolchain-on-windows-are-now-friends).
## 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