RESTful Architecture

This section explains how to:

  1. Define associations between views.

  2. With 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.

Syntax of the CREATE ASSOCIATION statement
    [ 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>
    [ 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 )
    | ( * )
    | ( + )

<identifier with database> ::= (see Basic elements of VQL statements)

<value> ::= (see Rules for forming functions)

<condition> ::= (see Rules for forming functions)

The clause REFERENTIAL CONSTRAINT marks the association as a referential constraint (see the section Referential Integrity in Associations of the Administration Guide)

The first 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.

The clause PRECONDITIONS represent the Role preconditions of each end point (see the section Role Preconditions of the Administration Guide).

Syntax of the ALTER ASSOCIATION statement
ALTER ASSOCIATION <name:identifier>
    [ RENAME <new_name:identifier> ]
    [ DESCRIPTION = <desc:literal> ]

Use the 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)