Code Monkey home page Code Monkey logo

dbnoc's Introduction

A DataBase that Draws No Conclusions

DBNoC (A DataBase that Draws No Conclusions, dee-bee-knock) is the course project for Introduction to Database Management Systems (数据库系统概论), Fall 2019, Tsinghua University. It is a simple relational database that supports basic SQL statements.

This project is named after Fukube Satoshi's famous lines (as illustrated below) in the Japanese anime, Hyouka (氷菓), to salute those who passed away in Kyoto Animation arson attack, those young men who lost their names in the 1960s/70s, and those who endured "the endless everyday" (終わらない日常).

hyouka

Usage

cd src
make

Use ./sm/create [database] and ./sm/drop [database] to create/drop databases.

Use ./use [database] to open databases.

Supported Statements

  • create table ... (... [not null] [primary key] [foreign key ... references ...(...)] [default ...])
  • drop table ...
  • show
  • alter table ... add primary key (...)
  • alter table ... drop primary key
  • alter table ... add foreign key (...) references ...(...)
  • alter table ... drop foreign key ...
  • alter table add ... not null default ...
  • alter table drop ...
  • insert into ...(...) values (...)
  • delete from ... where ... [and ...]
  • update ... set ... = ...
  • select ... from ... where ... [and ...]

Optimization

  • There is a simple optimization when the where clause has constraints like a.col1 == b.col2 with indexes on both columns.

Reference

dbnoc's People

Contributors

recursionsheep avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.