Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I draw relationships between tables?

Status
Not open for further replies.

OhioSteve

MIS
Mar 12, 2002
1,352
US
Okay, I am using Visio to model a relational DB and generate DDL. I am drawing relationships between the tables. I have learned to get the connector from the standard toolbar. When I put it over a table, the table becomes outlined in red. Then when I move it to the other table, an arrow appears and the PK from the first table migrates to become an FK in the child. That's cool, but I have two questions:

1) Why does the arrow point INTO the parent? That seems backwards to me. Can I change its appearance, so that the arrows point INTO children?

2)

When I move from the parent to the child, Visio AUTOMATICALLY migrates the PK from the parent to the child. Then, it gives the new field in the child the same name as the PK in the parent. Do fields that participate in a relationship always have the same name?

I have a field called "ID", which is the PK of the table "employees". I want "employees" to be the parent of a table called "audits". However, I want the FK in "audits" to be called "employeeID" not "ID".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top