Code Monkey home page Code Monkey logo

mini-sql-engine's Introduction

MINI-SQL-ENGINE

Description

a mini sql engine which will run a subset of SQL Queries using ​ command line interface​ . Type of Queries implemented here:​

Select all records : Select * from table_name;

Aggregate functions: Simple aggregate functions on a single column. Sum, average, max and min. They will be very trivial given that the data is only numbers: select max(col1) from table1;

Project Columns(could be any number of columns) from one or more tables : Select col1, col2 from table_name;

Select/project with distinct from one table : select distinct(col1), distinct(col2) from table_name;

Select with where from one or more tables: select col1,col2 from table1,table2 where col1 = 10 AND col2 = 20; a. In the where queries, there would be a maximum of one AND/OR operator with no NOT operators.

Projection of one or more(including all the columns) from two tables with one join condition :
a. select * from table1, table2 where table1.col1=table2.col2; b. select col1,col2 from table1,table2 where table1.col1=table2.col2;

Credits

How to Run

python main.py "{query}"

example: python main.py "select * from table1;"

mini-sql-engine's People

Contributors

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