Exploiting Relational Variables

By Sandra Schloen, March 2014

Updated December 2015

Background

Relational variables allow you to create targeted links to specific values via properties. Consider the descriptors with which one project describes the artistic themes evident in seal impressions. A hierarchy of nested Concepts is used, detailing the artistic elements within the seal designs. Here, for example, is the property sheet that describes the Concept of Heroes-Controlling-Lions:

This concept is assigned to relevant Seal items using a relational variable "Image theme" which, in this case, takes as its target value the Concept "I.A.4. Lions." The description of such a seal looks like this:

To find all such Seals, that is, all those that have been described using the Concept "I.A.4. Lions," you would use a basic query as follows, specifying which concept-value of the relational variable Image theme is to be matched upon. Notice that the Image theme variable requires a concept-value on which to match.

Exploiting Hierarchical Relationships

Let's say that instead, we want to find all seals that match on ALL concepts in the Theme I.A.: Heroes Controlling Rampant Animals and/or Creatures of all kinds -- Bulls, Lions, etc. The query would need to match on all all Seals whose Image theme property referenced any of the sub-items of the parent theme.

That is,

  • Image theme = "I.A. Heroes Controlling Rampant Animals and/or Creatures"

  • OR Image theme = "I.A.1. Bulls"

  • OR Image theme = "I.A.2. Winged Bull Creatures"

  • OR Image theme = "I.A.3. Winged Human-faced ..."

  • OR Image theme = "I.A.4. Lions"

  • etc.

In this case simply use the Operator is or is contained by as shown below. OCHRE will match on the given theme or on any of the sub-items contained by it.

See another example of this, as applied to archaeology, below.

Exploiting Relational Queries

In a different example, let's say that instead, we want to find all seals that match on ALL concepts that involve Heroes Controlling Lions of all kinds -- Winged Lions, Human-faced Lions, Bird-headed Lions, etc. The query would need to match on all Image themes that referenced such Lions; that is:

  • Image theme = "I.A.4. Lions"

  • OR Image theme = "I.A.5. Winged Lion Creatures"

  • OR Image theme = "I.A.6. Winged Human-faced/Human-headed Lion Creatures"

  • OR Image theme = "I.A.7. Winged Bird-headed Lion Creatures"

  • etc.

Here is where the power of a relational query comes in. Instead of giving the "Image theme" relational variable a single concept-value on which to match, we can substitute in a query that returns a result-set of concepts. We have created the query "Concepts, by seal theme" which lets us specify the concepts we want based on the properties ("Theme" and its sub-properties) of the concepts. With this query we can find all concepts that depict Heroes-Controlling-Lions.

On the View of the query, OCHRE will substitute the properties of the linked-in query ("Concepts, by seal theme") as options of the relational variable ("Image theme"), making those properties of the linked-in query available to the user for selection. OCHRE will then Perform this composite query as follows:

  1. First, it will find all the concepts that match the criteria of the linked-in query, in this case, "Concepts by seal theme." In our example, the user would request all concepts that depict heroes-controlling-lions. This query would return I.A.4, I.A.5, I.A.6, I.A.7., etc.

  2. Then, OCHRE will find all Seals whose "Image theme" property value matches ANY of the concepts derived from step 1.

In this way we can use the linked-in query to provide the result-set of values on which to match, and thereby exploit the power of the relational variable.

Exploiting Hierarchical Relationships for Archaeology

It is common for archaeological projects to use hierarchical relationships to represent archaeological contexts. In fact it is common to use multiple hierarchical contexts within the same project. Typically an excavation will organize excavation items using a primary spatial context within Locations & Objects based on the units of excavations. Only much later those same spatial items -- loci and features -- will be analyzed and assigned to architectural phases and structures: rooms within buildings, streets and courtyards within neighborhoods, etc.

Is or is contained by

In this example we have set up an secondary context called Architectural context representing Rooms within Buildings.

Each relevant unit of excavation is linked to a Room or a Building using the relational variable Architectural context. A query can then determine which units are in which Rooms or Buildings. The operator is or is contained by is used in a case like this to find all items which are linked either directly to Building 957 or to any Room hierarchically contained by Building 957.