Multiple Tables Question

  • Thread starter stripedfrog via AccessMonster.com
  • Start date
S

stripedfrog via AccessMonster.com

I want to make sure I understand how to handle multiple tables. I have a
table created for dealers that sell "product A". There are also two other
products that are sold but not every dealer carries all three products.

I understand I need two other tables for "products B and C" but am a bit
confused. What fields need to be in these two tables? The primary key will
be the dealer's account number. Then what do I put?

Thanks.
 
D

Duane Hookom

You should have tables of dealers, products, and dealer/products.
Minimally, I would create:

tblDealers
=============
dlrDlrID autonumber primary key
dlrName dealer name

tblProducts
===========
prdPrdID autonumber primary key
prdName product name

tblDealerProducts
=============
dlpDlPID autonumber primary key
dlpDlrID relates to tblDealers.dlrDlrID
dlpPrdID relates to tblProducts.prdPrdID

The tblDealerProducts table is referred to as a Junction table.
 
J

John Vinson

I want to make sure I understand how to handle multiple tables. I have a
table created for dealers that sell "product A". There are also two other
products that are sold but not every dealer carries all three products.

I understand I need two other tables for "products B and C" but am a bit
confused. What fields need to be in these two tables? The primary key will
be the dealer's account number. Then what do I put?

Thanks.

See my reply in your other thread.

John W. Vinson[MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top