What you're asking for is the ON CHANGE CASCADE behavior of FOREIGN KEYs, and I don't know if InnoDB supports this.
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. 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. For example, any database that allows you to define a table without defining a PRIMARY KEY on that table is immediately disqualified. 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. -JF > -----Original Message----- > From: David T-G [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, December 03, 2002 1:36 PM > To: mysql users > Subject: relational is relational is relational, but ... > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi again, all -- > > I apologize in advance for asking kindergarten-level questions on the > list, but my head is getting really bruised from this one. > I'm trying to > understand what makes a relational (not necessarily transactional) > database and how, in what forms, MySQL is that. > > It's my understanding that to truly be relational a column in > one table > (let's say "sales") must get its value from a column in another table > (let's say "customers") rather than just having the same > name. That is, > it would be easy for anything to have > > +------------------------+ +------------------------+ > | SALES | | CUSTOMERS | > +---------+-------+------+ +------+-----------------+ > | product | price | cust | | num | name | > +---------+-------+------+ +------+-----------------+ > | TXLblue | 14.99 | 1136 | | 1136 | richard roe | > +---------+-------+------+ +------+-----------------+ > | CMMblck | 11.50 | 2408 | | 2408 | jane doe | > +---------+-------+------+ +------+-----------------+ > | SMMblue | 22.75 | 2408 | | 8421 | bob smith | > +---------+-------+------+ +------+-----------------+ > > where SALES.cust gets filled with the same value as > CUSTOMERS.num -- but > should the customer number somehow change we're now out of > sync, whereas > in a truly relational database the fields in the SALES.cust > column would > *be* the fields in the CUSTOMERS.num column rather than > simply having the > same value. > > Am I lost, out of my tree, confused, or bang on? And how > (perhaps InnoDB > tables) does MySQL support this if I'm not any of the first three? > > > TIA & HAND > > mysql query, > :-D > - -- > David T-G * There is too much animal courage in > (play) [EMAIL PROTECTED] * society and not sufficient > moral courage. > (work) [EMAIL PROTECTED] -- Mary Baker Eddy, > "Science and Health" > http://www.justpickone.org/davidtg/ Shpx gur > Pbzzhavpngvbaf Qrprapl Npg! > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.7 (FreeBSD) > > iD8DBQE97SO3Gb7uCXufRwARAooDAKDI6dhugjyejLAEwC5Sjl6Pjqz/nACcDoj0 > vUcEuhNZHvTYh+KjGz05/9Q= > =hZrX > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > 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