Actuality – Abox DB Query

The OtterServer Abox database records actual facts . Patterns are captured with updates, the patterns are recorded in the database, and patterns can be retrieved from the database using a query. Updates capture logic graphs of named objects that are merged into the database graph. Queries define and retrieve a subsumption graph of the database graph.

The Build Query function of the OtterStudio provides three windows for building a query for retrieving information in a graph:

  • Building Blocks – The actual structure of graph contents in the Abox.
  • Class Expression – A class expression is a query in the form of a graph defined by selecting classes, object properties, and data properties from the building blocks.
  • Data Graph – A graph of the query results from the actual named objects in the database.

Each of the windows are visual graphs. There is no query language syntax to learn.

The following are examples from the OtterStudio.

Building Blocks

The building blocks section list all of the domains containing information as shown below.

Selecting domains will show the domain and the object relations between the domains. The following shows the result of selecting Contracts, Customers, Stores, Suppliers, and their object property links.

The Customers domain contains classes designated in a contract as receiver agents. In this case the agent is receiving pizzas. The Stores domain contains classes designated as provider agents. They provide the pizzas. Store classes are also designated as receiver agents. They receive supplies from the Suppliers. Following REA accounting, the Stores domain additionally designates classes for resources and resource types.

To build a simple query, first select the domains. Here, only the Pizzas domain is selected.

By selecting the Pizzas domain displayed in the building blocks, the domain is opened to show the classes containing information and the object properties linking the classes.

Then by selecting the classes: PizzaType, MakePizza, and PizzaConstituents their data properties are listed.

These selected blocks are used in the following example queries.

Class Expression

The class expression section contains several options to form a query. The query is a logical expression using “and”, “or”, and “not”. It also provides:

  • Selection by named object.
  • Object Property restrictions of some, only, value, and cardinality.
  • Data Property restrictions of some, only, value, cardinality, and facets.
  • Query edit functions of undo, redo, trim, and clear.
  • Changing logical operators in the query.

Example Query 1

Selecting “hasPizzaTypeName” from “PizzaType”, the object property “hasConvertToPizza”, and “hasConvertDescription” from “MakePizza” the following graph is produced. Each selection updates the class expression when it is selected.

Example Data Graph1

Submitting query 1 to the OtterServer produces a graph showing the five different types of pizzas and their convert description. Each is a named object.

Example Query 2

Query 2 utilizes the same Building Blocks as used in Example Query 1. Query 2 is also an extension of Query 1 with the object property “hasPizzaConstituents” and the data property “hasConstituentQuanty”.

Query 2 utilizes the same Building Blocks as used in Example Query 1. Query 2 is also an extension of Query 1 with the object property “hasPizzaConstituents” and the data property “hasConstituentQuanty”.

Example Data Graph 2

Submitting query 2 will result in a graph showing the ingredients for making a New York pizza American style. The graph has been truncated to only show the first of the five pizza types.

Although these examples are quite simple, they show the three graphs used to build a query and view the results of the query.

Each of the graphs are presented as directed graphs even though the underlying named objects exist in a lattice with object property links. Consequently, in all of the graphs a named object only exists once. The graph simply contains the potential of multiple paths to reach a named object.