Previous Next

CONNECTED AS clauses in the USoft Rule Language serve to identify a USoft relationship (as declared in USoft Definer) that defines how data from multiple tables are to be joined.

CONNECTED AS in a USoft context is a synonym of RELATE. Because RELATE, in turn, is equivalent to conventional WHERE clauses that spell out how the parent column(s) correspond(s) to the child column(s), CONNECT AS is also a synonym of these conventional WHERE clauses.


CONNECTED AS   table-alias-1 single-string-parent-role  table-alias-2

where the required and all-capitals single-string-parent-role is the same or similar to the (all-capitals) Parent Role value for the relationship as defined in USoft Definer:

If the Parent Role value does NOT contain a space, it is equivalent to single-string-parent-role, whether surrounded by optional double quotes or not;

If the Parent Role value DOES contain one or more spaces, you must surround single-string-parent-role by double quotes.

For example, if you have a relationship "Customer PAYS FOR Rental" with Parent Role = PAYS FOR, and you use table alias "c" for customer and "r" for rental, the CONNECTED AS looks like this:



USoft Rule Language

USoft SQL Equivalent

Conventional SQL Equivalent

FOR                drivers d
,                  rentals r
,                  "business parties" b

,                  b "PAYS FOR" r
AND                r.paid = 'N'

SELECT       ''
FROM         driver d
,            rental r
,            business_party b

,            b "PAYS FOR" r
AND          c.paid = 'N'

SELECT       ''
FROM         driver d
,            rental r
,            business_party b
WHERE = r.driver_id

AND = r.customer_id
AND          c.paid = 'N'