Thanks, Jeff. You saved me a lot of typing. ;) Edward Dudlik Becoming Digital www.becomingdigital.com
----- Original Message ----- From: "Jeff Shapiro" <[EMAIL PROTECTED]> To: "Ted Rogers" <[EMAIL PROTECTED]> Cc: "Becoming Digital" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, 30 May, 2003 14:30 Subject: Re: database newbie Foreign keys have been available in InnoDB tables since 3.23.43b. A here's couple of pages to check out: >From the InnoDB Manual pages: 4.3 Foreign key constraints http://www.innodb.com/ibman.html#InnoDB_foreign_keys >From the MySQL Manual: 1.8.4.5 Foreign Keys http://www.mysql.com/doc/en/ANSI_diff_Foreign_Keys.html 3.5.6 Using Foreign Keys http://www.mysql.com/doc/en/example-Foreign_keys.html 7.5.5.2 Foreign Key Constraints http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html additional comments inline: On Fri, 30 May 2003 14:04:37 -0400, Ted Rogers wrote: > No, this was perfect. I had totally misread (I figured out after I > bothered everyone!) --it was I had always been taught and as you say. > > I hope you have seen my most recent question to the list? About > manually entering the data? The short and sweet answer there be that > someone ALWAYS has to enter ALL the data, that the database is for > retreival of what has been put in, manually. though the db can do a > lot fancy footwork ;-). Be careful of using "always" and "all" they will come back to bite you <grin>. My programming style is such that the user is rarely, if ever, shown the values that I'm using for primary and foreign keys. This comes from having to spend LOTS of time cleaning up some legacy systems that were broken by the end users editing the values. Also, unless I have reason to do otherwise, my Primary Key and my Foreign Keys are usually an auto_increment columns. Actually, I don't remember the last time that a Foreign Key wasn't based on an auto_increment column. When creating child records, I have the system insert the parents auto_incremented value into the proper column of the child record. Therefore, no human intervention is required to enter data into the tables. > > Now about foreign keys: I have updated MySQL to 4.0.12 and changed > my tables to InnoDB, because someone said that is where this might be > leading! i.e., I don't know. I do know, or think I do, that MySQL > does NOT have/handle Foreign Keys. So what do I do? > > Thanks Ted > > --- Listserv only address. Jeff Shapiro -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]