An ORM (Object Relational Mapper) is a tool that allows you to interact with your database using the object-oriented paradigm. Therefore, ORMs are generally implemented as libraries in languages that support object-oriented programming.

Here is a basic example with Django ORM:

## SQL: SELECT * FROM employees WHERE grade='L2' AND salary < 10000;
employees = Employee.objects.filter(grade='L2', salary__lt=10000)

There are several open-source ORMs in different programming languages such as Django ORM (Python), Laravel Eloquent (PHP), Sequelize (JavaScript), etc.

These ORMs implement very advanced features and their source code can be a little intimidating when you are a beginner so in this article, we will implement a simple ORM with Python from scratch to demystify the process and give a general idea of how it works.

#database #python

How I Built A Simple ORM From Scratch in Python
4.90 GEEK