ORM(Object Relational Mapping)

I aim to explain what an ORM does, as well as the pros and cons of using them in your projects.

What is an ORM?

Object-relational-mapping is the idea of being able to write queries , as well as much more complicated ones, using the object-oriented paradigm of your preferred programming language.

What are some pros of using ORM?

*It abstracts away the database system so that switching from MySQL to PosttgreSQL or whatever flavor you prefer,is easy..

*Depending on the ORM you get a lot of advanced features out of the box,such as support for transactions,connection pooling,seeds,streams and all sorts of other goodies.

*Many of the queriest you write will perform better than if you wrote them yourself.

What are some cons of using ORM?

*As a developer, it is important to understand what is happening under the hood. Since ORMs can serve as a crutch to avoid understanding databases and SQL, it can make you a weaker developer in that portion of the stack.

Instance : 2;

After ORM Library it can be seen like this ;

references:blog.bitsrc.io/MarioHoyos, emrebostan.com/orm

Last updated

Was this helpful?