Data Management Key Concepts


Within the Perrio Data Management platform there are a number of key concepts to consider and understand. They are fundamental to how data is processed and accessed within Perrio.

Schema

The Perrio Schema behaves in a similar way to a database schema. It defines the data structure and each entity must be a member of a schema. The JSON representation of a schema is as below:

Within a schema the most important structure to understand is the attribute.

Attributes

An attribute is the definition of a data element within the entity. At its most simple form this can be a Key/Value pair but it can include validation as well. The structure of an attribute is:

The valid data types are:

  • STRING - Basic string value

  • NUMBER - Integer number value

  • BOOLEAN - Simple boolean value

  • DATE - Date or date time value in ISO format. Any valid date or date time can be used

An entity is constructed of multiple attributes that can be constructed store data.

Validation

Each attribute can include validate properties that will be applied whenever the entity is created or updated. Validation failures will result in an error and can protect your data from becoming corrupted over time.

Validation is normally a combination of different validation rules, for example an attribute will often have the required and not_null constraints applied.

Schema Versions

Each schema has a version which is an incremented number that increases whenever an update is made to the schema. As a result schema versions are immutable and so a Data Entity will have both a schema and a version number.

Data Entities

Entities are the representation of the schema. Multiple instances of each schema are created, each instance of data within Perrio is an instance of a schema that is called an entity.