Skip to content
This repository was archived by the owner on Jun 25, 2021. It is now read-only.

Jusot/chidb

Repository files navigation

chidb - A didactic RDBMS

The chidb documentation is available at http://chi.cs.uchicago.edu/

Quick Start

Preparation

./autogen.sh
./configure
make

Run

./chidb

Check

make check

Quick Usage

./chidb
chidb> .open test.cdb
chidb> CREATE TABLE products(code INTEGER PRIMARY KEY, name TEXT, price INTEGER);
chidb> INSERT INTO products VALUES(1, "Hard Drive", 240);
chidb> SELECT * FROM products;

Need to Complete

Assignment 1

Files

  • src/libchidb/btree.c

Steps

  • Step 1: Opening a chidb file
  • Step 2: Loading a B-Tree node from the file
  • Step 3: Creating and writing a B-Tree node to disk
  • Step 4: Manipulating B-Tree cells
  • Step 5: Finding a value in a B-Tree
  • Step 6: Insertion into a leaf without splitting
  • Step 7: Insertion with splitting
  • Step 8: Supporting index B-Trees

Assignment 2

  • src/libchidb/dbm.c
  • src/libchidb/dbm-ops.c
  • src/libchidb/dbm-cursor.[hc]

Assignment 3

Files

  • src/libchidb/chidbInt.h
  • src/libchidb/api.c
  • src/libchidb/utils.[hc]
  • src/libchidb/codegen.c

Steps

  • Step 1: Schema Loading
  • Step 2: Simple SELECT Code Generation
  • Step 3: INSERT Code Generation
  • Step 4: CREATE TABLE Code Generation
  • Step 5: NATURAL JOIN Code Generation

Assignment 4

  • src/libchidb/optimizer.c