1 Star 0 Fork 1

Sukuna / CMU15-445db

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT
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 Repository

克隆这个项目可以简化执行:(如果你只需要写写玩玩,不想传到github)

   $ git clone --bare https://github.com/cmu-db/bustub.git bustub-public

如果你上不了github,那就用gitee这个国内源

下面的文档想看就看吧:(亲测只clone就好了)

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 --mirror https://github.com/student/bustub-private.git
    
    # If you pull / push over SSH
    $ git push --mirror git@github.com:student/bustub-private.git
    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 git@github.com: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

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

怎么编译这个项目?

Linux / Mac

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

为了保证所有的依赖软件包都已经下好,你需要运行这个命令:

$ sudo 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

This 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 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

Build environment

If you have trouble getting cmake or make to run, an easy solution is to create a virtual container to build in. There are two options available:

Vagrant

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

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.

MIT License Copyright (c) 2019 CMU Database Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
C++ 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/sukunahust/cmu15-445db.git
git@gitee.com:sukunahust/cmu15-445db.git
sukunahust
cmu15-445db
CMU15-445db
master

搜索帮助