Domains provide a quick way to speed the database design process and make the model easy to maintain. You can assign domains to attributes to enforce business decisions on data type, and, if additional physical model characteristics are assigned to that domain, to speed the creation of a corresponding physical model.
Instead of assigning constraints to each column individually, you can create a domain and use it to set multiple properties for a column in one step. If you subsequently need to change a column property, rather than changing the property setting for each column, you can simply change the domain and all the associated columns are updated automatically.
For example, if the model contains several different United States phone number columns (such as home_phone_area_code, business_phone_area_code, and so on), you can create a domain named AREA CODE for which the data type is defined as SMALLINT. In addition, you can attach a list of valid AREA CODES to the domain in a validation rule (201, 202, 203, 204, and so on) and assign the local area code as the default value (609). Finally, you can assign a display format that inserts parentheses around the area code. When you assign the AREA CODE domain to a column that stores telephone area code information in your database, it automatically inherits the complete set of inheritable domain properties defined in the Domain Editor.
Copyright © 2013 CA.
All rights reserved.
|
|