Columnar DB Implementation using Minibase
This project involves using a relational DBMS (i.e. Minibase) as a backbone to develop a full-fledged columnar DBMS. Several query operators are built on top of this columnar DBMS and they are described below:
Types of Index Supported:
- BITMAP
- BTREE
Types of Scan Supported:
- FILESCAN
- COLUMNSCAN
- BITMAP SCAN
- BTREE SCAN
Type of query expression supported:
- CNF
Intefaces:
-
Batch Insert:
Interface: BatchInsert
Usage: java BatchInsert DATAFILENAME COLUMNDBNAME COLUMNARFILENAME NUMCOLUMNS
Example: java BatchInsert sampledata.txt testColumnDB students 4 -
Create Index:
Interface: CreateIndex
Usage: java CreateIndex COLUMNDBNAME COLUMNARFILENAME COLUMNNAME TYPEOFINDEX
Example: java CreateIndex testColumnDB students C BITMAP -
Select Query:
Interface: SelectQuery
Usage: java SelectQuery COLUMNDBNAME COLUMNARFILENAME PROJECTION OTHERCONSTRAINTS COLUMNSCANS SCANTYPES SCANCONSTRAINTS TARGETCOLUMNS NUMBUF SORTMEM
Example: java SelectQuery DemoDB DemoFile A,C,D "" C,D BITMAP,BTREE "(C = 5 v C = 9),D >= 5" A,C,D 200 100 -
Delete Query:
Interface: DeleteQuery
Usage: DeleteQuery COLUMNDBNAME COLUMNARFILENAME PROJECTION OTHERCONSTRAINTS COLUMNSCANS SCANTYPES SCANCONSTRAINTS TARGETCOLUMNS NUMBUF SORTMEM
Example: java DeleteQuery DemoDB DemoFile A,C,D "" C,D BITMAP,BTREE "(C = 5 v C = 9),D >= 5" A,C,D 200 100 -
Bitmap Equijoin:
Interface: BitmapEquiJoin
Usage: java BitmapEquiJoin COLUMNDB OUTERFILE INNERFILE OUTERCONST INNERCONST EQUICONST TARGETCOLUMNS NUMBUF
Example: java BitmapEquiJoin test R1 R2 "([R1.B = 'West_Virginia'])" "([R2.A = 'South_Dakota'])" "([R1.C = R2.C]) ^ ([R1.A = R2.A])" R1.A,R1.B,R1.C,R1.D,R2.A,R2.B,R2.C,R2.D 125 -
Columnar Nested Loop Join:
Interface: ColumnarNestedLoopJoin
Usage: java ColumnarNestedLoopJoin COLUMNDB OUTERFILE INNERFILE PROJECTION OUTERCONST OUTERSCANCOLS OUTERSCANTYPE OUTERSCANCONST OUTERTARGETCOLUMNS INNERCONST INNERTARGETCOLUMNS JOINCONDITION NUMBUF
Example: java ColumnarNestedLoopJoin DemoDB DemoFile DemoFile2 DemoFile.A,DemoFile.C,DemoFile2.C,DemoFile2.A,DemoFile2.C "DemoFile.D = 0" A,C BITMAP,BITMAP "(DemoFile.A = 'Kansas',DemoFile.C < 9)" A,B,C,D "(DemoFile2.C > 5)" A,B,C,D "DemoFile.A = DemoFile2.A ^ DemoFile.C = DemoFile.C" 200 100 -
Sort:
Interface: Sort
Usage: java Sort COLUMNDB COLUMNARFILE PROJECTION OTHERCONST SCANCOLS SCANTYPE TARGETCOLUMNS SORTORDER NUMBUF NUMPAGE SORTMEM
Example: java Sort DemoDB DemoFile A,B,C,D "" "" FILE "" A,B,C,D A ASC 100 3 100