I've given you the answer already. On 2/10/03 9:53 pm, "Harkness, David" <[EMAIL PROTECTED]> wrote:
> Edward Kenworthy <mailto:[EMAIL PROTECTED]> once said: >> On 2/10/03 6:34 pm, "Harkness, David" >> <[EMAIL PROTECTED]> wrote: >>> I have several unidirectional N:1 relations, but I have *zero* >>> relation tables. Granted, they're N:1 and not 1:N, but I don't see >>> how that would make any difference. >>> >>> MailMessages ---1:N--> Users >>> messageKey ID >>> ... messageKey >>> ... >> >> Of course it makes a difference - consider the location and >> number of foreign keys in each case. > > How does the choice of unidirectional 1:N vs. N:1 make any difference to > the database schema? The above schema would work for both. Whether the > Users entity has a MailMessagesLocal or the MailMessagesLocal has a > Collection of UsersLocals has no bearing on where you'd put the foreign > key nor force you to use a relation table. Sure, you *could* model it > with a relation table, but why? That would simply turn a N:1 relation > into an N:M relation where M always equals 1. > > David Harkness > Sr. Software Engineer > Sony Pictures Digital Networks > (310) 482-4756 > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > xdoclet-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/xdoclet-user ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ xdoclet-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-user
