Subject | RE: [firebird-support] Re: must create dommain? |
---|---|
Author | Leyne, Sean |
Post date | 2003-08-07T23:16:07Z |
Helen,
'users' of the domain unchanged! (Your reply didn't really consider
this option)
Sean
> >Is there any best pratice to use? If I create one dommain for eachI would say yes.
> >different type is a good solution? For example, one domain for
> >char(2), one dommain for char(1), other to char(10). This is normal?
>
> No.
> Generally, you would create a domain to comprise a number ofVery true!
> attributes, and then re-use that domain for all columns that
> need to have those attributes.
> There is no point in creating "one-use" domains that have noBut it was never said that the domain would be "one-use"!
> attributes except data type. Firebird already does that.
> Here are a couple of examples where domains are useful. AllGreat examples -- although my boolean is a smallint (0 or 1) ;-)
> of my dynamic tables have generated primary keys. Thus, in
> a Dialect 3 database, they are always non-null BigInt. So I
> have this domain:
> I don't think it is a good idea at all to define domainsIf too narrowly defined, true!
> purely on the basis of type and size and then use them to
> define columns that are controlled by different sets of
> business rules.
> One member of the domain could change its requirementsSimple! Change the domain for the exception item, leave the other
> independently of other members' usages of it. What
> happens then?
'users' of the domain unchanged! (Your reply didn't really consider
this option)
> Are you going to change the domain to fit that oneOf course not!
> member, and break the domain for all of the other usages?
Sean