This project is a mini ORM engine built from scratch in python. It simulates how real ORMs like Django ORM / SQLAlchemy works internally.
It allows me to:
- Pretend Python lists are database tables
- Create tables
- Insert data
- Query data
- Update and delete data
- Understand relationships (Student --> Teacher)
This ORM is built around a simple school system with:
- Students
- Techers
- A Relationship between them
mini_orm/
│
├── database.py # Fake database (tables + storage)
├── models.py # Table → Class mapping & insert logic
├── query.py # Query engine (filter, get, update, delete)
├── main.py # Run & test the ORM
└── README.md # Documentation
database.py → defines tables
models.py → inserts data using ORM
query.py → fetches / filters data
main.py → runs the project
Stores fake tables using python lists and simulates auto-increment IDs.
Maps tables to classes (Student, Teacher) and handles inserts.
Acts like a query engine (Similar to SQL SELECT, UPDATE, DELETE).
This is the entry point where data is created and queried.
python3 main.py