Welcome to the Simple NoSQL Database project! This project demonstrates the creation of a lightweight NoSQL database system built in Python 3, designed for learning and exploration.
- Data Storage with Python Dictionaries: Tables and their data are stored using Python's dictionary data structures.
- Classmethods for Data Structure Operations: The project employs
@classmethodfor performing table and record manipulations in a modular and reusable manner. - Regular Expressions for Parsing: Leverages Python's
remodule to locate and validate table names, column names, and other patterns. - Error Handling: Implements robust error handling to ensure user-friendly feedback for invalid operations and data issues.
This project is a simple yet powerful learning tool that demonstrates key concepts of:
- Object-Oriented Programming (OOP)
- Basic data structure manipulation
- Regular expression parsing
- Error handling practices
- Clone the repository:
git clone https://github.com/Ramarajusairajesh/Database cd Database - Ensure you have Python 3 installed on your system.
- Run the script directly using:
python3 no_sql.py
-
Create a Table:
create table <TABLE_NAME> (<COLUMN_NAME> <TYPE>..)
Creates a new table named
userswith columnsid,name, andemail. -
Insert Data:
insert into <TABLE_NAME> values(<VALUE1>...)
Inserts a record into the
userstable. -
Retrieve Data:
select * from TABLE_NAME
Returns all records from the
userstable. -
Handle Errors Gracefully:
- Attempting to create a duplicate table or access a non-existent table will raise meaningful exceptions.