G5 Person

This page describes how the notion of person is handled in g5 database.
The structure of a person is given by src/model/templates/Person.yml
Table definition is in src/model/db-create
create table person (
    id              serial primary key,
    slug            varchar(255) unique not null,
    ids_in_sources  jsonb not null,
    partial_ids     jsonb not null,
    name            jsonb not null,
    sex             char(1),
    birth           jsonb not null,
    death           jsonb not null,
    occus           jsonb not null,
    trust           char(1),
    acts            jsonb not null,
    history         jsonb not null,
    notes           jsonb not null
);

Person ids

Unique ids

Every person of the database has 2 unique ids:
  • Person slug, its g5 unique id (see definition in page G5 database).
    These can be read by humans and are used to build the public URL of a person in opengauquelin.org.
  • Id generated by the database (serial in postgresql, equivalent of autoincrement in mysql).
    These are used to associate person to groups.

Ids in sources

Field ids_in_sources is a jsonb key value map giving the local ids of a person within its information sources.
As a person is ALWAYS related to at least one information source, this field is never empty.

For example, Georges Dumas is present in files A1, A6 and Müller's 1083 physicians:
select ids_in_sources from person where slug='dumas-georges-1866-03-06';
{"a2": "241", "a6": "282", "afd5": "325"}

Partial ids

While field ids_in_sources represents the local ids of a person within precise information sources, the notion of partial ids permit to identify the person within several meaningful contexts. These "meaningful contexts" are information sources of higher level (often parent sources of precise sources).
One person can be associated to one or more partial ids.
A given partial id concerns a subset of the database.

The following partial ids are defined in g5 database :
Source slugDefinitionExample
lerrcpGauquelin LERRCP unique idA3-543
g55Gauquelin 1955 unique id02-284
mullerMüller unique idM2-163
ertelErtel unique idES-3548
cparaComité Para unique idCP-245
csicopCSICOP unique idCS-504
cfeppCFEPP unique idCF-546
wdWikidata unique idQ161247
select ids_partial from person where slug='dumas-georges-1866-03-06';
{"lerrcp": "A2-241", "muller": "M5-325"}

History

This field permits to keep a trace of the transformations done on a person.
Each history entry contains the raw data used to modify the person, and the values that were retained to modify the peron.
This is useful to identify the errors in the original files, and is used for debug and verification puropse.
TODO

Person name

The name of a person is modeled by this structure:
name:
  given:
  family:
  nobl:
  official:
    family:
    given:
    nobl:
  spouse: []
  fame:
    full:
    family:
    given:
  alter: []
  • name.given, name.family and name.nobl represent the name commonly used to designate a person.
    It can be either the "real" name of the person, or a pseudonym.
  • name.nobl : nobiliary-particle: de d' di del von...
    name.nobl is not part of name.family.
  • name.official represent the exact spelling of the name, as written in the birth certificate.
    For noble persons, name.official.family contains both the "normal" part and the noble part of the name.
    If the person has several given names, name.official.given contains them all.
  • name.spouse : array of spouse names (in general, used for married women). This field is informative only ; if the person is known using her spouse name, this information must be repeated in field name.fame.family.
  • name.fame: public name, like stage or scene name.
    Can be full (ex: "Mistinguett" or "Stromae") or composed, like "Edith" (name.fame.given) "Piaf" (name.fame.family).
  • name.alter: Array of alternative names. For example Boris Vian (a french writer) wrote a book using the name of Vernon Sullivan.

Birth and death dates

TODO