ORM (Object Relational Mapping)



  1. ORMs have their own APIs for building queries and so are less Vulnerable to SQL injection attacks.
  2. ORMs have tools that will inspect a schema and build up a set  of model classes that allow you to interact with object in db.
  3. Instead of Directly interacting with db , you’ll be interacting with an abstraction layer that provides insulation between code and database Implementation.
  4. It provides mapping between logical business model and physical storage model.
  5. Cache management recently used data are cached in memeory so that it will reducing load on DBs.
  6. Concurrency support: support for multiple user updating same data simultaneously.


  1. If you have complex, hand tuned SQL
  2. If you have decided that your DB will have stored procedure as its interface.
  3. If you have a complex schema that can’t be replaced.
  4. If you have not dealing with object
  5. If you are using custom queries oftenly.
  6. Tight coupling:  This approach creates tight dependency between model objects and database schemas. Changing in DB Schema has rippling affects in objects model and mapping configuration & vice-versa.  

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: