IF Commons GitHub

person

conceptpersonal data

A party who is a human being; what is true of a person and not of every party

Model arcaParty. Written in commons/data/models/arca/party.ts:118. Identified by party.

Governance: attributes

birthDatedateoptionalpersonal data

The day the person was born

Becomes the column birth_date of person.

Annotations: privacy.personal={"category":"BirthDate","purposes":["know the person's age and what they may do"]}

Written at commons/data/models/arca/party.ts:129

familyNametextrequiredpersonal data

The name a person shares with their family, as they write it

Becomes the column family_name of person.

Annotations: privacy.personal={"category":"Name","purposes":["address the person by name"]}

Written at commons/data/models/arca/party.ts:125

givenNametextrequiredpersonal data

The name a person is given, as they write it

Becomes the column given_name of person.

Annotations: privacy.personal={"category":"Name","purposes":["address the person by name"]}

Written at commons/data/models/arca/party.ts:121

Governance: relationships

partyone

The party the person is To party. Written at commons/data/models/arca/party.ts:118

Logical: the table

Projects to the table person with the primary key party_id.

ColumnTypeNullRoleFrom
birth_datedatetrueattributeperson.birthDate
family_nametextfalseattributeperson.familyName
given_nametextfalseattributeperson.givenName
party_idtextfalsereferenceperson.party

Physical: SQL

CREATE TABLE IF NOT EXISTS "person" (
    "party_id" VARCHAR NOT NULL PRIMARY KEY,
    "given_name" VARCHAR NOT NULL,
    "family_name" VARCHAR NOT NULL,
    "birth_date" DATE,
    CONSTRAINT "person_party_id_fk" FOREIGN KEY ("party_id") REFERENCES "party" ("party_id")
);

Physical: the typed table

Read and written from TypeScript with the types the model gives: import { person } from "@intellectual-frontiers/data/sql/typed/models". Generated in commons/data/sql/typed/models/arca-party.auto.ts: do not edit.

import { from } from "@intellectual-frontiers/data/sql/typed";
import { person } from "@intellectual-frontiers/data/sql/typed/models";

const rows = await from(person).select((s) => ({ partyId: s.person.partyId, givenName: s.person.givenName })).run(runner);

Titles, headings, exports, tables, columns and requirements. Esc closes.