On 22/02/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > "Zbigniew Lukasiak" <[EMAIL PROTECTED]> wrote on 02/22/2008 09:38:07 AM: > > To really beat it in Dermot, you seem to be mistaking the "best practice" > for 1:N (has many) with what we are talking about here: N:N (many to many) > where each side of the relation can have bi- directional links to 0->N > items. > > Table Author > ID Author > 0 Wade > 1 Zbigniew > 2 Dermot > > Join table: > Author Book > 0 0 > 0 1 > 0 2 > 1 0 > 1 2 > 2 1 > > > Book table: > ID Book > 0 foo > 1 bar > 2 bas > > > There are ways (and some reasons to do so for optimization) to do this > without a join table, but 99 times out of 100 this is the best bet. > > Okay truly pulverised.
What happens if you extend the schema so that you included, say editors. Would you create a new join table or have add a field to the join table. Thanx, Dp.
_______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/[EMAIL PROTECTED]
