Giter VIP home page Giter VIP logo

light-dbms's Introduction

Lightweight Database Management System

This program parses and interprets SQL commands and successfully executes them. Its own parser was written using the framework JSQLParser. The implementations supported by this program include scan, selection, projection, join, aliases, ORDER BY and DISTINCT.

Join Logic

Threre are three possible types of expressions that can be encountered in the WHERE clause in this coursework: select condition within one table, join condition between two tables and simple comparison between constants.

Before getting into building the query tree, the program breaks down the long conjunctive expression in the WHERE clause into a list of individual expressions. Then, for each table referred or mentioned in any of these conditions, its corresponding select conditions and join conditions are stored using HashMap, where the table name is the key and the value is either a list of select conditions or a list of join conditions (two HashMaps are used for each type). In case of join conditions, they are mapped to the table that appears later in the FROM clause so that a left-deep join tree can be successfully built. In case of simple constant comparison, it is simply mapped to the right-most table in the FROM clause.

More details can found in the comments in the constructor and build() operation of QueryTree class.

light-dbms's People

Contributors

hbjorbj avatar

Watchers

 avatar  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.