tags:

views:

91

answers:

2

According to the Wikipedia article object relational mapping:

is a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages

I thought an ORM also took care of tranferring the data between the application and the database. Is that not necessarily true?

EDIT: After reading the answers I don't know if it's possible to choose a definitively correct answer to this question since perhaps it is subjective to some degree. On the one hand it is true that the ORM per se may not perform the transfer of data but rather JDBC or some other similar technology. On the other hand, the ORM is the actor that is responsible for delegating this task to JDBC and for that reason can be thought of as being "in charge" of the transfer.

+3  A: 

The article is referring to the concept of object relational mapping, rather than any software implementation of it, such as Hibernate, which indeed does what you mentioned (possibly delegating the job to other mechanisms).

Either way, it's a collaborative encyclopaedia, so you can always edit that article if you think you can make it more clear.

JG
"delegating the job to other mechanisms" - well said!! you pinpointed the problem I see with Rob H's answer which focuses on JDBC as an independent agent. I see it as you do, that the ORM is in charge of the transfer of data, delegating to JDBC to do its bidding.
mihai
+3  A: 

The transfer of data is typically handled by a lower-level mechanism such as JDBC in Java.

Rob H
Isn't that like saying that a car does not perform transportation but relies on its wheels to handle this?
mihai
No. It's like saying a car does not provide a smooth ride, the road does. JDBC is not part of ORM. It's a separate technology on which ORM depends.
S.Lott
As far as the ORM is concerned, JDBC is a utility just as electricity is a utility. So even if JDBC is responsible for the nuts and bolts of the transfer of data, the ORM, as the agent responsible for invoking this utility to do its bidding, is really "in charge" of the transfer process. At least that's how I see it.
mihai