24.12.2012 Views

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

ER/Studio - Embarcadero Technologies Product Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

USING <strong>ER</strong>/STUDIO > WORKING WITH THE DATA DICTIONARY<br />

Domains are reusable attribute templates that promote consistent domain definitions. You construct domains as you<br />

would attributes, specifying a name, datatype properties, null status, default values and validation rules. After creating<br />

domains, you can re-use them in your data model by applying them to attributes and table columns. By defining a<br />

domain, you also gain the power of propagating changes to the underlying domain definition to all attributes and table<br />

columns that reference it.<br />

One important method for enforcing business rules is to define and to apply domain restrictions. Domain integrity<br />

refers to the rules governing what values an attribute can take. By restricting and validating an attribute’s values, you<br />

can implement important business rules such as ensuring that a checking account maintains a positive balance, or<br />

preventing the entry of invalid phone numbers.<br />

<strong>ER</strong>/<strong>Studio</strong> lets you organize your domains using domain folders. Domain folders let you create and manage your Data<br />

Dictionary Domains. You can classify domains in unique groups by creating different domain folders. You can create<br />

nodes within nodes. You can move existing domains into a domain folder, or create new domains within the folder.<br />

Domains can be dragged and dropped into a table or entity to create a column or attribute. Domains can also be<br />

dragged onto another domain to create a subdomain, by moving the selected domain beneath the target domain.<br />

Domains can also be copied and pasted onto another domain to create a copy of the selected domain as a subdomain<br />

or the target domain. Note, changes to the copied domain will not be inherited by the pasted subdomain.<br />

Domains can have nested subdomains or child domains that initially duplicate most of the attributes of the parent<br />

domain, but can have divergent behaviors once created. A Domain Override option in the Add Domain or Edit Domain<br />

functions creates inheritance and overrides the domain system without losing the valuable relationship with the<br />

attributes/columns (binding information).<br />

NOTE: When you delete a domain folder, all domains and folders within that folder are also deleted. All<br />

bindings to any columns and attributes are unbound.<br />

Create a Domain Folder<br />

1 On the Data Dictionary tab, right-click the Domains node and then click New Domain Folder.<br />

2 Enter a name for the domain and then click OK.<br />

Create and Edit a Domain or Subdomain<br />

1 To create a domain at the root of the Domains node, on the Data Dictionary tab, right-click the Domains node<br />

and then click New Domain.<br />

To create a domain within a domain folder, on the Data Dictionary tab, expand the Domains node, right-click<br />

the node of a domain folder, and then click New Domain.<br />

To create a subdomain (a domain within a domain folder), on the Data Dictionary tab, navigate to the domain<br />

folder where you want to create the subdomain, right-click the domain folder, and then click New Domain.<br />

2 Define the domain as required and then click OK to complete the editor.<br />

TIP: Once created, you can edit the domain by double-clicking its object on the Data Dictionary tab to<br />

launch the editor.<br />

The following describe options that require additional explanation<br />

Datatype tab<br />

• Receive Parent Modifications: For subdomains, lets you synchronize changes made to the attributes of a<br />

parent domain with a those of the child domain. Selecting this option automatically synchronizes parent and child<br />

attributes, except those specified on the Reference Values, Naming Standards, Attachment Binding, and Binding<br />

Information tabs. Not selecting this option creates a child domain that is initially identical to the parent domain,<br />

except that the child domain is created without any attachment bindings. Subsequent changes to the parent<br />

domain will not be inherited by the subdomain. Any changes you make to the subdomain will override the values<br />

inherited from the parent domain. Henceforth, the child can only inherit attributes from the parent if these<br />

attributes were not previously specified for the child.<br />

EMBARCAD<strong>ER</strong>O TECHNOLOGIES > <strong>ER</strong>/STUDIO® 8.0.3 US<strong>ER</strong> GUIDE 234

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!