1 source is related to 0 or more persons
0 => a source can exist without being related to any person.
1 person is related to 1 or more sources
1 => a person cannot exist in the database without being related to a source.
The link between Source and Source permits to handle the notion of parent source.
For example, the source called
a1refers to the html web page cura.free.fr/gauq/902gdA1y.html
a1has a parent source called
cura5, which refers to version 5 of database located on web site cura.free.fr.
One source can have several parents.
The link between Group and Group permits to handle the notion of sub-group.
One group can be sub-group of several groups.
OccupationActivity of a person, ~profession
The link between Occupation and Occupation permits to classify occupations.
For example, a poet is also an artist.
src/model/ ├── Group.php ├── Group.yml ├── Person.php ├── Person.yml ├── Source.php └── Source.ymlFor example, file
Person.ymlcontains an empty person with all its fields empty.
This provides to the code a precise definition of the entities, used as the description of a new type.
IdentifiersUnique identifiers depend on the entity type. Some entities (Person and Group) have several unique ids.
SlugsAll entities have one unique id: its slug.
A slug is a string that can be used in a URL.
It contains only lower case letters without accents [a-z], digits [0-9], and hyphen (-).
|Entity type||Slug example|
Id generated by the databaseUsual integer. These are used to associate person to groups.
Person slugPerson slugs are built by program, from family name, given name and birth day.
Group and source slug are defined by humans, in the code for groups and or in files of
data/model/sourcefor sources. postgresql.
Structured fields are stored using jsonb type.
Each entity has a field
id, used as primary key.
Slugs are also indexed.
Links between Person and Group are expressed by a relation table. The other links (Source-Person, Source-Source...) are contained in the json values.
SQL to create the tables are located in
php run-g5.php db build dbcreateThe tables are also dropped and recreated when the database is created from scratch
php run-g5.php db fill history allor
php run-g5.php db fill history db