Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EDASQL

This is the Data Structure and Algorithms subject final project.

About the project:

It's a console based database manager, which stores data in memory and destroys it when the program is closed. The data structures used in this project are binary search trees and doubly Linked List.

Tech Stack

C, MakeFile.

Features

Create Table

If doesn't exist another table with that name, creates a new table.

    createTable (tableName)

Drop table

Deletes the table named after 'tableName'.

  dropTable (tableName)

Add columns

Adds a new column to the indicated table only if it exists. If the table already contains data, the new column will be filled with 'EMPTY' values.

  addCol (tableName, colName, colType, colQualifier)
Parameter Type Values accepted
colType string INTEGER - STRING
colQualifier string NOT_EMPTY - PRIMARY_KEY - ANY

Drop column

Deletes the column indicated, from the table indicated.

  dropCol( tableName, colName )

Insert tuple

Inserts all the values indicated (separated by ':') on the columns indicated of the table indicated. if a column of the table indicated it's left unselected, it whill insert the value 'EMPTY'. Each value corresponds with a column by it's position on the string.

  insertInto (tableName, columns, values)
Parameter Type Values accepted
Columns string Col1:col2:col3:...Coln
Values string Value1:Value2:Value3:...Valuen

Delete tuples

Deletes all the tuples of the indicated table that meet the condition

  deleteFrom (tableName, deleteCondition)
Parameter Type Values accepted
deleteCondition string ColumnName:Operator:Value
Operator string > - < - = - !

Selection

If table1 exist and table2 doesn't exist, creates a table2 with all the tuples that meet the condition given in the 'condition' parameter. PDD: condition has to be in the same format as 'deleteCondition'

   selectWhere (tableName1, condition, tableName2)

Projection

If table1 exist and table2 doesn't exist, creates a table2 with all the tuples that are contained by the columns indicated in the 'columns' parameter. All the columns indicated must be part of table1

   select (tableName1, columns, tableName2)
Parameter Type Values accepted
columns string col1:col2:col3:...coln

Union

If table1 and table2 exists and table3 doesn't exist, creates a table3 with all the tuples from table1, and table2 only if this two tables have the same metadata.

   union ( tableName1, tableName2, tableName3 )

Intersection

Likewise the last operation, but for the intersection, that means, the tuples that have the same values from table1 and table2

   intersect (tableName1, tableName2, tableName3)

Print table

Prints all the columns and tuples contained in the table indicated.

   printDataTable (tableName)

Print all tables

Prints the list of tables created in the DB, in ascending order.

    printTables()

Print metadata

Prints the metadata of the table indicated.

   printMetadata(tableName)

Feedback

If you have any feedback, or comments please reach out to me at federicomaciel.dev@gmail.com or via GitHub.

Authors

About

This is my final project for the EDA subject (data structure and algorithms), of the programmer analyst career. Team members: Gabriel Suarez, Federico Maciel

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages