Data Model

This section describes data structures and data coming from campaign variables, datasources, user defined data values, and data added by RPL constructs. Working with data from your datasources will be explained later in this document.

All data that the template can use is organized in the data model. The data model is a tree-like structure similar to folders and files on your computer. RPL uses the template and the data model to generate output.

The data in the template used in the examples above can be represented in the data model as:

 (root)
  |
  +- profile
  |   |
  |   +firstName = "Joe"
  |
  +- latestProduct
      |
      +- url = "products/greenmouse.html"
      |
      +- name = "green mouse"  Compare this with what you saw in the template earlier: ${firstName} and ${latestProduct.name}. 

As an analogy, the data model is similar to a  computer file system: the root and latestProduct correspond to folders and profile.firstName, url and name correspond to files. Url and name are in the latestProduct directory.

The data model can be represented as the following tree structure:

(root)
  |
  +- mouse
  |   |   
  |   +- size = "small"
  |   |   
  |   +- price = 50
  |
  +- elephant
  |   |   
  |   +- size = "large"
  |   |   
  |   +- price = 5000
  |
  +- python
  |   |   
  |   +- size = "medium"
  |   |   
  |   +- price = 4999
  |
  +- test = "It is a test"
 

Next steps