Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
GoDaddy
Yak Posting Veteran
64 Posts |
Posted - 2009-11-05 : 09:14:37
|
Let's say I have these Tables : Carriers (UPS, FedEx, etc)CarrierServiceType (Ground, Air, etc)CarrierServices (carrierId, carrierServiceTypeId) [M-N] relationshipOrders (carrierId, carrierServiceTypeId)On CarrierServices the PK is both FK.Now on the Orders, I made a FK using both carrierId and carrierServiceTypeId to point to CarrierServices.My question is, do I still have to do a seperate FK from carrierId to Carriers and carrierServiceTypeId to carrierServiceTypes?IMO, I shouldn't need it since the integrity is already enforce from the CarrierServices table.I just want to make sure I'm doind the right thing.Thanks, |
|
nathans
Aged Yak Warrior
938 Posts |
Posted - 2009-11-07 : 02:40:01
|
Right, you dont need the CarrierId in the Orders table at all in this model. |
|
|
|
|
|