Toad World® Forums

Relationship not exported by the reverse engineering


#1

Hi,

Using the 3.2.1.12 version, and trying to reverse engineer a MySQL 5 database.

Works fine, but NO relationship has been created.

Thanks.


#2

Hello,

I’ve just checked it out and it works fine for me.
Let me note that TDM loads only relationships the physically exist in the database.

If the problem remains, please write me some details - settings in the RE Wizard, what objects are listed in Model Explorer after RE, what messages are written in Message Explorer etc…

Thanks.

Vladka


#3

vladka,

I am also experiencing no relationships when I reverse engineer using the most recent Beta. I have tried RE using MySQL JDBC, ODBC 3.51, ODBC 5.1 (it used to work on the older version of TDM only with ODBC).

To answer your questions on this Thread.

The relationship folder in the explorer comes back empty. I don’t get any errors in the RE process (at least none that I can find).

I am RE from a MySQL 5.0 DB with relationships (FK’s) implemented in the DB and that DB is running on Linux (centOS).

I reverse engineered everything and the only boxes I left unchecked were the load all databases (ODBC only) and the Load Character sets and collations for tables and columns .

Is there a setting I am missing somewhere?

Thanks for any help you can give.

Pat.


#4

Hi Pat,

Sorry to hear about the trouble.

Suggestion: Please run the following SQL query on your database:

select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE=‘FOREIGN KEY’

Does it return any records (relationships)?

Then, please execute this query:

SHOW CREATE TABLE name_of_child_table_with_foreign_key

Do you get a DDL command CREATE TABLE with a defined foreign key? If so, could you please send us an example of such a command?

Thanks for the information.

We look forward to hearing from you.

Vladka + Mario


#5

Pat, any news? Thanks for the update.

Regards,

Vladka


#6

Hello,

I didn’t have much time the last month to test TDM.

I’ve downloaded and installed the last beta version 3.2.3.10, and try a reverse engineering.

I still have a problem with FKs. Some are correctly exported, but the huge majority isn’t.

I’va attached a zip file containing :

  • REMySql5_test.sql : the SQL creation script
  • REMySQL5_test.txp : the result of the reverse engineering
  • REMySql5_test.xls : the result of the first query you asked to run
  • REMySQL5_test.txt : the result of the second query (just on one table : plan_ligne)

The FKs really seems to be there (and Toad for MySQL found them), so I think there’s a bug in TDM.

I’ve tryed to change options on what to RE, but same result.

Hope this coud help.
REMySql5_test.zip (241 KB)


#7

Hello Arnaud,

Thanks for the info and attachment. We will check it out. Thanks for now.

Regards,

Vladka + TDM Team


#8

Hello all,

Thanks very much for the details. Yes, there is a problem. Unfortunately, it will take us some time to fix it. CR # 52 420.

Thanks very much for your patience and co-operation!

Regards,

Vladka + TDM Team


#9

Good luck for the fixing :wink:


#10

Thank you, Arnaud!

Vladka


#11

Hi Arnaud,

problem is somewhere in versions of MySQL.If we put your code in 5.0.41 than everything is fine.If we put it in 5.0.51a than only some relations are RE.

Tomas
QA


#12

I confirm that I’m currently using MySQL 5.0.51a

I’ll try to downgrade to 5.0.41


#13

OK, seems to work well with MySQL 5.0.41.

Are you planning to fix it with 5.0.51a, or not ?

Maybe future version of MySQL will work as the 5.0.51a…


#14

Hello Arnaud,

Yes, definitely, we will fix it. CR # 52 420.

Thanks for your patience!

Regards,

Vladka


#15

Hello, :slight_smile:

Just a quick note to let you know that the CR # 52 420 is fixed in Beta 3.3.3.3 (released today).

Please check it out. Beta download: http://modeling.inside.quest.com/ann.jspa?annID=150

In case of any troubles, please write us back.

Regards,

Vladka


#16

Hi,

I think I stumbled on the same problem again. I’m using Toad Data Modeler (3.3.8.11) and I’m trying to Reverse Engineer a MySQL (5.1.34) database.

Thanks


#17

Hi Rudi,

Thanks for your notification.

We will verify it for MySQL 5.1.34. As soon as I know more, I’ll write back.

Thanks for now.

Regards,

Vladka + TDM Team


#18

Hello Rudi,

Here I’m with the results.

We tested RE of MySQL 5.1.34, connection via TCP/IP, in current full TDM version and also Beta and it works fine for us.

So, please write us what connection method you use + if you can, please send us a sample SQL code that will create two tables and relationship in the database (code that TDM does not load during your RE).

Thanks very much for your co-operation.

Regards,

Vladka + TDM Team


#19

Hi,

Here is code that creates two of our tables with one foreign key.

CREATE TABLE COUNTRY_CODES (
COUNTRY_CODE char(2) NOT NULL,
DESCRIPTION varchar(50) NOT NULL,
COUNTRY_NUMBER int(3) DEFAULT NULL,
PRIMARY KEY (COUNTRY_CODE)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

CREATE TABLE LC_COUNTRY_CODES (
LC_COUNTRY_CODE_ID bigint(10) NOT NULL AUTO_INCREMENT,
COUNTRY_CODE char(2) NOT NULL,
LOCALE varchar(5) NOT NULL,
DESCRIPTION varchar(50) NOT NULL,
PRIMARY KEY (LC_COUNTRY_CODE_ID),
UNIQUE KEY IDX_LCCNTYCO_1 (COUNTRY_CODE,LOCALE),
CONSTRAINT CNTYCO_LCCNTYCO FOREIGN KEY (COUNTRY_CODE) REFERENCES country_codes (COUNTRY_CODE)
) ENGINE=InnoDB AUTO_INCREMENT=481 DEFAULT CHARSET=latin1;

I’m also using the “connection via TCP/IP” connection.

Thank you in advance
Rudi


#20

Please run the following SQL query on your database:

select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE=‘FOREIGN KEY’

Does it return any records (relationships)?

Then, please execute this query:

SHOW CREATE TABLE LC_COUNTRY_CODES

Do you get a DDL command CREATE TABLE with a defined foreign key?

Thanks a lot for the information.

Other questions:
Does your database run on Windows or Linux?
Did you try the ODBC connection type? What was the result?

Thanks!

Regards,

Vladka + TDM Team

Hello Rudi,

Thanks very much.
We’ve executed your commands on MySQL 5.1.34 on Windows and they work fine.
Unfortunately, we failed to simulate the problem.