• Stars
    star
    183
  • Rank 210,154 (Top 5 %)
  • Language
    C++
  • License
    MIT License
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Database practice on cmu15-445 2022

完成啦😂(线上测试全过,包括leader board task 也弄完了)

BusTub Logo


Build Status

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.

BusTub supports basic SQL and comes with an interactive shell. You can get it running after finishing all the course projects.

BusTub SQL

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 Repository

The following instructions are adapted from the Github documentation on duplicating a repository. The procedure below walks you through creating a private BusTub repository that you can use for development.

  1. Go here to create a new repository under your account. Pick a name (e.g. bustub-private) and select Private for the repository visibility level.
  2. On your development machine, create a bare clone of the public BusTub repository:
    $ git clone --bare https://github.com/cmu-db/bustub.git bustub-public
    
  3. Next, mirror the public BusTub repository to your own private BusTub repository. Suppose your GitHub name is student and your repository name is bustub-private. The procedure for mirroring the repository is then:
    $ cd bustub-public
    
    # If you pull / push over HTTPS
    $ git push https://github.com/student/bustub-private.git master
    
    # If you pull / push over SSH
    $ git push [email protected]:student/bustub-private.git master
    
    This copies everything in the public BusTub repository to your own private repository. You can now delete your local clone of the public repository:
    $ cd ..
    $ rm -rf bustub-public
    
  4. Clone your private repository to your development machine:
    # If you pull / push over HTTPS
    $ git clone https://github.com/student/bustub-private.git
    
    # If you pull / push over SSH
    $ git clone [email protected]:student/bustub-private.git
    
  5. Add the public BusTub repository as a second remote. This allows you to retrieve changes from the CMU-DB repository and merge them with your solution throughout the semester:
    $ git remote add public https://github.com/cmu-db/bustub.git
    
    You can verify that the remote was added with the following command:
    $ git remote -v
    origin	https://github.com/student/bustub-private.git (fetch)
    origin	https://github.com/student/bustub-private.git (push)
    public	https://github.com/cmu-db/bustub.git (fetch)
    public	https://github.com/cmu-db/bustub.git (push)
    
  6. You can now pull in changes from the public BusTub repository as needed with:
    $ git pull public master
    
  7. Disable GitHub Actions from the project settings of your private repository, otherwise you may run out of GitHub Actions quota.
    Settings > Actions > General > Actions permissions > Disable actions.
    

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

Build

We recommend developing BusTub on Ubuntu 20.04, Ubuntu 22.04, or macOS (M1/M2/Intel). We do not support any other environments (i.e., do not open issues or come to office hours to debug them). We do not support WSL.

Linux / Mac (Recommended)

To ensure that you have the proper packages on your machine, run the following script to automatically install them:

# Linux
$ sudo build_support/packages.sh
# macOS
$ build_support/packages.sh

Then run the following commands to build the system:

$ mkdir build
$ cd build
$ cmake ..
$ make

If you want to compile the system in debug mode, pass in the following flag to cmake: Debug mode:

$ cmake -DCMAKE_BUILD_TYPE=Debug ..
$ make -j`nproc`

This enables AddressSanitizer by default.

If you want to use other sanitizers,

$ cmake -DCMAKE_BUILD_TYPE=Debug -DBUSTUB_SANITIZER=thread ..
$ make -j`nproc`

Windows (Not Guaranteed to Work)

If you are using 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.

Vagrant (Not Guaranteed to Work)

First, make sure you have Vagrant and Virtualbox installed

$ sudo apt update
$ sudo apt install vagrant virtualbox

From the repository directory, run this command to create and start a Vagrant box:

$ vagrant up

This will start a Vagrant box running Ubuntu 20.02 in the background with all the packages needed. To access it, type

$ vagrant ssh

to open a shell within the box. You can find Bustub's code mounted at /bustub and run the commands mentioned above like normal.

Docker (Not Guaranteed to Work)

First, make sure that you have docker installed:

$ sudo apt update
$ sudo apt install docker

From the repository directory, run these commands to create a Docker image and container:

$ docker build . -t bustub
$ docker create -t -i --name bustub -v $(pwd):/bustub bustub bash

This will create a Docker image and container. To run it, type:

$ docker start -a -i bustub

to open a shell within the box. You can find Bustub's code mounted at /bustub and run the commands mentioned above like normal.

Testing

$ cd build
$ make check-tests

More Repositories

1

dl

🍗 a concurrent http file downloader
Go
73
star
2

goproxy

🍉 a proxy with go,supports http,socks4/5 at the same time.
Go
42
star
3

gorest

a restful framework with go
Go
20
star
4

myxv6

xv6 riscv operating system and labs from mit 6.S081 2020
C
16
star
5

nettyG

a netty-like framework with go
Go
14
star
6

myleveldb

my leveldb practice
C++
8
star
7

6.824-golabs-2022

raft practice on mit 6.824 2022 lab
Go
8
star
8

mydb

my database practice (B+tree, mmap, transaction)
Go
7
star
9

mycpu

8 bit cpu, 5 regesters, 11 instructions
C++
6
star
10

raftkv

🥒 distributed key/value storage with raft
Go
4
star
11

robot-chat

chat with robot in a simple html
CSS
4
star
12

myos

💻 my operating system like unix/linux
C
4
star
13

leetcode

😄 (600/800) learn algorithms and learn c++ by the way
C++
4
star
14

kaleidoscope

My First Language Frontend with LLVM Tutorial
C++
4
star
15

nginx_module_ratelimiter

🍩 a nignx http module that limits request number
C
3
star
16

mycc

👻 my c compiler
C
3
star
17

jcc

a toy for java compiler and interpreter
Java
3
star
18

ejunjsh

3
star
19

gopervisor

a supervisor for processes you want to manage
Go
3
star
20

csapp

my csapp homework
C
3
star
21

docker-images

all kinds of docker images
Shell
2
star
22

kadd

a cli to add a container into a running pod on k8s
Go
2
star
23

utj

utj(understanding the jvm)
Java
2
star
24

weweb

a nodejs webapp framework
JavaScript
2
star
25

d

🍌 a simple container creation ,execution tools like docker cli
Go
2
star
26

webpack-boilerplate

JavaScript
1
star
27

docker-code

👿 This is a place where i record something about docker.
Dockerfile
1
star
28

stun

a ssh tunnel command line tool
Go
1
star
29

unp

C
1
star
30

c-code

my playground with c
C
1
star
31

blog

backup of my blog
1
star
32

java-code

all kinds of java code in different topics or fields
Java
1
star
33

mylang

my programing language practice
C
1
star
34

sword-point-offer

剑指offer and c++
1
star
35

jSimple

a java framework include ioc,orm,mvc
Java
1
star
36

sicp

😄 learn and exercise in lisp world
1
star
37

qw

a query word command by golang
Go
1
star
38

go-internals-zh

1
star
39

light-rpc

Java
1
star
40

goadbalance

a load balance with go
Go
1
star
41

apue

a repo to rearrange the code and exercises in book.smile
C
1
star
42

cpp-code

my playground with cpp
C++
1
star
43

go-code

my playground for golang
Go
1
star
44

sns

JavaScript
1
star
45

workerpool

Go
1
star