Saturday, March 20, 2010

ORM (Object relational mapping)

As developers the data we manipulate is the one represented as an object of some class and is typically in the memory of the computer. But most of the applications (typically web applications) need to have this data persisted and that's where databases come and we developers start to feel little itchy as these databases organize data in a different way then we are used to.

The databases have tables, tables have rows and columns and tables are related to each other using by some keys. In order to manipulate databases there are query languages, stored procedures etc. A totally different way to operate, code and view our data.

Traditionally web application developers have to have a good knowledge (if not master) of SQL in order to work with databases but it has always been desired that in our code any data we see is in form of objects and this is where a middleware which does the translation of view of data as an object of class to a row in the table of database is very useful. This middleware is known as Object relational mapper.

In the Java world, Hibernate is the most famous ORM library/tool. 

Read more about Hibernate and ORM here:

No comments:

Post a Comment