Show/Hide Toolbars

TMS Data Modeler Documentation

Navigation: Editors


Scroll Prev Top Next More

To create domains


1. Select Domains on the Create tab on the Home ribbon.


2. On the Domains editor dialog, you may create a domain by right-clicking on the Domains lists or selecting of the Add buttons. This dialog allows creation of two types of domains, which are indicated at the bottom of the screen as 'Logical domain (not in database)' or 'Physical domain (kept in database):


Physical domain: created as a 'domain' object and kept in the database (command 'CREATE domain'). A field using this type of domain is generated through a direct reference to this object.


Logical domain: used only on Data Modeler's project, not created physically in the database. A field using this type of domain is generated with the properties defined by this domain.


3. You are able to set all domain data on the General tab:


Domain name.


Data type: lists all available data types on the DBMS in use.


Physical type: non-editable. It displays the settings of the physical type applied in the domain/field when the database is generated, based on specifications of logic type, size etc. This editor shows the exact type definition on the generated script.


Size: this editor will be enabled when applicable, as for alphanumeric types.


Precision: decimal and numeric types will enable this editor.  It defines precision for these data types.


Seed: identity types will enable this editor. It defines the initial number of an auto-increment field.


Increment: identity types will enable this editor. It defines the increment value of an auto-increment field.


Default value: the field is automatically filled with a specific value when inserting a new record in the table.


Constraint: a formula for validation / condition that must always be true. For example, the field age could have a check constraint of "Age > 18". It will not be possible to insert a record in this table that does not satisfy this condition.


4. On the Information tab, you are able to add any documentation or description info to better identify the domain later.  The Usage tab allows you to visualize all the domain's related fields on all project tables.


5. By clicking Close, all updates will be saved.


Using Domains


To associate a field with an existing domain, go to the Fields tab on the Table editor. On the Properties tab, select the desired domain from the list. All settings automatically loaded from the domain will be filled and editors related to these settings will be disabled.


You can manage all domain information in the Domain editor. To open the editor, select Domains on the Create tab on the Home ribbon.


By selecting a domain from the Domain list, you are able to view and edit its settings on the General tab, automatically adjusting all related fields. You can also update its description by editing the Information tab, or visualize its related fields on all project tables on the Usage tab.