Solved

MS Visio Entity Relationship Diagram (ERD) doesn't allow multiple foreign keys from the same entity pointed by the same primary key

Posted on 2006-11-05
3
3,951 Views
Last Modified: 2008-01-09
I have a 'material' table and a 'composition'  table.
'composition' has 2 foreign keys: 'Input' and 'Product'.
'material' primary key is 'Id'.
I created two 1 to many relationships: Id --> Input and Id --> Product.

Although this works well in "real life" (in the database schema), I was not able to represent it in Visio 2003 using the ERD database modeling tool. If I try to associate Id to Product after having associated Id to Input, Visio simply changes the previous association to the new one. I can never have both at once. (I am not using reverse engineering at this point)

How can I document this ERD with Visio?

thanks,

Ricardo
0
Comment
Question by:romaciel
  • 2
3 Comments
 
LVL 16

Expert Comment

by:muzzy2003
ID: 17877407
You're pointing the arrows in the wrong direction, aren't you? Try dragging them in the opposite direction.
0
 

Author Comment

by:romaciel
ID: 17877735
Thanks, I indeed misrepresented the association.  
The symbol could be something like Id --< Input and Id --< Product, with < standing for crow's feet.

The relationship I unsuccefully  tried to build in Visio was material PK (Id)  one to many composition FK(Input)  AND
material PK(Id) one to many composition FK(Product).

The relationships above describe materials that can simultaneously be products or inputs (raw materials). 'composition' is the association table that associates one material as a product with (one of) its input(s).

I can have either, not both relationships, in Visio database modeling.
0
 
LVL 16

Accepted Solution

by:
muzzy2003 earned 500 total points
ID: 17877754
You can have the two foreign keys you mention, but Visio may insist on you specifying different verbs describing the associations (defaults are "has" and "is a" I think off the top of my head). I don't have Visio installed on the PC I'm at right now, but can you describe how you are creating these relationships? Are you dragging two new relationship connectors onto the diagram and then connecting them?
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

706 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

18 Experts available now in Live!

Get 1:1 Help Now