Add "Related Tables" option in Visual Query Builder

Avatar
  • updated
  • Completed

I often work with multiple very large databases with hundreds of tables and need to write queries involving multiple tables that I am not familiar with - typically, I can fairly quickly find one or two tables that I know are relevant to my query, but finding the entire chain of joined tables is very time consuming.  It would be *extremely* helpful to have the ability within the Visual Query Designer to (instead of just choosing "Add Object") right click a table on the query canvas and choose "Add related table" which would open a window showing only the tables that are related (via foreign key declarations).  An additional nice feature would be if it showed the type of relationship (1:1, 1:many, Many:1) beside each table.


This feature is very similar to the "Show Direct" function in MS Access.

Avatar
Anonymous
Now tables are always added even if they already exist in the query.
Avatar
Anonymous
Thank you for your notice. This behavior will be changed in one of the next builds.
Avatar
Trevor Gould
I think I may have encountered a small bug.  When using the related tables button, if I chose to add a table that already exists on the query canvas, instead of adding a 2nd instance of that table, it instead just activates the existing instance.  An example of where this would occur is if you have an [Employee] table with a [SupervisorID] column self-referencing the [Employee] table; after adding a second instance of the [Employee] table joined on [SupervisorID], if I then try to join a table to the {Supervisor} instance of [Employee] via the "related tables" button, it will not create a new instance of the table I want to join if one already exists.
Avatar
Anonymous

Yes, this feature was added in 2.10.0.1.

Avatar
Trevor Gould

Is this in version 2.10.0.9?

Avatar
Anonymous

Done.

Avatar
Trevor Gould

Awesome.  I've been searching for any other SQL clients that have this and can't find a single one that has it.

Avatar
Anonymous

Will be ready soon.