How does the Default Rule feature work in Beta? Is there a movie or documentation on an example for the Logical Model? How should the SQL look for a default rule?
You’re right, in the Help file, there is only some basic information.
So, please find attached a doc with some examples and screenshots. I believe it will help.
Just to sum up:
In PER model, Attribute Properties dialog, you can write a default (see the Default box) or define a Default Rule (see the combo-box and a button on the right, which opens the Defaults dialog. - Accessible also from the Model menu | Defaults).
In the Default Properties dialog | SQL tab, write an expression of the default (default values).
In PER model, you can also define Check Constraint Rules.
In LER model, Attribute Properties dialog, you can define a Default Rule the same way as in PER model (in the Defaults dialog accessible also from the Model menu | Defaults.)
Valid Values tab is available only for the following data types:
Bigint, Float, Integer, VarChar.
Note: Character in the future. CR # 37 052.
In TDM3, valid values in LER model = check constraints in PER model (feel free to check out the conversion).
If the Valid Value tab is not available (depends on the selected data type), you can use rules (see the Rules tab).
Well, I hope this will help a little. If you have any questions, please write me back. Thanks.
Defaults.doc (131 KB)
Just a quick update:
I’ve created two new CRs.
CR # 39 485 - to document this issue in Help file and Manual.
CR # 39 486 - suggestion to change Defaults item to Default Rules (Model menu)
If you have any remarks or comments, please feel free to write us. Thanks.
Vladka + TDM Team