* mike vogel
> thanks to all respondents! one more thing, i have 2 foreign keys in the
> bridge table, but not a primary key. is a primary key in the bridge
> necessary for this type of join to work? thanks again.

Make the two foreign keys the primary key for this table, that way you
prevent the possibility of a person subscribing to the same magazine
twice... so you may want a 'count'-field or similar in case someone actually
want more than one copy of the same magazine. :)

Because you probably more often want to see "all magazines subscribed for
one person", and not so often "all persons subscribing for one magazine",
the primary key should be defined with the person primary key first:
(subs_id,mag_id)

Is the primary key necessary to make it work? No... as long as you make sure
you do not create duplicate subscriptions (same person subscribing to the
same magazine twice). Is there any reason not to define a primary key?

--
Roger


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to