On Tue, 3 Dec 2002, Jon Frisby wrote: > However, from a DB design standpoint, it is generally considered > MASSIVELY unwise for your PRIMARY KEY value to have any > "business-meaning". If it has no "business-meaning", it never needs to > change. Ever.
Really, the issue is that you don't want a primary key that is volatile. It doesn't matter if it has business meaning. For example, a social security number is a pretty decent pk for a table of people. Of course, the whole primary key concept is not really part of relational theory, which just talks about candidate keys. > As for what constitutes a "relational" database, the closest thing to an > authoritative source on the subject would be E.F. Codd's 12 rules for a > relational database. Since he invented the concept, he should > theoretically be the authority. Apparently, not one database on the > market conforms to all 12 rules. Not Oracle, or PostgreSQL, and > certainly not MySQL. I think that Codd's 12 rules are not considered entirely sufficient for a system to be truly relational any more, but they're probably a good start. > For example, any database that allows you to define a table without > defining a PRIMARY KEY on that table is immediately disqualified. Actually, the absence of any keys is the problem, not a primary key specifically. In other words, you must say that at least one column/column group is sufficient for unique indentification of individual rows. Or put more simply, allowing duplicates breaks relational theory. > Generally speaking, a database can be considered "effectively" > relational if it allows JOINs. If it supports FOREIGN KEYs (which > InnoDB does -- ON CHANGE CASCADE is an optional behavior whose function > is a convenience and not implicitly part of what FOREIGN KEYs are all > about) then it is for all intents and purposes, relational. That really depends on who you ask. The folks at dbdebunk.com would beg to differ, and I lean towards their interpretation. -dave /*================== www.urth.org we await the New Sun ==================*/ --------------------------------------------------------------------- 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