panSL main page

panSL language reference. Table of contents.

Cardinality

Describes cardinality for a given PropertyType's relation to another PropertyType, such as Optional (ZeroToOne), Obligatory (ExactOne), ZeroToMany and OneToMany.

The example below shows some examples of Cardinality, a Person may have ZeroToMany phone numbers, is is Optional to specify Yearly_income, he / she may own
many cars (RelationMany) and a car may only be owned by one person (RelationOne).


Person
   Name
   Phone_numbers   SMS ZeroToMany
   Yearly_income   Integer Optional
   Car_ownership   RelationMany

Car
   Model
   Car_ownership   RelationOne

In the example RelationMany is a Simplification of DataType Relation and Cardinality ZeroToMany and
RelationOne is a Simplification of DataType Relation and Cardinality Obligatory.

Field nameDescription

ChooseOne

The PropertyType, or one of its siblings, must be created.

Used for describing single values for Enumerations (ChooseOne is then usually not shown in the panSL-schema)
or for describing SubClasses (usually simplified as Type).

Obligatory

It is obligatory to create a new property (field). In other words, there must be exact one instance of the PropertyType.

For en Entity called Person typical Obligatory fields could be First_name and Last_name.

Note that DataType ShortText and Cardinality Obligatory is usually not shown at all (see Simplification Nothing).

Optional

It is optional to create a new property (field). In other words, there may be zero or one instance of the PropertyType.

ZeroToMany

There may be zero, one or more instances of the PropertyType.

ZeroToManyReverseAdd

Only relevant for relations between entities.

There may be zero, one or more instances of the PropertyType.

In addition ReverseAdd should be taken as a hint by the panSL Implementation about how to implement the creation of new relations in
the autogenerated GUI. The process of creating a new relation should be reversed by
offering to create a new entity on the "other side" of the relation. The new entity should then automatically be related to the entity on "this side"
(the entity currently shown).

For instance, for an insurance claims application, instead of offering to relate a Person to an existing Insurance_claim, the ApplicationImplementation should, when a person is shown,
offer to create a new Insurance_claim, and then relate the Person to the newly created Insurance_claim. This will remove some steps for the user when
entering new data.

In entity relationship terms the entity on the other side is usually a weak entity.

panSL language reference. Table of contents.

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

Last updated 2012-05-02