The Simple File System Database is a lightweight, command-line-based database system designed for simple data storage and retrieval.
This README provides an overview of the project structure, how to use it, and key components of the system.
To get started with the Simple File System Database, follow these steps:
- Python 3.x installed on your machine.
- Clone or download the project to your local machine.
To use this database you need to pass the commands by CMD so we made SimpleDBDriver in Java you can use it to call the database
-
Navigate to the project directory.
-
Run the main script to execute database commands:
python main.py -cmd [command] [options]
Replace
[command]
with the desired database command and[options]
with relevant command options.Example usage:
-
Creating a new database:
python main.py -cmd create -sch schema.json
-
Setting a new value in the database:
python main.py -cmd set -database my_database -table my_table -val '{"key": "value"}'
-
Querying data from the database:
python main.py -cmd query -database my_database -table my_table -q '{"key": "value"}'
-
Name | parameters | Description |
---|---|---|
create |
DatabaseSchemaPath | Create database which follow input schema |
set |
DatabaseName, TableName, Inputdata | Set row with the input data |
get |
DatabaseName, TableName, InputQuery | Use the query to get specific data |
delete |
DatabaseName, TableName, InputQuery | Use the query to delete specific data |
clear |
DatabaseName | return the database to the initial state |
{
"database_name": "ClassA1",
"Tables": [
{
"name": "student",
"columns": [
"First_name",
"Last_name",
"CGPA",
"Gender",
"Age"
],
"primary_key": "Last_name",
"index_keys": [
"First_name",
"Last_name",
"CGPA"
],
"overwrite": "True",
"consistently": "Eventual"
}
]
}
Name | Type | Nullable | Notes |
---|---|---|---|
Name | string | No | |
Columns | List of Strings | No | should contain the primary-key |
Primary_key | String | No | |
Index_key | List of Strings | No | |
Overwrite | String | No | should be True or False only |
Consistently | String | No |