If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Import with foreign keys not showing relationships

Started by kennedto, 08 Aug 2014 08:45:50 AM

Previous topic - Next topic

kennedto

I have a database (DB2) that has foreign keys.  When I import with FM these relationships do not show up in the diagram.
I did click the the "Use primary and foreign keys" and the "Use the imported query subjects" checkboxes on the import.
FM is configured to show relationships.

Any idea what I am missing here?

bdbits

Are the foreign keys actually declared as foreign keys in the database (if DB2 supports that)? I believe those options rely on declared referential integrity. If not but the column name is the same in both parent and child table, there are options to "use matching query item names" with or without indexes. Maybe those can work in your case.

Sadly, in my experience sometimes FM is not real good at automagically detecting relationships. In which case, you might have to build them yourself.

kennedto

saYes, foreign keys are declared. 
Some of the keys same ave name and some do not.
For tables with keys with same name I have this

Child1(ISS_ID)->Parent(ISS_ID)
Child2(ISS_ID)->Parent(ISS_ID)
....

If I try to use the matching query names, I do get the parent child relationship, but also relationships between the children which is not correct.
There are lots of children, so it looks like spaghatie:(

Sure be nice if this function worked.

Here is example of foreign key declarations.
-#SET :FOREIGN_KEYS::FK16_HD_ISSUE
ALTER TABLE ""."HD_ISSUE"
ADD CONSTRAINT "FK16_HD_ISSUE" FOREIGN KEY
(
"ISS_PRJ_ID"
)
REFERENCES ."HD_PROJECT"
(
"PRJ_ID"
)
ON UPDATE NO ACTION
ON DELETE NO ACTION
;