File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1
1
# SQL-Engine
2
2
3
3
- *** Mini-SQL*** engine in *** Python*** which will run a subset of SQL Queries using command line interface.
4
+ - ## ** Dataset**
5
+ - all elements in the fields would be *** integers*** only
6
+ - file is named *** File1.csv*** , the database table name would be *** File1***
7
+ - *** metadat.txt*** file will be given for schema of corresponding database tables
8
+ ```
9
+ <begin_table>
10
+ <table_name>
11
+ <attribute1>
12
+ ....
13
+ <attributeN>
14
+ <end_table>
15
+ ```
16
+ - ## **Queries**
17
+ - **Select** all records: ``` SELECT * FROM table_name; ```
18
+ - **Aggregate** functions: ***sum, average, min, max*** ``` SELECT MAX(col) FROM table_name; ```
19
+ - **Project** coloumns: ``` SELECT col FROM table_name; ```
20
+ - Project with **distinct**: ``` SELECT DISTINCT col FROM table_name; ```
21
+ - Select from **one or more tables**: ``` SELECT col1, col2 FROM table1, table2 WHERE col1=10 AND col2=20; ```
22
+ - Projection from one or more from two tables with **one join condition**:
23
+ ```
24
+ a. SELECT * FROM table1, table2 WHERE table1.col1=table2.col2;
25
+ b. SELECT col1, col2 FROM table1, table2 WHERE table1.col1=table2.col2;
26
+ ```
27
+ - Basic Error Handling is done
28
+ - ## **Execute**
29
+ - run SQL-Engine from **python file** ``` python sql_engine.py <query> ```
30
+ - run SQL-Engine from **bash script** ``` bash run.sh ```
You can’t perform that action at this time.
0 commit comments