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".
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".