Joints

Standard joints

The tool Add Standard allows you to create automatically the links between tables:

When joints have been modified or added manually, it is possible to add them to the Vigilens standard joints library: just use the button Record standard joints, a screen allows you to select the joints then give a name to the joint.

Manual Joints

If the necessary joints are not known to Vigilens, these links must be specified manually.

Add

The first field of the join, the relationship type, and then the second field is selected.

Joint Type

You can choose to have an open or closed joint.

Joint Conditions

Use Case

Although very similar, this section should not be confused with the “Extract according to the following rule” screen. The filters indicated here will be applied __ before the join is made. This distinction is important in the case of open joints, as the result would not be the same.

From an SQL point of view, it is the difference between

SELECT Parent,* Child,* FROM Parent
LEFT JOIN Child
ON Child.Id = Parent.Id
AND Child.Name = 'Barnabé'.

and

SELECT Parent,* Child,* FROM Parent
LEFT JOIN Child
ON Child.Id = Parent.Id
WHERE Child.Name = 'Barnabé' = 'Barnabé'.

The first case is equivalent to putting the condition on the joint: all the parents, and their children if their name is Barnabé, will be included in the selection.

The second case is equivalent to putting the condition on the “Extraction according to the following rule” screen. We will only retrieve the parents who have a child named Barnabé. The filter “killed” the open joint.

Editing Criteria

General conditions

A condition can be transferred to the general conditions list.