A question about Constraints

  • Given the following 3 tables:

    Sales Order - Primary Key SOID

    Sales Order Detail - Primary Key SOID and Line #

    Shipping Details - Primary Key SOID and Line #

    I put a contraint on the Sales Order Detail to make sure the SOID is in the Sales Order Table.

    I put a constraint on the Shipping Details to make sure that the SOID and the Line # exist in the Sales Order Detail.

    Is it a good or a bad idea to add another constraint to the Shipping Details table to make sure that the SOID exists in the Sales Order Table? It seems redundant to me but I don't have enough experience to know if I am correct or not.

    Thanks

  • meichner (6/1/2009)


    I put a constraint on the Shipping Details to make sure that the SOID and the Line # exist in the Sales Order Detail.

    ... It seems redundant to me ...

    Thanks

    I think you have answered your question right here.

  • Lynn Pettis (6/1/2009)


    meichner (6/1/2009)


    I put a constraint on the Shipping Details to make sure that the SOID and the Line # exist in the Sales Order Detail.

    ... It seems redundant to me ...

    Thanks

    I think you have answered your question right here.

    Thanks for the fast response. As I said, I don't have enough experience to know if I was correct or not.

    Thanks again

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply