Unanswered: .sql files from modeler and MySQL dump command
After I design my database by using a db software (powerDesigner), i created the result sql file and use that file created all tables in my MySQL database. after that I export all tables to a sql file by using the mysqldump command.
After compare those two sql files, I found there are many differences.
I the sql file from the software, there are some statements at the end, such as "alter table BankAccount add constraint FK_Reference_8 foreigh key (custId) references Customer (custId) on delete restrict on update restrict;".
But I cannot find those statements on the exported sql file. In the exported sql file there is a statement inside the table creation block:
KEY 'FK_Reference_9' ('custId')
Constraints are important parts of data modeling, they are what enforce integrity, etc.
Most implementations of MySQL (based on the default installation) treat constraints as comments because of some default settings. Most versions of MySQL have the ability to support most kinds of constraints, it is just that their default configuration doesn't support constraints.
You can post in the MySQL forum for help with this, or I could move this thread into the MySQL forum for you. The first thing that we would need to know in order to help you is what version of MySQL you are using. A copy of the script output by PowerDesigner would also help, but isn't absolutely necessary.
You can post in the MySQL forum for help with this, or I could move this thread into the MySQL forum for you. The first thing that we would need to know in order to help you is what version of MySQL you are using.
If possible, please help me move it to MySQL forum.
I use MySQL 5.0.45 on Windows XP machine.