The Untitled Book of Eliot Pearson

Software Development Is Not Just About Writing Code

Relational Object Mapping

Posted on | July 17, 2010 | No Comments

The idea is also commonly known as ORM (object relational mapping).  You are taking an object and mapping it to a database table or result set.  This is very powerful tool for any developer.

Hibernate is a great tool.  You can easily point it to a database schema and generate a collection of objects with a click of a button or two.  You should understand the data model when generating objects.  I know someone people love ORMs for the simple fact that you don’t have intimate knowledge of a schema.  I don’t think that is the approach you should take.  Yes, you can avoid writing stored procedures with ORMs, but always make the correct architectural decision and not the easy one.

Personally, I like mapping objects to result sets instead tables.  This will be easier with normalized data models.  I wonder which one you prefer.

Comments

Leave a Reply