I'm currently working a i5/OS -DB2 system, and using DDS sources to create tables, not DDL's. I'm using InfoSphere Data Architect to create a diagram to show the relation of some tables in a database. Its just being used to have a visible ER diagram to print out, along with a report with all the columns in the tables.
Lets say you have two tables, with the following attributes:
Name of Table:
CLCustname (Primary key)
CLAddress (Primary key)
CLCity (Primary key)
Name of Table:
CCCustname (Key / FK from CustLocation-CLCustName)
CCAddress (Key / FK from CustLocation-CLCustAddress)
I added these two tables to a Physical Data Diagram. Then while hovering over the table CustContact and selecting "click and drop to create connection", to show how the keys are related to CustLocation. When this is done all the column keys in CustLocation are copied over to the table CustContact, so that table now has the following columns:
CCCustname (FK from CustLocation-CLCustName)
CCAddress (FK from CustLocation-CLCustAddress)
CCLoanNum (FK from CustLoan-CKLoanDate)
Needless to say, I don't want it copying any columns over at all, because the FK columns are already there with different names. I just want it to make the connection between the two columns in the tables, not create all new columns, plus creating even the other key column (CLCity) that has no relation in CustContact. I've tried right clicking on a table and selecting, Add Data Object -> Foreign Key, and get the same results.
This topic has been locked.
3 replies Latest Post - 2012-03-01T15:51:00Z by SystemAdmin
Pinned topic Issues creating keys/foreign keys connections between tables
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-03-01T15:51:00Z at 2012-03-01T15:51:00Z by SystemAdmin
null 0600011FWD59 PostsACCEPTED ANSWER
Re: Issues creating keys/foreign keys connections between tables2012-02-29T20:24:39Z in response to SystemAdminIf you don't want columns automatically add to child table, you can disable "key Migration" in preference page:
Preferences-->Data Management -->Key Migration --> On Add,
uncheck "Migrate key automatically".
Re: Issues creating keys/foreign keys connections between tables2012-03-01T15:51:00Z in response to nullHi April,
That appears to be doing the job, thanks. Problem is a lot of the keys and foreign keys in the databases I'm working with are not physically labeled as so, but is more considered common knowledge they are. Thanks again.