G5 Group

A group contains persons, and can be empty.
Group membership is stored in database using table person_groop.
The structure of a group is given by src/model/templates/Group.yml
# 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

Fields parents 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. Occupations example 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().