Foreign Key/Primary Key

JvdB

Member
Hi all,

Does anybody know how I can find the relation between tables through the use of _file and _field?
What I want is similar to the table relations report in the data dictionary or data administration.
I can easily see what tables have a certain field with a query on the _field and _file table.
However I don't know how i can see if a field is foreign or primary.
How does progress determine this in the tablerelations report that you can generate?

Any clues anybody?
Thnx in advance,

J.
 

jongpau

Member
I *think* what the Progress report does (in my 9.1D) is look at the fields in the primary key of each table and then tries to match these with the names of fields in the other tables. Funny thing is, I don't think Progress tries so much to match these with indexed fields; I just had a look at my table relation report and Progress already reports a "table 1 of table 2 (field 1,field 2)" on a new related table that I created for this little test which does not even have a single index defined for it. The two fields it lists are however the fields of the primary key of "table 2"

My curiosity is now aroused as well. Has anyone ever had a close look at the table relations report in the dictionary?

By the way: love your avatar :awink:
 

JvdB

Member
Well I managed to find an posse baseline 1.1 on one of my backups.
I extracted the code which i think generates the report and will look into that.

At a quick glance yesterday evening though it seems that next to the _file and _field table they also use the _index table.

Will have a further look today I hope.

J.
 
Top