Emmanuel Noobadmin wrote: > On 9/16/11, Always Learning <centos@xxxxxxxxxxx> 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 _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos