Object-Relational Mapping tools have been in use for very long time. Till 2005 they were implemented and used widely most in Java enterprise world. Ruby on Rails and its famous implementation of Active Record pattern changed that rule and now we can use ORM solutions in all web developing languages. My personal experience is with:Doctrine, Propel and SQLAlchemy
What exactly is ORM?
According to Wikipedia:
Object-relational mapping (aka ORM, O/RM, and O/R mapping) is a programming technique for converting data between
incompatible type systems in relational databases and object-oriented programming languages.
This creates, in effect, a "virtual object database" which can be used from within the programming language.
Everything should be Object
In our Object Oriented programming world every bit of information must be encapsulated in object. That's what the giants in industry say and I will no argue.From one point of view objects are slower than functions, but in general in object oriented applications it is easier to work with database objects. Usually that is one of the main reasons for looking around to find proper to our needs ORM solution.
SQL is Bad?
Sometimes choosing Object Relation Mapping tool is excuse for not learning and generally avoiding raw SQL code. Writing SQL code is not something evil and ORM solutions are not always the answer. As a matter of fact when we need to optimize our "application - database" interaction we still need to write SQL. And for that reason most ORM solutions are supporting raw SQL code implementation.
Development made simple
Usually basic CRUD operations can be performed with one line of code. Most ORM tools can create tables, sort and filter database queries on the fly and much more. In general they are simplyfiing database interactions and are saving a lots of development time.
Not so fast
And what about performance. Taking data from the database, converting it to objects, transfering the objects to higher layers in application and than repeating the whole process backwards for sure slows down the application. Another problem is that ORM solutions in fact are something that is not listed in "Top 100 of all software inventions". They are created to solve the diversions between the object models interpretation of state and the database schemes storage of state. And they will be not here forever i hope ...
The future is bright
If we use Object oriented databases instead of relation databases in object oriented applications we will finally scale the object oriented programming approach to it's maximum capacity.OODB are developed very actively and I hope that very soon we will see real world working solution.


