Re: Database Design Question - any suggestion?

From: pc <magoo_at_pssstoff.org>
Date: Tue, 07 Dec 2004 01:06:57 GMT
Message-ID: <Rm7td.326431$9b.292151_at_edtnps84>


this approach looks novel. wouldn't it also make sense to put all the non-key fields in a vector code? at the database level that would look very elegant. in fact, two columns might not even be the lower limit!

unless you can implement your own 'type' below the database level, my only advice is to check your grep's allowable string length.

hoping this helps,
pc

Alan wrote:

> "--CELKO--" <jcelko212_at_earthlink.net> wrote in message
> ...

>>Design a vector code. Ever see the ISO tire (tyre) sizes? They are a
>>three part vector code: <width in cm><material><diameter in inches>,
>>so you can have a 155SR15 tire that we know is a steel belted radial
>>tire mesuring 155 centimeters wide on a 15" rim.
>>
>>I'd create a hierarchical item component, probably 3 or 4 digits will
>>be enough. Ever seen Dewey Decimal Classification in a library?
>>
>>100's = shirts
>> ...
>>200's = pants
>>210's = jeans
>>211 = low rise jean
>>
>>Then you need a size code, but you showed jeans as being S/M/L instead
>>of waist/inseam. That makes no sense to me, but that's what you said.
>>
>>Then you need a color code. Land color numbers or gif and jpg codes
>>are very precise. A 2-3 letter alphabetic abbreviation might do as
>>well for this application. So ou might have something like:
>>
>> '211-grn-s' = a small green pair of row rise jeans.
>>
>>Then you need a validation check; does your SQL have a version of
>>grep() or SIMILAR TO predicsates?
>>
>>CREATE TABLE Inventory
>>(sku CHAR(9) NOT NULL PRIMARY KEY
>> CHECK (sku SIMILAR TO '[0-9][0-9][0-9]-(grn|blu|wht)-(s|m|l)'),
>> ..);
>> ...
Received on Tue Dec 07 2004 - 02:06:57 CET

Original text of this message