Home   :   Matrix Language   :   Pattern Statements   :   Identifier Statements

Identifier Statements

 

Statements

 

Identifier

OwnKey

ForeignKey

 

 

General

 

An identifier selects an individual object of an entity. No two objects are allowed to have the same  identifying values.

 

Typically, identifiers are used where some interface exists. For example, efficiently finding a specific object referenced in an incoming event.

 

Each identifier is made up of one of more attributes. They must be able to select only one unique object from all the objects belonging to an entity. An entity may have several identifiers, each of which must use a different combination of attributes.

 

Most attributes that go to form an identifier will belong to the entity and these are called OwnKey attributes. However, some attributes will belong other entities and these are referred to as ForeignKey attributes and must be accessed through a relationship.

 

Access to foreign key attributes in the form of identifiers in other entities is always through an unconditional and single (-->) relationship which is established through use of the Relate statement.

 

 

Associated Statements

 

The Identifier statements are used with the following IdentifierSelection statements:

 

IdentifierSelection

IdentifierKey

KeySelection

NullKeySelection

 

An identifier is declared by the Identifier statements and actioned by the IdentifierSelection statements.

 

 

Identifier Statement

 

Entity:Person

Attribute

Number : Id_Number

Text   : First_Name

Text   : Last_Name

Number : Height

Identifier:Person_Id

OwnKey

Id_Number

Identifier:Person_Name

OwnKey

First_Name

Last_Name

 

The Identifier statement names the identifier and introduces the OwnKey and ForeignKey statements.

 

 

OwnKey Statement

 

Entity:Dog_Owner

Attribute

Text : Name

Identifier:Dog_Owner_Identifier

OwnKey

Name

 

The OwnKey statement specifies one or more attributes that form part or the whole of the identifier.

 

 

ForeignKey Statement

 

Entity:Dog

Attribute

Text : Name

Relationship

Belongs_to --> Dog_Owner

Identifier:Dog_Identifier

OwnKey

Name

ForeignKey

Belongs_to : Dog_Owner : Dog_Owner_Identifer

 

The ForeignKey statement specifies one or more identifiers that exist in one or more related entities.  The identifier may form part or whole of the identifer.

 

In the ForeignKey data subregion, the relationship is specified, then the entity and finally the name of the identifier at the related entity.

Copyright 2017 Dark Matter Systems Ltd. All Rights Reserved.