ORM
✅ ORM
Object Relational Mapping
- Map
object
andrelational DB
automatically - save burden to code SQL
- Object oriented programming: use class
- Relational DB: use table
- thus, there is mismatch between
Object model
andRelational model
ORM maps the relation between objects, create SQL
- 👍🏻 with OOP, focus more on business logic
- 👍🏻 code reusability
- 👍🏻 less dependent on DBMS
- 👎🏻 difficult to create service with only ORM
- 👎🏻 difficult when there is a lot of procedure
- 👎🏻 less functions than MyBatis
✅ MyBatis
- manage framework, SQL
- 👍🏻 more functions than ORM
- 👎🏻 need SQL coding
- 👎🏻 need to manage between object and database
This post is licensed under CC BY 4.0 by the author.