A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Lookup table



 
 
Thread Tools Display Modes
  #1  
Old April 26th, 2004, 06:30 PM
san
external usenet poster
 
Posts: n/a
Default Lookup table

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
  #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



  #3  
Old April 27th, 2004, 03:34 AM
TC
external usenet poster
 
Posts: n/a
Default Lookup table

Further to my comment, I note you say:

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


Sure it's possible. But that's like saying, "I know I should not pour sugar
into the petrol tank of my car, but is it possible?" Sure it's possible!!

Cheers,
TC


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.