Solved

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

Posted on 2009-04-11
3
261 Views
Last Modified: 2012-05-06
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?
0
Comment
Question by:ditallop
  • 2
3 Comments
 
LVL 57

Accepted Solution

by:
Raja Jegan R earned 500 total points
ID: 24123362
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
0
 

Author Comment

by:ditallop
ID: 24123415
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.
 
0
 

Author Closing Comment

by:ditallop
ID: 31569221
thanks so much for answering...
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now