ORM Object Relational Mapping
ORM Object Relational Mapping
Workshop 2
ORM: Object Relational Mapping
Lander Lliguicota
1. Create
2. READ
3. UPDATE
4. DELETE
a)
3. Update
4. Delete
c) Table comparation
Node.js + PHP +
Sequelize + Python + Flask MySQL (No
Feature MySQL + SQLAlchemy ORM)
Node.js, Python, Flask,
Sequelize SQLAlchemy PHP, MySQL
Technologies ORM, MySQL ORM, MySQL (No ORM)
High, great for
microservices High, suited for Medium, good
and real-time well-structured for small-scale
Scalability apps web apps projects
Medium, Medium,
Sequelize SQLAlchemy
simplifies improves High, manual
queries but has readability but SQL can make
Code a learning requires deeper maintenance
Complexity curve understanding difficult
- Non- - SQLAlchemy
blocking, great provides strong - Full control
for concurrent abstraction over SQL
users - Well- - Lightweight,
- Sequelize integrated with minimal
abstracts SQL Flask dependencies
- Ideal for - Easy database - Runs on any
Advantages REST APIs migrations PHP server
- Harder to
maintain
- Higher - ORM can be - Prone to SQL
memory usage slower than raw Injection if
- Some SQL queries queries are not
features are not - Overkill for properly
Disadvantages well supported small projects handled
d) Discussion
• Node.js + Sequelize: Perfect for real-time apps (chat, live updates) and high-concurrency
APIs. It's fast and scalable, but uses more memory and has a steeper learning curve.
•
Python + Flask + SQLAlchemy: Best for structured web apps and data-heavy applications.
The ORM makes database handling clean and efficient, but can slow down queries
compared to raw SQL.
•
PHP + MySQL (No ORM): Ideal for small websites, CMS (WordPress, Joomla), or simple
web apps. It’s lightweight and easy to deploy, but without an ORM, code can get messy and
harder to maintain.