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. See this file for a precise description of the types.

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) - a string like abonneau-pierre-1854-01-10.
    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 by postgresql (the database management system) to link persons to other entities, like 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"
}

Build history

Field history permits to track the initial raw values and the transformations done on a person data during the build process of the database.
Each history entry contains the raw data used to modify the person, and the values that were retained to modify the person.
To identify the errors in the original files, debug and check data.

Build notes

Field notes contains notes written by g5 code during the build, for example:
["CHECK: birth day - A6-868 1906-09-11 / M1writers 158 1903-09-11"]
["Death informations come from https://earlyaviators.com/eborn1.htm"]
["Value published in LERRCP corrected in APP"]

Person name

The name of a person is modeled by this structure:
name:
  full:             # string
  family:           # string
  given:            # string
  official:
    family:         # string
    given:          # string
  spouse: []        # array of strings
  alter: []         # array of strings
  • name.full, name.given, name.family represent the name commonly used to designate a person.
    These can be different from the official name.
    It can be either the "real" name of the person, or a pseudonym.
    Rules:
    • All persons in the database either have name.given and name.family filled, or name.full filled.
    • If name.full is filled, then both name.given and name.family are empty.
    • name.given and name.family are either both filled or both empty.
    • The rule to build the name of a person is : if name.full is not empty, it is used. Else the concatenation of name.given and name.family is used.
    • For noble persons, the nobiliary particle is contained in name.family.
  • name.official represent the exact spelling of the name, as written in the birth certificate.
    An important rule is: these fields are filled only if they differ from the common fields.
    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.family.
  • name.alter: Array of alternative names.

Examples

  • Most current case
    name:
      given: Elie
      family: Cartan
      official:         
        given: Elie Joseph
    
    This person is known as "Elie Cartan".
    The official family name is the same as the common family name, so the information is not repeated. in the official.name field.
    The birth certificate contains several given names. As they differ from the common given name, the field official.given is filled.
  • name.family differ from name.official.family
    name:
      family: Calvé
      given: Emma
      official:
        family: Calvet
        given: Rosa Noémie Emma
    
    This person is known as "Emma Calve".
    Here, both given and family names are different from the birth certificate, so both are filled.
  • Usage of name.full
    name:
      full: Fernandel
      official:
        family: Constantin
        given: Fernand Joseph Désiré
    
    This person is known as "Fernandel".
    The fields name.full is used, but the fields name.family and name.given are not used.
  • Usage of name.alter
    name:
      family: Vian
      given: Boris
      official:
        given: Boris Paul
      alter:
        - Vernon Sullivan
        - Bison Ravi
        - Brisavion
    
    This person is known as "Boris Vian", and he published books using various pseudonyms, stored in field alter.
  • Usage of name.spouse
    name:
      family: Choquet-Bruhat
      given: Yvonne
      official:
        family: Bruhat
        given: Yvonne, Suzanne, Marie-Louise
      spouse:
        - Fourès
        - Choquet
    
    This person is known as "Yvonne Choquet-Bruhat".
    She was married twice, which is indicated in the field name.spouse.

Birth and death dates

In database, stored in the fields birth and death of a Person.
These fields contain a json string with this structure:
{
    "date": "1891-07-18 08:00",
    "date-ut": "1891-07-18 07:51",
    "tzo": "+00:09:21",
    "notime": null,
    "lmt": null,
    "place": {
        "c1": null,
        "c2": "33",
        "c3": "",
        "cy": "FR",
        "lg": -0.5805,
        "lat": 44.84044,
        "name": "Bordeaux",
        "geoid": 3031582
    }
}
Note the redundant information, as date-ut + tzo = date

The field note of person is a json string used to store information about the person.
Field notes.tzo is used to report timezone computation.
{
    "tzo": {
        "err": "IT1 End of WW2",
        "trust": 0
    }
}
{
    "tzo": {
        "err": "IT1 End of WW2",
        "trust": 0
    }
}
TODO