Skip to content

The projects for the "Introduction to Databases" course at Nanjing University.

License

Notifications You must be signed in to change notification settings

Sirilaw/NJU_DatabaseProject

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WSDB: A Toy RDBMS for NJU "Introduction to Databases" Course

License: GPL v3 Github Star

Introduction

This repository is a toy RDBMS for NJU "Introduction to Databases" course. It is implemented in C++ and supports a subset of SQL queries. Six Labs are included in this repository, and the details of each lab are as follows:

  • Lab 1: Storage, implement the disk manager and the buffer manager.
  • Lab 2: Executor, Implement INSERT, UPDATE, and DELETE queries and basic operators like filter, sort, etc.
  • Lab 3. Executor, Implement JOIN and AGGREGATE queries.
  • Lab 4 (future): Index, implement the index manager and B+ tree index.
  • Lab 5 (future): Concurrency, implement SS2PL concurrency control and deadlock detection.
  • Lab 6 (future): Recovery, implement log manager and recovery manager to support WAL/ARIES recovery algorithm.

The project is mostly inspired by Rucbase , and some components follow the design of BusTub, MiniOB. Thanks for their great work!

System requirements

We tested WSDB on MacOS and Ubuntu, but if it also works on other systems, please let us know by issuing or pulling requests.

How to build

First clone the repository from github.

$ git clone --recursive https://github.com/nju-websoft/NJU_DBPractice

Install requirments using package manager.

For Ubuntu or Debian:

$ sudo apt install gcc g++ cmake flex bison libreadline-dev

For MacOS:

$ sudo brew install clang cmake flex bison readline

Then change directory into the repository foot and run

$ mkdir build && cd build
$ cmake .. && make -j8

About how to change cmake configurations, please refer to their guide.

Tutorial

The Chinese version of the lab tutorial can be found under docs, please read them carefully before coding if you are studying NJU DB course.

Copyright

/*------------------------------------------------------------------------------
 - Copyright (c) 2024. Websoft research group, Nanjing University.
 -
 - This program is free software: you can redistribute it and/or modify
 - it under the terms of the GNU General Public License as published by
 - the Free Software Foundation, either version 3 of the License, or
 - (at your option) any later version.
 -
 - This program is distributed in the hope that it will be useful,
 - but WITHOUT ANY WARRANTY; without even the implied warranty of
 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 - GNU General Public License for more details.
 -
 - You should have received a copy of the GNU General Public License
 - along with this program.  If not, see <https://www.gnu.org/licenses/>.
 -----------------------------------------------------------------------------*/

About

The projects for the "Introduction to Databases" course at Nanjing University.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.7%
  • Yacc 2.7%
  • Python 2.2%
  • C 1.2%
  • CMake 1.1%
  • Lex 0.8%
  • Shell 0.3%