In the previous section, you learned how to issue queries from the RESTful interface of Denodo. Now you will see how to enable linked data using a new Denodo element: associations.
Associations represent a relationship between elements of two Denodo views. The concept is very similar to the Primary Key / Foreign Key restrictions in relational databases.
For example, the elements of the client view can be related with the elements of the address view (every customer is related with an address).
Based on the definition of the associations, the Denodo RESTful Web service will show links that will allow you to traverse the associations. Let's see how it works with an example, by using the views created in previous sections of the tutorial.
To create a new association in Denodo, you can follow these steps:
New > Association
.address
.belongs_to_client
.Now it's time to return to the RESTful Web service and get the results of the client view: http://localhost:9090/denodo-restfulws/tutorial/views/client (see the previous section for more information about how to query using the RESTful Web Sevice).
As you can see in the screenshot below, a new column with a link is added to the output table and the text of the link is the Role name configured in the association for
the endpoint. In this example, if we click on address link for the customer John Smith, Denodo will follow the association and display his address.
In the same way, since we made the association, a belongs_to_client column appears with the address that loads the associated customer information when clicked.