panSL main page

panSL language reference. Table of contents.

SubName

It is often necessary to specify different names for a PropertyType.

Two conventions are supported in panSL:

A) SingularName / PluralName
The example below uses "Person" / "Persons" and "Organisation" / "Organisations"

B) UIName | ModelName | ERDiagramRole | UserfriendlyName / IdentificatorName
The example below shows different aspects of an Employment-relationship.

Example:


Person / Persons
   First_name
   Last_name
   Employer | Is_employed_by | Employment / Person_org   RelationOne
Organisation / Organisations
   Name
   Employees | Employs | Employment / Person_org         RelationMany


Not every SubName needs to be specified. If a particular SubName within the PropertyName is not given
the name of its closest "right-hand neighbour" is used instead. As a minimum the IdentificatorName must be specified.
In other words, a SubName propagate from right to left until a new SubName is specified.

If for instance ER-modelling is not desired or important, the example above could have been written as:

Person / Persons
   First_name
   Last_name
   Employer | Person_org       RelationOne
Organisation / Organisations
   Name
   Employees | Person_org      RelationMany

Field nameDescription

ERDiagramRole

Describes what role the entity has in the relation.

Example (see the top of this section for the whole schema-text):
Employer | Is_employed_by | Employment / Person_org

IdentificatorName

This name must be unique for every PropertyType / Relation.

IdentificatorName is what binds two entities together in a Relation.
[UserfriendlyName] / IdentificatorName, must be identical at both places where the relation occurs in the schema.

Example (see the top of this section for the whole schema-text):
Employer | Is_employed_by | Employment / Person_org

ModelName

The preferred name when referring to "the other side" of the relation in an object-oriented model.

Example (see the top of this section for the whole schema-text):
Employer | Is_employed_by | Employment / Person_org


This name does usually coincide with UIName.

PluralName

The plural of an entity-name.

Example (see the top of this section for the whole schema-text):
Person / Persons

SingularName

The singular of an entity-name.

Example (see the top of this section for the whole schema-text):
Person / Persons

UIName

The preferred name for use in the actual user-interface.

Example (see the top of this section for the whole schema-text):
This_persons_employer | Employer | Is_employed_by | Employment / Person_org


This name does usually coincide with ModelName. The example above is a bit contrived. If would be
more naturally to just reuse the ModelName, like:
Employer | Is_employed_by | Employment / Person_org

UserfriendlyName

This is the name used inside of the diamonds in ER-diagrams, that is, it specifies the type of relationsship.

[UserfriendlyName] / IdentificatorName, must be identical at both places where the relation occurs in the schema.

Example (see the top of this section for the whole schema-text):
Employer | Is_employed_by | Employment / Person_org


Note how the UserfriendlyName is separated from the IdentificatorName by a slash, not a vertical bar.

panSL language reference. Table of contents.

More samples available at http://panSL.org/samples/.

Last updated 2012-05-02