Subject Re: [firebird-support] The use of domains
Author Lester Caine
Rob Larter wrote:

> What exactly is the use of domains for?

To provide a useful short cut to designing tables.

> As I understand it, you create one for a field to reference to if you are
> likely to use that field in a where clause, is this correct? or have I got
> hte wrong end of the stick?

In a 'relational' database, sub-tables will have the same fields as the
master tables, which relate to one another. Use of the domain name means
that changes in later designs to the constraints on a field only have to
be edited once, and all the uses will be updated.
Clever uses such as designating an address line domain with a particular
'setup' and then using that domain for several address lines so you
don't have to repeat the details.

> I am new to FireBird so still learning all the methods for it. But seems
> nice so far.

The problem is unlearning bad habits if you have been using something
else first.

Lester Caine
L.S.Caine Electronic Services