# database id managed by the dbms id: # unique within g5 groups slug: name: # cardinality 'n': 0 # 'occu' or 'history' type: description: | # relative path to download: # array of source slugs sources: [] # array of group slugs parents: [] # array of group slugs children: [] # array of person ids (neither person slugs nor person objects) members: []
Parents - children
Fieldsparents
and children
permit to manage subgroups.
The relation
child --> parent
is implemented with a direct acyclic graph (DAG), vendor/tig12/tiglib/dag.
The edges of this graph are "is child of" relations.
This permits to have several children and several parents.
Parent - child relations are used to classify occupations. The database has the following property: When a person belongs to a group, it also belongs to all the ancestors of this group.
For example a member of
conductor-of-military-band
is also member of military-personel
, conductor
, musician
and artist
(ie these associations are stored in table person_groop
).
In the code, this is implemented in
Group::storePersonInGroup()
and Group::removePersonFromGroup()
.