A miniature relational database with order
A miniature relational database with order that performs basic operations of relational
algebra such as selection, projection, join, group by, and aggregates (count, sum and avg).
mini-db (container folder)
├── data
│ ├── queries
│ ├── sales1 (data)
│ ├── sales2 (data)
├── docs
│ ├── usage.md (sample commands)
├── minidb
│ ├── __init.py
│ ├── __main__.py (takes command and displays output)
│ ├── argparser.py (class for handling parsing of input text)
│ ├── database.py (class, maintains list of tables & operations bw tables)
│ ├── index.py (class, create and return Hash/Btree index)
│ ├── join.py (class, logic for joins (eq vs non-eq))
│ ├── table.py (class, operations on tables)
│ ├── utils.py (static utility functions)
├── tests
│ ├── mindb_test.py (pytest, tests to check implementation)
├── README.md
├── input_file (commands to run)
├── requirements.txt (dependencies to install)
mini-db
folderpython3 -m minidb
\minidb>>
after which commands can be entered.\python3 -m minidb < path_to_input_file
\input_file.txt
).BTree package\pip install BTrees
\
More info about this package can be found at: https://pypi.org/project/BTrees. \
If there is an issue with permission, try with pip install --user BTrees
Numpy\pip install numpy
Alternatively, navigate inside mini-db
folder and run:\pip install -r requirements.txt