Well, there are people who feel that tables should be linked by foreign keys to ensure referential integrity. Everyone who uses MySQL gets by without them though. Its up to your coding to make sure referential integrity is not violated.
Although foreign keys are left out of MySQL for performance reasons, and there is ussualy not much performance hit for having a primary key and most of the time there is probably a performance gain. So I think generally a primary key is a good thing, unless you have a strange situation where for performance reasons (speed or size) a primary key doesn't make sense. Dave -----Original Message----- From: Desmond Lee [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 9:27 PM To: [EMAIL PROTECTED] Subject: help me out here guys... you gotta have a primary key k.... This is seems ridiculous to me,.. but i'll let you tell me if i'm just being stubborn. So, one of my associates has made a linking table (some people also call it intersection table, cross tab table, but i believe that the propper way to model a many to many relationship is via a "linking table"). in the linking table, there is no primary key defined. I believe that every table must have a primary key. It is absolutely essential, otherwise you'll get tons of problems including redundancy, and inconsistency. However, my associate believes that our coding will ensure that such problems will be avoided and that it's okay for a table to have no primary key defined. I totally disagree. Even if our code is perfect, a primary key must be defined. So, am i correct in being concerned, or am i just being close minded? If, i'm totally wrong, in what situations is it a good idea, okay, or benificial to not have a primary key defined for a table? Thanks Desmond (sql) _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com --------------------------------------------------------------------- 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 --------------------------------------------------------------------- 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