FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » ORMs comparisons/complaints.
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: ORMs comparisons/complaints. [message #184319 is a reply to message #184311] Sun, 22 December 2013 21:26 Go to previous messageGo to previous message
Marcel Müller is currently offline  Marcel Müller
Messages: 1
Registered: December 2013
Karma:
Junior Member
On 22.12.13 20.05, Daniel Pitts wrote:
> This is cross-posted to cl.java.programmer and cl.php.

The topic is unlikely to fit to php. F'up to java only.

> I've been doing some thinking about my experiences with various ORMs,
> both positive and negative. I find that I often stretch systems to there
> limits, and end up doing a lot of meta-programming to solve problems
> that I've always felt should have been solved by the core libraries.
> Mostly to follow DRY and KISS principals in the core business code.

First of all you need to mention what ORMs are designed for. They are
intended to make SQL databases suitable for OO programming style and/or
non-relational data models. At the end OO expressions are turned into
SQL and then to an execution plan.
From that you can see that there is exactly one thing superfluous in
this scenario: SQL. It is the bottleneck where all expressions must fit
to. But it does not add any functionality, quite the contrary. It is
just a emulation level for compatibility, like a SATA adapter enables a
SATA drive to be used with an IDE port.

You see, I am not really a friend of ORM. If a relational data model
does not fit your needs, you first should consider to use a non
relational database, rather than to normalize the data model to fit into
a relational DB, and use an ORM to hide that from the application layer.

ORMs are known to slow things down. I don't think that this is true in
general. But the ORM layer makes some trivial looking expressions
amazingly complex. So it is not that easy for the programmer to estimate
the complexity of a code block, without knowledge about the entire ORM
layer and the base data model in SQL. In fact I have redesigned many
code parts because of this.

There is one advantage. Adding attributes to the data model is quite
simple with an ORM. No need to do redundant changes at many locations.
But any document DB will provide this as well without the need for SQL
and an ORM.

Of course, if you are stuck with an SQL DB for some reason and you need
to adapt to an OO application layer ORM might be a choice. But if the
data model in the DB is not intended for ORM usage, you won't get happy,
because there are almost always properties of the data model that are
not correctly modeled in SQL.


However, to get more detailed information you need to phrase your
questions more precisely. What are your topics of interest? Performance?
Maintainability? What kind of data model do you intend to use? Many
entities? Or many properties? What kind of relations? Polymorphism?


Marcel
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: tracking file usage
Next Topic: Processing accented characters submitted from forms
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 02:16:56 GMT 2024

Total time taken to generate the page: 0.03616 seconds