Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 FKs in one table to multiple tables
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

2 Posts

Posted - 08/30/2012 :  10:53:38  Show Profile  Reply with Quote
Seems like this is a basic thing and that I already understand it, but wanted to make sure.

A quick description of a situation.

An orders table with an orderID column that is the PK
A products table with a productID PK.
An ordersdetail table with FKs to both orders.orderID and products.productID.

Is this the right way to set up the ordersdetail table, with a FK to the order table and the product table?


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 08/30/2012 :  10:57:59  Show Profile  Reply with Quote is so that values in orderdetail corresponds to valid product or order value

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000