Create UML model from DB2 DDL

General discussions about code engineering

Moderator: Moderators

Create UML model from DB2 DDL

Postby b.chenebault@bluage.com » Thu Oct 13, 2011 1:54 am

I would like to create a model from a DB2 DDL (SQL file format) using a code engineering set.

The SQL script contains the following syntax :

ALTER TABLE A
FOREIGN KEY B
(
LTG_NUM_ORG_CIN,
LTG_NUM_CPG,
LTG_CD_TYP_DOS,
LTG_DTC_DOS
) REFERENCES C;

But the reverse engineering fails.

Does Magicdraw support this SQL syntax ?

Thanks.

Benjamin.
b.chenebault@bluage.com
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Thu Oct 13, 2011 1:37 am

Re: Create UML model from DB2 DDL

Postby PauliusGrigaliunas » Thu Oct 13, 2011 3:08 am

Hello Benjamin,

please try following syntax:

ALTER TABLE A ADD CONSTRAINT B
FOREIGN KEY (
LTG_NUM_ORG_CIN,
LTG_NUM_CPG,
LTG_CD_TYP_DOS,
LTG_DTC_DOS
) REFERENCES C;

Paulius
PauliusGrigaliunas
Customer Support
Customer Support
 
Posts: 59
Posts Rating:0
Joined: Mon Jul 19, 2010 1:37 am

Re: Create UML model from DB2 DDL

Postby b.chenebault@bluage.com » Thu Oct 13, 2011 4:09 am

Thank you for your answer Paulius.
Unfortunately this (strange) syntax comes from a dump file of a DB2 database.
The importation of the file has been tested on another DB9 v9 database with success.
And I cannot replace the full script manually.
Another idea ?
b.chenebault@bluage.com
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Thu Oct 13, 2011 1:37 am

Re: Create UML model from DB2 DDL

Postby PauliusGrigaliunas » Thu Oct 13, 2011 5:15 am

This seems like non standard sql syntax.
My suggestions would be to play with dump options/use other dumping tool
or try to import data directly from db to Magic Draw by creating db2 Code Engineering set and using Reverse from DB option in Round Trip Set dialog

Paulius
PauliusGrigaliunas
Customer Support
Customer Support
 
Posts: 59
Posts Rating:0
Joined: Mon Jul 19, 2010 1:37 am

Re: Create UML model from DB2 DDL

Postby b.chenebault@bluage.com » Thu Oct 13, 2011 7:24 am

Sorry, I had not specified that my databse was DB2 for z/OS.

According to IBM SQL Reference manual for z/OS :
"The ADD keyword is optional for referential-constraint or unique-constraint if it is the first clause
specified in the statement. Otherwise, ADD is required."
Available on : http://publib.boulder.ibm.com/epubs/pdf/dsnsqk1a.pdf

When will this syntax be supported by MagicDraw ?
b.chenebault@bluage.com
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Thu Oct 13, 2011 1:37 am

Re: Create UML model from DB2 DDL

Postby PauliusGrigaliunas » Thu Oct 13, 2011 7:53 am

Registered problem on our bug tracking system. We will review this problem and try to fix as fast as we can.
Sorry for the problems.

Paulius
PauliusGrigaliunas
Customer Support
Customer Support
 
Posts: 59
Posts Rating:0
Joined: Mon Jul 19, 2010 1:37 am

Re: Create UML model from DB2 DDL

Postby b.chenebault@bluage.com » Thu Oct 13, 2011 10:24 am

The bug was posted today on https://support.nomagic.com/browse/MDUMLCS-4567.
Looking forward to a prompt answer on your part.
b.chenebault@bluage.com
Forum Newbie
Forum Newbie
 
Posts: 4
Posts Rating:0
Joined: Thu Oct 13, 2011 1:37 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests