This section explains how to:
Define associations between views.
SELECT_NAVIGATIONAL, execute queries that allow “navigating” through the associations defined between views.
These two elements, along with the primary key support of views, are part of the REST architecture of the Denodo Platform.
The main feature of this architecture is the RESTful Web service, which is described in the section RESTful Web Service of the Administration Guide. This service allows clients to browse through the contents of Virtual DataPort using an HTTP interface.
An association represents a relationship between two views in a similar way a join view links one view with another one. The section Associations of the Administration Guide explains this concept in more detail.
This section explains the VQL statements to create, modify and delete associations.
CREATE [ OR REPLACE ] ASSOCIATION <identifier with database> [ REFERENTIAL CONSTRAINT ] [ FOLDER = <folder:literal> ] [ DESCRIPTION = <association_description:literal> ] ENDPOINT <role_name:identifier> <view_name:identifier> [ <mult:multiplicity> ] [ PRECONDITION <condition> ] [ DESCRIPTION = <endpoint_description:literal> ] ENDPOINT <role_name:identifier> <view_name:identifier> [<mult:multiplicity>] [ PRECONDITION <condition> ] [ DESCRIPTION = <endpoint_description:literal> ] [ ADD MAPPING <val1:mapping_value> = <val1:mapping_value> ]+ <mapping_value> ::= <field name> | <mapping_value> <funcsymbol> <value> | <value> <funcsymbol> <mapping_value> | CASE <mapping_value> WHEN <compare_value:value> THEN <result:value> [ WHEN <compare_value:value> THEN <result:value> ]* [ ELSE <result:value> ] END | CASE WHEN <condition> THEN <result:value> [ WHEN <condition> THEN <result:value> ]* [ ELSE <result:value> ] END <multiplicity> ::= ( 0 , 1 ) | ( 1 ) | ( * ) | ( + )
REFERENTIAL CONSTRAINT marks the association as a
referential constraint (see the section Referential Integrity in Associations of the Administration Guide)
DESCRIPTION clause is the description of the association
and the second and the third ones are the descriptions of the two
endpoints of the association.
PRECONDITIONS represent the Role preconditions of each
end point (see the section Role Preconditions of the Administration
ALTER ASSOCIATION <name:identifier> [ RENAME <new_name:identifier> ] [ DESCRIPTION = <desc:literal> ]
ALTER ASSOCIATION statement to rename the association and/or
change its description.
To delete an association, execute the statement
DROP ASSOCATION (see
Syntax of the DROP statement)