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, issues 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 ofautoincrement
in mysql).
These are used to associate person to groups.
Ids in sources
Fieldids_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 fieldids_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 (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 slug | Definition | Example |
---|---|---|
lerrcp | Gauquelin unique id | A3-543 |
muller | Müller unique id | M2-163 |
ertel | Ertel unique id | ES-3548 |
cpara | Comité Para unique id | CP-245 |
csicop | CSICOP unique id | CS-504 |
cfepp | CFEPP unique id | CF-546 |
wd | Wikidata unique id | Q161247 |
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.
Issues
Array of strings describing the potential problems existing on some values of the field.A basic implementation permit to store an array of issue within a person, but this mechanism needs to be bettered (introduce issue types and store the issues in a separate table).
Links with other entities
TODO
Person name
name: given: family: spouse: official: # As written in the birth certificate family: given: nobl: # nobiliary-particle: de d' di del von... fame: # stage, scene full: # ex Mistinguett or Stromae family: given: alter: [] # alternative names, like nicknames, or author names
TODO Write explanations
Birth and death dates
TODO