> For the complete documentation index, see [llms.txt](https://comunity.gitbook.io/learning.comunitynexus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://comunity.gitbook.io/learning.comunitynexus/26.2/toolkit-guides/data/ontology.md).

# Ontology

Every project in the ComUnity Developer Toolkit includes an Ontology view, alongside the Diagram and List views of your data model. You do not build the ontology yourself. The Toolkit derives it from the data model you have already defined.

Where the Diagram and List views are working surfaces for defining entities, properties and table links, the Ontology view is a lens for understanding the model as a whole: which concepts your project describes, how they inherit from one another, how they are connected, and how your application navigates them. It is a read-only view. Changes to the model are made in the Diagram or List views, as described in [Customising the Data Model](/learning.comunitynexus/26.2/toolkit-guides/data/customising-the-data-model.md).

## What an ontology describes

An ontology is a formal description of a domain: the concepts that exist within it, the attributes that describe those concepts, and the relationships that hold between them. Your data model already contains this information. The Ontology view presents it in those terms.

<table><thead><tr><th width="220">Ontology concept</th><th>In the Toolkit</th></tr></thead><tbody><tr><td>Domain</td><td>The project namespace an entity belongs to</td></tr><tr><td>Concept, or class</td><td>An <a href="/pages/C7gZaQInVRAP64iFDbhA">entity</a></td></tr><tr><td>Abstract concept</td><td>An entity marked <code>«abstract»</code>, which defines structure for the entities beneath it but holds no records of its own</td></tr><tr><td>Hierarchy</td><td>The <a href="/pages/821mJwkvFdtabBzreWCY"><strong>Inherits from Entity</strong></a> relationship, shown as <em>extends</em></td></tr><tr><td>Attribute</td><td>A property, holding a value such as text, a number or a date. See <a href="/pages/ODyw9sR4p4bNEowFKLyU">Data Types</a>.</td></tr><tr><td>Relationship</td><td>A navigation property, connecting one entity to another. See <a href="/pages/MVRSx4JrmGQXE9KCfSNm">Table Links</a>.</td></tr><tr><td>Identity</td><td>The entity's key, which distinguishes one record from another</td></tr></tbody></table>

Properties and navigation properties are counted separately throughout this view, because they answer different questions. Properties describe an entity. Navigation properties connect it to others.

## Choosing a view

<table><thead><tr><th width="150">View</th><th>Use it to</th></tr></thead><tbody><tr><td>Diagram</td><td>Define and edit entities, properties and table links on a visual canvas. See <a href="/pages/HN6jXH1MyBAOK0zoKthR">Customising the Data Model</a>.</td></tr><tr><td>List</td><td>Define and edit the same model in a compact, expandable list.</td></tr><tr><td>Ontology</td><td>Read the model as a whole: its concepts, hierarchy, relationships and navigation.</td></tr></tbody></table>

The Ontology view is organised into three tabs, described below.

## Entity Relationships

**Entity Relationships** draws your model as a graph. [Entities](/learning.comunitynexus/26.2/toolkit-guides/data/creating-entities-in-the-data-model-step-by-step-guide.md) appear as nodes showing their properties and the [data type](/learning.comunitynexus/26.2/reference-articles/data-types.md) of each, with a key icon marking the properties that form the entity's key. Each node carries a badge naming the domain it belongs to, and abstract entities are marked `«abstract»`.

Nodes are enclosed in a dashed container for each domain, labelled with the domain name and the number of entities it holds, for example `GOTHAMCITY1 (13)`.

Two kinds of connection are drawn between nodes:

<table><thead><tr><th width="200">Connection</th><th>Meaning</th></tr></thead><tbody><tr><td>A solid line, labelled with a navigation property name</td><td>An association between two entities, created as a <a href="/pages/MVRSx4JrmGQXE9KCfSNm">Table Link</a>. Markers at each end show how many records may take part. See <a href="/pages/9qAhZp1FCXNaXsNoBzHf">Creating Entity Associations</a>.</td></tr><tr><td>A dashed line ending in a hollow triangle</td><td>Inheritance. The triangle points at the parent entity. See <a href="/pages/821mJwkvFdtabBzreWCY">Manage Inheritance in the Data Model</a>.</td></tr></tbody></table>

Click a node to inspect it in the [details panel](#the-details-panel).

Use the controls in the lower left of the canvas to zoom in, zoom out, fit the whole model to the window, or lock the canvas to prevent nodes being moved. A minimap in the lower right shows your position within the model.

<figure><img src="/files/VUV8eIGE0slZq12Pbh24" alt=""><figcaption><p>Ontology - Entity Relationship</p></figcaption></figure>

## Entity List

**Entity List** presents the same entities as a flat inventory, grouped by domain, with the number of entities in each domain shown alongside the domain name. Abstract entities are marked `«abstract»`.

Each row summarises the entity's shape as a count of properties and navigation properties. A row reading `7p · 3n` describes an entity with seven properties and three navigation properties.

Click an entity to inspect it in the [details panel](#the-details-panel).

<figure><img src="/files/swRrIFxLGZAadxs6BbgL" alt=""><figcaption><p>Ontology - Entity List</p></figcaption></figure>

## Navigation

**Navigation** maps how your application moves between screens, drawing the navigation tree from its root through every branch to the pages at its ends. It shows the structure that is defined in [Screens](/learning.comunitynexus/26.2/toolkit-guides/screens.md), presented alongside the data model so that the two can be read together.

Click a node to inspect it in the [details panel](#the-details-panel) and see where it points and how it is reached.

Use the same canvas controls described under [Entity Relationships](#entity-relationships) to move around the tree.

<figure><img src="/files/H0OL7b5Zr4AV4vwXwjPh" alt=""><figcaption><p>Ontology - Navigation</p></figcaption></figure>

## The details panel

Clicking a node opens the details panel. Until you select one, the panel prompts you to **click a node to inspect**.

The panel is shared across all three tabs, and its contents change to match the kind of node you have selected. A badge below the node's name names that kind, for example **ENTITY**, **ABSTRACT ENTITY** or **NAV LINK**.

### Reading an entity

<table><thead><tr><th width="170">Row</th><th>Shows</th></tr></thead><tbody><tr><td>Domain</td><td>The project namespace the entity belongs to</td></tr><tr><td>Entity Set</td><td>The name of the collection exposed over <a href="/pages/ADQosT6fO2IheZZCsksL">OData</a>. Abstract entities show <code>-</code>, as they hold no records of their own.</td></tr><tr><td>Properties</td><td>The number of properties defined on the entity. See <a href="/pages/C7gZaQInVRAP64iFDbhA">Manage Entities in the Data Model</a>.</td></tr><tr><td>Nav Props</td><td>The number of navigation properties connecting it to other entities. See <a href="/pages/9qAhZp1FCXNaXsNoBzHf">Creating Entity Associations</a>.</td></tr><tr><td>Keys</td><td>The properties that make up the entity's key. A composite key lists each property in turn.</td></tr></tbody></table>

Below the summary, **Properties** lists every property in turn, giving its name and its data type in abbreviated form, and marking each key property with a key icon. Common abbreviations include:

<table><thead><tr><th width="140">Abbreviation</th><th>Data type</th></tr></thead><tbody><tr><td><code>str</code></td><td>String</td></tr><tr><td><code>int</code></td><td>Integer</td></tr><tr><td><code>dec</code></td><td>Decimal</td></tr><tr><td><code>bool</code></td><td>Boolean</td></tr><tr><td><code>dt</code></td><td>Date and time</td></tr><tr><td><code>guid</code></td><td>Globally unique identifier</td></tr></tbody></table>

For a full description of each type, see [Data Types](/learning.comunitynexus/26.2/reference-articles/data-types.md).

**Relationships** lists every entity this one connects to, giving the name of the navigation property and, in brackets, how many records may take part:

<table><thead><tr><th width="140">Notation</th><th>Meaning</th></tr></thead><tbody><tr><td><code>[1]</code></td><td>Exactly one</td></tr><tr><td><code>[0..1]</code></td><td>None or one</td></tr><tr><td><code>[*]</code></td><td>Any number</td></tr></tbody></table>

Where an entity inherits from another, an **Inheritance** section names the parent entity it extends. See [Manage Inheritance in the Data Model](/learning.comunitynexus/26.2/toolkit-guides/data/managing-inheritance-in-the-data-model-configuring-entity-hierarchy-and-inheritance.md).

{% hint style="info" %}
Every entity created in the Toolkit inherits from **BaseEntity**, which contributes the `Created`, `Modified` and `Deleted` properties and the entity's identifier. These appear in the property list alongside the properties you have defined yourself. See [Manage Entities in the Data Model](/learning.comunitynexus/26.2/toolkit-guides/data/creating-entities-in-the-data-model-step-by-step-guide.md).
{% endhint %}

### Reading a navigation link

<table><thead><tr><th width="170">Row</th><th>Shows</th></tr></thead><tbody><tr><td>Type</td><td>The kind of link, for example <code>PageLink</code></td></tr><tr><td>Sequence</td><td>The link's position among its siblings</td></tr><tr><td>Target URL</td><td>The address the link resolves to. Where a link passes a value to the page it opens, the address includes a <a href="/pages/rSU5h8AoFcFhOBaBdiZA">Mustache</a> placeholder.</td></tr><tr><td>Page Target</td><td>The page the link opens</td></tr></tbody></table>

**Parent chain** lists the ancestors of the link, from the top of the navigation tree down to its immediate parent, which is useful for locating a link within a large tree.

## Finding an element

Two controls above the canvas narrow what you are looking at, and both apply to all three tabs:

* The **All entities** dropdown narrows the view to a single domain.
* The search box finds a node by name. Begin typing to match entities, properties and navigation links.
