Re: Other attributes besides type,precision,scale

From: Kenneth Downs <knode.wants.this_at_see.sigblock>
Date: Wed, 06 Apr 2005 08:45:42 -0400
Message-Id: <9a2di2-62e.ln1_at_pluto.downsfam.net>


Gene Wirchenko wrote:

> 

>>table vendors {
>> column company_name { type: varchar; precision: 40 }
>> column website { type: url }
>> ...other columns...
>>}
> 
>      That looks fine to me.
> 

>>The other option is to keep the types more pure and add a flag to the
>>column definition, which is then interpreted where appropriate by the
>>various tiers, so that we define the column as:
>>
>>column website { type: varchar; precision: 40; url: yes }
> 
>      You are jumbling URLs and non-URLs together.  This is LESS pure!
> 

Yeah, I ended up making it a type, it just felt more correct. What steered me away from the flag idea was all of the clutter of validating flag combinations, like "url" cannot be applied to int, figuring what flags it would conflict with, and so forth. Making it a type solved many problems at once.

-- 
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth_at_(Sec)ure(Dat)a(.com)
Received on Wed Apr 06 2005 - 14:45:42 CEST

Original text of this message