"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 beta).
> 
> Here is a snippet of a "create" script:
> ============================
> CREATE TABLE Types (
>  Event_type VARCHAR(20) NOT NULL,
>  PRIMARY KEY(Event_type)
> )
> TYPE=InnoDB;
> 
> CREATE TABLE Events (
>  event_id INTEGER NOT NULL,
>  Types_Event_type VARCHAR(20) NOT NULL,
>  PRIMARY KEY(event_id),
>  INDEX Events_FKIndex1(Types_Event_type),
>  FOREIGN KEY(Types_Event_type)
>    REFERENCES Types(Event_type)
>      ON DELETE CASCADE
>      ON UPDATE CASCADE
> )
> TYPE=InnoDB;
> 
> ==========================
> Is there anything still wrong with this?
> 

CREATE TABLE statements look like Ok, but you should run mysqld-max or mysqld-max-nt 
servers on Windows if you want to use InnoDB tables and specify innodb_data_file_path 
variable:
        http://dev.mysql.com/doc/mysql/en/InnoDB_in_MySQL_3.23.html

Note: ON UPDATE CASCADE is supported from version 4.0.8.


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to