UML->DDL questions

General discussions about code engineering

Moderator: Moderators

UML->DDL questions

Postby P0rridge » Tue Mar 29, 2011 2:06 am

I am generating Oracle DDL from a class diagram and have some thing I want to do, but not seeing:

1) Enumerations cannot be transformed from UML Types to Oracle? What options do I have, my UML class diagram is full of attributes with an enumeration type but I cant drag them into the Code Engineering ste, so they dont get created.

2) Generalisations - I want a one to one optional relationship in Orcle to be generated - I am just seeing a message that says the relationship wont be created - what are my options?

3) Timestamps etc - my DBA wants a timestamp, verisoning attributes and few others things on every table. Is there a way to have to tool generate these by default?

4) Mandatory fields - I am not seeing any impact of my Multiplicity in the DDL - I want to force not nullable in the Oracle tables, but I am not seeing that.

We are using MD v16.5

Forum Newbie
Forum Newbie
Posts: 11
Posts Rating:0
Joined: Tue Apr 20, 2010 3:10 am

Re: UML->DDL questions

Postby saulius_p » Thu Apr 07, 2011 1:49 am


If you are working with UML model and trying to generate Oracle DDL script directly form it, I would suggest first to transform your UML model using UML To Oracle DDL transformation. Only then generate Oracle script from transformed model.
Or you might create your model using Oracle DDL Profile and Oracle DDL Diagram. I am suggesting to use this profile because Code Engineering Set's DDL part relies on Oracle DDL profile or Generic DDL profile to generate db scripts.

Regarding your questions:

1) There is no such enum concept in Oracle. You could define enum with check constraint or custom object types but no direct mapping exists.

2) Starting from MD 16.8 version you can transform Generalization into foreign key. Prior to this MD version Generalizations will be ignored.

3) No, you can not generate properties like this.

4) You can specify multiplicity for class attribute. If you set it to 1 and run transformation, this will be transformed to property with <<not null>> stereotype. Then your generated scripts from transformed model will have not null constraints on columns. Or you can set <<not null>> constraint directly on property.

Let us know if you have any questions.
Best regards,
Saulius Pavalkis
User avatar
No Magic
No Magic
Posts: 259
Posts Rating:8
Joined: Fri Dec 04, 2009 5:37 am
Full name: Saulius Pavalkis

Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests