|
-
March 26th, 2010, 05:53 AM
#1
AutoNumber ID column necessary in link table?
Hi,
I am using SQL Server 2005. I have two tables:
Products - has the following columns:
PK_ProdID
ProdName
etc..
and ProductItems - has the following columns:
PK_ItemID
ItemName
etc...
Any product can have any combination of productitems. So I have a third table which stores these links between products and their component items:
ProductLink - has the following columns:
FK_ProdID
FK_ItemID
Quantity
My question is - do I need to have an autonumber ID column on this third table as a primary key? I was thinking that, each product can only have each item in there once so the primary key would be a composite consisting of the two foreign key columns.
Would that be right?
Thanks,
John.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|