[CentOS] Upgrade from 5.6 => 5.7

m.roth at 5-cent.us m.roth at 5-cent.us
Fri Sep 16 14:47:29 UTC 2011


Emmanuel Noobadmin wrote:
> On 9/16/11, Always Learning <centos at u61.u22.net> wrote:
>> 	C1
>>
>> 	c1ref
>> 	c1customer	(code)
>> 	c1quantity	(integers only)
<snip>
>> then do a query:
>>
>> select c1quantity, c1price, c1discount from c1 where c1customer =
>> 'joebloggs' and c1date like '10%'
>
> Isn't it bad practise to store customer reference by name? What
> happens if we want to look up a customer called John Smith and there
> are say a dozen of them?
>
> I would at the very least have a separate table holding core customer
> information with an auto-incremented ID so that customers with the
> same name won't cause a problem. Of course, that would mean requir

I would, also. Actually, I'd rather have an autogenerated ID, since unless
your name's as short as mine, most times the key will be shorter than the
name, and faster on lookups.

On the other hand, customer *does* change more frequently than it used to,
I'd think: online, you get folks from all over, not just someone in town;
then, they may buy once, and that's it, you never hear from them again.

          mark




More information about the CentOS mailing list