locked
When a ORM should be consider as Micro ORM RRS feed

  • Question

  • what is Micro ORM ?

    when any ORM is called Micro ORM ?

    what is difference between ORM and Micro ORM ?

    thanks

    Tuesday, March 15, 2016 9:12 AM

Answers

  • Hi ,

    >> what is Micro ORM?

    Micro ORM is a lightweight ORM, usually limited in features, but performing faster than full featured ORM. It means than micro ORM supposed to do the same job of mapping table to object, but it sacrifices number of features to have a better performance

    >>when any ORM is called Micro ORM?

    Such as Dapper, Peta Poco, FluentData

    >>what is difference between ORM and Micro ORM?

    From my experience, there are some limitations for micro ORM, and below are some most important limitations of Micro Orm.

    1. Caching: Second Level Cache is not supported, so if you need it, you have to implement some kind of database caching yourself.
    2. Relationships: there are no one-to-one, many-to-many relationship supported, which means, when you load object from database, all related objects will not be automatically loaded or saved, if you want to load related objects, you have to construct your query special way.
    3. No designer: most of existing ORM usually have nice designer, where you can create your model, set relationship between objects (a good example Entity Framework), micro ORM does not support it, you should code all your models and relationship
    4. Migration: most of ORM tools support some kind of migration or code first approach, where you design your model and after executing application database objects created based on model, and when you make changes database updates as well, this feature is not supported by Micro ORM, you have to use 3rd party tools to do migration.

    Best regards,

    Cole Wu

    • Marked as answer by Sudip_inn Thursday, March 17, 2016 8:44 AM
    Wednesday, March 16, 2016 1:30 AM

All replies

  • My understanding is that basically an ORM is an object to data mapper. However, over time they've become a lot more. E.g. identity management. Micro ORM is a phrase used to describe the simple mapper.

    http://pauliom.wordpress.com

    Tuesday, March 15, 2016 9:27 AM
  • Hi ,

    >> what is Micro ORM?

    Micro ORM is a lightweight ORM, usually limited in features, but performing faster than full featured ORM. It means than micro ORM supposed to do the same job of mapping table to object, but it sacrifices number of features to have a better performance

    >>when any ORM is called Micro ORM?

    Such as Dapper, Peta Poco, FluentData

    >>what is difference between ORM and Micro ORM?

    From my experience, there are some limitations for micro ORM, and below are some most important limitations of Micro Orm.

    1. Caching: Second Level Cache is not supported, so if you need it, you have to implement some kind of database caching yourself.
    2. Relationships: there are no one-to-one, many-to-many relationship supported, which means, when you load object from database, all related objects will not be automatically loaded or saved, if you want to load related objects, you have to construct your query special way.
    3. No designer: most of existing ORM usually have nice designer, where you can create your model, set relationship between objects (a good example Entity Framework), micro ORM does not support it, you should code all your models and relationship
    4. Migration: most of ORM tools support some kind of migration or code first approach, where you design your model and after executing application database objects created based on model, and when you make changes database updates as well, this feature is not supported by Micro ORM, you have to use 3rd party tools to do migration.

    Best regards,

    Cole Wu

    • Marked as answer by Sudip_inn Thursday, March 17, 2016 8:44 AM
    Wednesday, March 16, 2016 1:30 AM