|
Posted by Tony Marston on 11/21/61 12:00
"Manuel Lemos" <mlemos@acm.org> wrote in message
news:efkqbp$5iq$1@emma.aioe.org...
> Hello,
>
> on 09/29/2006 05:41 AM Tony Marston said the following:
>>>> On ORM (Object Relational Mapper) most definitely does NOT facilitate
>>>> data
>>>> retrieval. It is used when the structure within an object is different
>>>> from
>>>> the structure within that part of the relational database with which it
>>>> connects, in which case you need a mapper to deal with the differences
>>>> between the two structures. If the two structures are identical then
>>>> you
>>>> don't need a mapper because it is redundant.
>>> That is really not the role of Object Relational Mapping. In this
>>> context, mapping means translating data structures into SQL statements
>>> to store and retrieve such structures from objects.
>>
>> I disagree. The primary function of an ORM is not to generate SQL
>> statements, that is what a Data Access Object is for. An ORM has a
>> different
>> purpose which I have already explained. Take a look at
>> http://www.martinfowler.com/eaaCatalog/metadataMapping.html
>
> I am afraid you are confusion the purpose with the means. This is what
> ORM is:
>
> http://en.wikipedia.org/wiki/Object-relational_mapping
>
> Now, how do you implement it, that is another story.
The examples in that article clearly show that when the structure of the
object is different from the structure of the database then it because
necessary to provide something which provides a map between the two
different structures. That is entirely different from a Data Access Object
which accesses the database without dealing with different structures. In
short, an ORM is not a DAO, and it is more efficient not to have different
structures so that you do not need an ORM.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
..
Navigation:
[Reply to this message]
|