On 2 Feb 2007, at 20:21, A. Pagaltzis wrote:

* Zbigniew Lukasiak <[EMAIL PROTECTED]> [2007-02-02 13:25]:
select * from a, b, c where
a.key1 = b.key2 and b.key1 = c.key2 and c.key1 = a.key2

With composed (key1, key2) primary keys for a, b and c tables.

This join is a three table relationship (just like the many to
many case) - and I think it is not reducible to a superposition
of two table relstionships (differently from the many to many
case).

Heh. And unless you weaken your FK constraints, you will never be
able to insert a row into these tables. :P  (Except maybe with
some kind of multiple-table insert support, using a view or
whatever.)

Or by using a delayed FK and inserting into all of them during a transaction.

Unless you're using MySQL, which doesn't support this because it's a fucking toy (insert relational dildo management system joke here).

To reiterate - I did read your thesis that many to many is not
a relatioship - so you don't need to repeat that - I am just
asking why it is not and what is a relatioship.

I think a relationship is anything you can say in SQL DDL.

Pretty much. Supporting more complex -relations- ala m2m is cool, but they're a different beast.
--
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for Catalyst, DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for details. + Help us build a better perl ORM: http://dbix- class.shadowcatsystems.co.uk/ +



_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http://www.mail-archive.com/[email protected]/

Reply via email to