0

i have a big DB, and i wants to create query that i give her two name of tables and she give me the relationships between her.

for example: in my DB i have three table:Person,SupportActitvity and ProcessesSupportActivity. Person related to SupportActitvity , and SupportActitvity related to ProcessesSupportActivity if i want to get the ProcessesSupportActivity for Person i write:

select * 
from person 
join SupportActivity on Person.PersonId=SupportActivity.PersonId 
join ProcessSupportActivity on ProcessSupportActivity.SupportActivityId=SupportActivity.SupportActivityId

I want that when i write that for Person and ProcessSupportActivity he give me the relationships.

he return:

  1. Person PersonId SupportActivity PersonId
  2. SupportActivity SupportActivityId ProcessSupportActivity SupportActivityId

Thank you very much!!!!

adina
  • 71
  • 6

1 Answers1

0

to look for the shorter way, I call to dijkstra algorithm. The graph is constructed from all tables in DB, Each table it's was a node in the graph. and the path it's was all of the relation of table. obviously that the graph build in signaltone אם economize runtime. And when you want to discover a connection between two tables in the database you send the source table and destination table and get the path.... It works amazing

adina
  • 71
  • 6