Benefits of using domainsDomains are reusable user-defined types or "attribute templates" that promote consistent domain definitions. You construct domains as you would attributes, specifying a name, data type properties, default values and validation rules.
You can reuse domains in your data model by applying them to attributes.
Some benefits of using domains:
A number of common errors can be prevented if inappropriate values cannot be entered. A constraint placed on a domain ensures that all columns and variables intended to hold values in a desired range or format can hold only the intended values.
Domains can make it easier to understand the structure of a database.
It is very easy to propagate changes. When you change a domain (data type or check constraint or default value), all changes automatically propagate to attributes that reference it. Less work.
You can use domains even if your target DBMS does not support domains. DeZign for Databases will convert the domains to regular data types and check constraints when you generate your database.
- DeZign for Databases: Learn more about DeZign for Databases.
- Getting started with DeZign for Databases: Start making a data model directly.
- Display data types in a diagram: Learn how to display data type and/or domain info in the entity boxes on your diagram.
- Build your next data model with DeZign for Databases trial software, available for download directly from Datanamic's download section.