Ajai Khattri <[EMAIL PROTECTED]> wrote:  > On Tue, 11 Sep 2007,
Kenneth Downs wrote: >  > > As you may guess, I'm no fan of ORM. 
The main reason is what I just  > > said above.  OO code and
table-based data are two very different beasts  > > with very different
natures.  ORM tries to make one look like the  > > other.  Why would
anybody want to do this? >  > For a couple of reasons: >  > 1)
Dealing with SQL from an OOP programming language is not natural.That's a
personal opinion, not a system requirement.Hey, that's fine.  My opinion
is that generating SQL is natural and easy, a little easier than generating
HTML. >  > 2) Conceptual relationships are easier to deal with via
objects.What's a "conceptual relationship?"  If you put your
data into tables, then the relationships between the tables are foreign
keys.  That's easier to handle in set-based SQL, the language that was
designed to do it. >  > 3) It gives you a layer of abstraction above
the database to the >    degree that it doesn't matter what the underlying
database >    actually is, you have a uniform interface always. Doesn't
matter >    if you switch SQLlite to MySQL to Postgres - all looks the
same. >  Actually you don't need ORM for that, you just need a generalized
set of commands, like "db_query" instead of "pg_query" and
"mysql_query". 
_________________________________________________________
This mail sent using V-webmail - http://www.v-webmail.org
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to