mailman62
11-29-2004, 04:23 AM
Hi,
I have a little problem with the detection of entities and relationships in rational databases.
I want to write a algorithm to identify entities and relationships.
My first thougth was to look whether the primary key of the actual relation (table) only consists of foreign keys (then the relation is a relationship table). This worked for 80 %.
Then I thougth about the idea that if foreign keys are only part of the primary key of the actual relation ( then the relation is a relationship table). This also worked for 80%, but not the same 80%.
Does anyone have an idea to solve my problem.
Thanks, mailman62
I have a little problem with the detection of entities and relationships in rational databases.
I want to write a algorithm to identify entities and relationships.
My first thougth was to look whether the primary key of the actual relation (table) only consists of foreign keys (then the relation is a relationship table). This worked for 80 %.
Then I thougth about the idea that if foreign keys are only part of the primary key of the actual relation ( then the relation is a relationship table). This also worked for 80%, but not the same 80%.
Does anyone have an idea to solve my problem.
Thanks, mailman62