Skip to content

RecursionSheep/DBNoC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

DBNoC: A DataBase that Draws No Conclusions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages