Create README.md

Relational Query Engine in JAVA

INTRODUCTION
------------

SQL Query evaluator with support for select, project, join, union, aggregate operations was implemented. An open source SQL parser JSQLParser was used to parse complex SQL statements. The code evaluates the SQL's on given data and return results in standard form. The code was modified to enable faster query evaluation on large data sets by incorporating modern JOIN algorithms, external sorting, and building indexes

STEPS IN QUERY EVALUATION
-------------------------

Phase 1 : 
---------
Pre-Computation step to build indexes and gather table statistics. The input to this phase is a SQL file which contains the CREATE TABLE statements which defines the schema and will also include the PRIMARY and UNIQUE KEY entries. Rather than building a on-disk indexing system, a simple in memory indexing system is implemented using JDBM2 open source Key/Value Store.

java -Xmx1024m -cp build:jsqlparser.jar:jdbm2.jar edu.buffalo.cse562.Main --data /tmp/data --build tpch-schema.sql

Phase 2 : 
---------
The seocond phase processes queries on the given data files and returns results in a standard form. The code is run using the below command

java -Xmx1024m -cp build:jsqlparser.jar:jdbm2.jar edu.buffalo.cse562.Main --data /tmp/data --index /tmp/index tpch-schema.sql

This example uses the following directories and files

/tmp/data: Table data stored in '|' separated files. As before, table names match the names provided in the matching CREATE TABLE with the .dat suffix.
/tmp/db: A directory that will persist throughout the entire process. Store precomputations here.
tpch-schema.sql: A file containing the CREATE TABLE statements for all tables in the TPC-H schema.