3 messages in com.mysql.lists.win32Re: Foreign Key Constraints
FromSent OnAttachments
N Gangadhara Sanya27 May 2004 01:43 
Lou Olsten28 May 2004 10:25 
Randy Clamons28 May 2004 14:08 
Subject:Re: Foreign Key Constraints
From:Randy Clamons (ran@novaspace.com)
Date:05/28/2004 02:08:19 PM
List:com.mysql.lists.win32

Adding to the answer for: 2. Can I implement Referential Integrity via programming if I stick to default ISAM type tables and is it worth the effort?

Most often, it is convenient to enforce referential integrity in the front-end
interface, whether or not it is enforced by the back-end constraints. Foreign
Key constraints on the database level make it easier to allow multiple front-end
interfaces without jeopardizing referential integrity. But it is still easier to
prevent errors before they happen by enforcing integrity during data integrity.

See below:

----- Original Message ----- From: "N Gangadhara Sanya" <ngsa@yahoo.co.uk> To: <win@lists.mysql.com> Sent: Thursday, May 27, 2004 4:43 AM Subject: Foreign Key Constraints

Hi All,

Just started working with MySQL. (A Week Precisely. Last 12 years I was with dBase, Foxpro, Oracle and MSSQL) I created some tables with referential integrity (Primary Key and Foreign Keys). And I was absolutely surprised to see the foreign key constraints being created but without any effect. After consulting the manual I came to know that I need to use the proprietory InnoDB to make foreign key constraints work. Now my questions are

1. Does using InnoDB require me to purchase a licence ?

<<No>>

2. Can I implement Referential Integrity via programming if I stick to default ISAM type tables and is it worth the effort?

<<You can absolutely do it in your application code. Whether it's worth the effort is really up to you. Do you need the speed of MyISAM? If not, and if the app is primarily OLTP oriented as opposed to READ oriented, I would use InnoDB, but I think each of us needs to make that choice based on our own needs.>>

. ( I also understand that MySQL does not have the concept of Stored Procedures which makes it more complicated I feel.

<<It is coming in version 5, which you can start playing with now, actually, though I personally wouldn't use it in production just yet.>>

Anyway I would like to know how others are ensuring referential integrity without InnoDB)

<<I don't think you have many other options than controlling it in the application front-end.>>

Thanks & Regards Gangadhara Sanya