|
|
 |
Re: FN-FORUM: Storing the leading 0 of product codes in MySQL
date posted 11th October 2006 12:04
Ben Moxon wrote:
>
>
>
> Tony Crockford wrote:
>>
>>
>> I'm puzzled as to why you're splitting the product code! What
>> possible reason could you have for storing a product code in two pieces?
>>
>>
>> sometimes this list baffles and bemuses me to the point of exasperation.
> Perhaps the product code is split into something like product category -
> product id, so that 123-23F1A might indicate that the product belongs in
> category 123 ( cats and other monsters ) and then 23F1A would be a
> unique identifier within that category. In that case splitting it up
> would just be good normalisation.
still don't see it. if you split it up, it implies that there's another
code for the product - a product ID in a table that stores the two parts
of the split product code, which seems to me to be anything but good
practice.
we've gone from using product code as the unique identifier (primary
key) to having another primary key and adding surplus data fields.
what would be wrong with extracting the category part of the product
code (if it exists) as part of the sql?
Sometimes I feel the freelancers forum is full of people that bumble
along and don't even have enough common sense to ask questions in a
meaningful way.
and then we're all left wondering what the answer was.
does anyone else feel that this forum sucks their brains dry?
or is it just me...
;o)
|
 |
|