Toad World® Forums

Attributes, domains, rules and ddl script


#1

Hi,
I’m using a TDM Logical Model to create a new set of database tables, which will be added to our exisitng Physical Model later.

I’ve downloaded TDM 3.3.8.11 for this.

I’ve created a domain with a rule for range checking. I’ve used this domain in my tables.

After converting to a physical model (Ora 10g) the domain check constraint is empty and there is a note “check constraint was created from logical model sql could be mismatch”.

I entered the SQL in the domain check constraint but this does not appear in the generated DDL

So, how do I create a domain in the LM and add check constraints that will be added to the DDL script?

Regards
Malcolm


#2

Hi Malcolm,

Thanks for your email.
After the conversion to Oracle 10g model, please see:

  • Model Explorer | Check Constraint Rules. Edit the Rule and see the SQL tab - the code should be written there.
  • the Domain Properties dialog | Check Constraints tab | edit the Rule -> the Check Constraint Properties dialog will open. In this dialog, see the General tab:
    in the Check Constraint Rule box, the particular Rule will be selected, which is O.K.
    Now see the Generate checkbox at the bottom of the dialog. It is clear therefore it is not generated in SQL script. Please select the Generate checkbox.

The checkbox should be selected by default. We will fix it. CR # 60 384.

The reason why the code is only in the Rule (Check Constraint Rule Properties dialog) is that if you need to make a change, you will do it only in this dialog and the change will be propagated. (You don’t have to edit e.g. all domains…)

Note: SQL code is copied and commented ("–"). .Manual changes are necessary in this case.

If you have any questions, please write me back. Thanks.

Regards,

Vladka + TDM Team