Search Postgresql Archives

Re: How hard would a "path" operator be to implement in PostgreSQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/21/2012 03:06 AM, Martijn van Oosterhout wrote:
I'm not sure I have an opinion on pushing ORM features to the database
layer, SQLAlchemy is doing a pretty good job for me already.

There are some things ORMs could really use help from the database with, though. Particularly when fetching larger object graphs with deep relationships. The classic ORM chained-left-join pattern leads to *awful* explosions of join sizes, and huge amounts of duplicate data being sent. The n+1 selects alternative is even worse.

I just wanted to say that in the beginning I didn't understand
SQLAchemy's separation between foreign keys and relationships, but I
have since come to understand that a "relationship" is a far more
general concept than a foreign key.  There are many kinds of
relationships between entities in a database that can't be represented
by a foreign key, but can be by a general join condition.

+1 on that, and the same is true with other object/relational work. A relationship is broader than a foreign key.

--
Craig Ringer


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux