Foreign key

  • We have a table LogoDesign with a single column primary key called DesignNumber. Which is a foreign key for another table 'LogoOwner'. But now the developers want to add another column of the LogoDesign table to the primary key - so it will be a new combined primary key DEsignNumber+Salesrep. Now the problem is that the foreign key contraint for LogoOwner will not be in place if we try to make that primary key a new combined one. is there any way to get around this without creating new tables to split up the existing tables?

    Thank You

    S D Khan

  • If there are a discreet set of designs and a discreet set of sales reps then you need a separate mapping table with a combined primary key of LogoDesignID and SalesRepID.

    If a single design can only ever be associated with one salesrep then one field needs to be a primary key and the other a unique constraint.

    the only reason for a compound primary key is when sales reps can share designs

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

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