Thread: Lookup table
View Single Post
  #2  
Old April 27th, 2004, 03:08 AM
TC
external usenet poster
 
Posts: n/a
Default Lookup table

You should not duplicate the customer name in the sales table.

The purpose of the customer table is to store the customer's attributes
(such as their name) in one place only. Other tables (such as the sales
table) can certainly contain the customer ID (if appropriate), but they
should not repeat the customer name etc.

You need to learn about "database normalization". Start here for a dry, but
instructive read:
http://support.microsoft.com/support...es/Q100139.ASP

HTH,
TC


"san" wrote in message
...
I have a table customer with two fields customerid and
customer name.
There is one more table sales with customerid and customer
name in it.
The relationship is one to many ( Customer to sales )

Now this is what I want to be working in table.
As soon as I enter a new record with the customer id in
sales table it should get the customer name from customer
table and fill up the customer name field of sales table.

I know this is not a correct design but is it possible?


Any suggestions will be highly appreciated.
Thanks,
San