Domains - Firebird

In Firebird you can pre-package a column definition, with a data type and a “template set” of attributes, as a domain. Once a domain is defined and committed, it is available for use in any table in your database, just as if it were a data type in its own right.

Columns based on a domain definition inherit all attributes of the domain: its data type, along with any number of optional, extra attributes, including a default value for inserts, validation constraints, character set, and collation order.

Any attribute except the data type can be overridden when the domain is used to define a column in a table definition, by replacing an attribute with a different, compatible attribute or by adding an attribute. Thus, for example, it is possible to define a domain with a complex set of attributes, not including NOT NULL, which can be made nullable in some usages and NOT NULL in others.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

Firebird Topics