• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 321
  • Last Modified:

assigning unique primary keys which are two foreign keys in an association table

I have an association table with two foreign keys (e.g. stakeholderID, contactID)  that I would like to express in an er diagram.  The tools I have for drawing the er diagram are ms visio 2007 -- and sql server's diagramming feature through management studio.

also, is there any way to express an alternate key?
Paula DiTallo
Paula DiTallo
  • 2
1 Solution
Raja Jegan RSQL Server DBA & ArchitectCommented:
So stakeholderID, contactID forms the primary key of that table and in your ER diagram show both of them as primary keys.
What do you mean by Alternate Key
Paula DiTalloIntegration developerAuthor Commented:
cool. ultimately i did just that--with the 2 foreign keys in the _assoc table.  alternate keys may be more of an ERwin/Oracle partnership. In general an alternate key (read: AK1, AK2, etc.) is a candidate that could be used to retrieve (generally) unique data but isn't the primary key.  I hate to use the ol' warn employee table as an example ... but its helpful in the case -- so, an emplID or socSecNum might be primary keys, but something like a badgeNum would be an alternate key.
Paula DiTalloIntegration developerAuthor Commented:
thanks so much for answering...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now