Re: Enforcing integrity of Foreign Keys

2004-05-18 Thread Zachary Agatstein
Well, in order to enforce referential integrity, I converted the tables to InnoDB. But referential integrity is still not being enforced. I use mysql version 3-23-54-nt, and the tables are generated through the use of dbdesigner (ver. 4.0.5.6 beta). Here is a snippet of a create script:

Re: Enforcing integrity of Foreign Keys

2004-05-18 Thread Victoria Reznichenko
Zachary Agatstein [EMAIL PROTECTED] wrote: Well, in order to enforce referential integrity, I converted the tables to InnoDB. But referential integrity is still not being enforced. I use mysql version 3-23-54-nt, and the tables are generated through the use of dbdesigner (ver. 4.0.5.6

Enforcing integrity of Foreign Keys

2004-05-17 Thread Zachary Agatstein
A very simple question: If I have a table A with PRIMARY KEY K, and table B which has a column C defined as a FOREIGN KEY F referencing table A.K, then, I would expect, C can only take a value from those already existing in table A column K. So, let's assume, for simplicity's sake, table A has

Re: Enforcing integrity of Foreign Keys

2004-05-17 Thread Michael Stassen
Which kind of tables do you have? InnoDB tables enforce foreign key integrity, MyISAM tables do not. From the manual http://dev.mysql.com/doc/mysql/en/CREATE_TABLE.html: | In MySQL 3.23.44 or later, InnoDB tables support checking of foreign key | constraints. ... For other storage engines,

Re: Enforcing integrity of Foreign Keys

2004-05-17 Thread Victoria Reznichenko
Zachary Agatstein [EMAIL PROTECTED] wrote: A very simple question: If I have a table A with PRIMARY KEY K, and table B which has a column C defined as a FOREIGN KEY F referencing table A.K, then, I would expect, C can only take a value from those already existing in table A column K.