IF Commons GitHub

Arca, the party model

0004Active

0004-arca · owner if · domain data

The domain

FR-001checkpassing

Arca's party model MUST be a governance domain named arcaParty, kept in models/arca/ and written with the public surface of governance alone (0001-layers FR-004), and MUST be given as a Result (the domain or its errors), never by throwing, so that a project holds it to the same rules as its own.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: the party model is a valid domain named arcaParty, given as a result

Proved by: data/suite/arca.test.ts, data/suite/lifecycle-fixture.ts

Written in: data/models/arca/mod.ts, data/models/arca/party.ts

Tests: passed: suite/arca.test.ts the party model is a valid domain named arcaParty, given as a result

FR-002checkpassing

The domain MUST have the concepts party, person, organization, partyRole, partyRelation, partyIdentifier, electronicContact and postalAddress, and the code lists partyKind, partyRoleKind, partyRelationKind, partyIdentifierKind, contactMedium and addressPurpose, each with the attributes and relationships that the model it replaces gave its tables and columns, in business terms.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: the domain has the concepts and code lists the model it replaces had, with their attributes and relationships; suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts every table and column of the model it replaces is what the words of this domain's names m; passed: suite/arca.test.ts the domain has the concepts and code lists the model it replaces had, with their attribute

FR-003checkpassing

A person and an organization MUST each be identified by their relationship of cardinality one to a party, which they specialize; every other concept MUST be identified by an attribute of its own named for it (partyRoleId).

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: a person and an organization are identified by their party, every other concept by an attribute named for it

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts a person and an organization are identified by their party, every other concept by an attr

FR-004checkpassing

Every element of the domain MUST have a definition, and lint with the library's vocabularies MUST find nothing in it: Arca is a model that holds itself to its own vocabularies.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: every element has a definition, and lint with every vocabulary of the library finds nothing

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts every element has a definition, and lint with every vocabulary of the library finds nothin

What is true of the data

FR-005checkpassing

Each attribute that holds personal data MUST say so with a category of DPV-PD that exists (Name, BirthDate, Identifier, Contact, PhysicalAddress, Country) and what it is held for, and each concept that holds personal data MUST be classified confidential.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: personal data names a category of DPV-PD that exists and what it is held for, and its concepts are confidential

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts personal data names a category of DPV-PD that exists and what it is held for, and its conc

FR-006checkpassing

The four reference code lists (partyKind, partyRoleKind, partyRelationKind, partyIdentifierKind) MUST carry the codes that the model it replaces loaded as reference data, each with its label and what it means, and MUST be open, so that a business adds its own; contactMedium and addressPurpose MUST be closed, with their codes.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: the reference code lists carry the codes the model it replaces loaded, and are open; the two closed lists carry theirs; suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts every table and column of the model it replaces is what the words of this domain's names m; passed: suite/arca.test.ts the reference code lists carry the codes the model it replaces loaded, and are open; the t

FR-007checkpassing

The domain MUST be audited with removal by marking (who made, changed and removed each record, and when), and MUST say who answers for it.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: the domain is audited with removal by marking, and says who answers for it

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts the domain is audited with removal by marking, and says who answers for it

FR-008checkpassing

The business structure of the model MUST be said as governance and not as tables: a party holds one identifier of a kind (quality.unique), the two parties of a relation differ (partiesDiffer, quality.differs), a contact point is by default not primary (quality.default), and each way the data is usually found is a usage.lookup.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: the business structure is governance: one identifier of a kind, two parties that differ, a default, and the ways the data is found

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts the business structure is governance: one identifier of a kind, two parties that differ, a

FR-009checkpassing

Every concept MUST cite the requirements of this specification that it serves, and every citation in the domain MUST name a requirement that exists in this library's specifications, so that the way from a requirement to the model, and back, is whole.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: every concept cites requirements, and every citation names a requirement that exists in this library's specifications

Proved by: data/suite/arca.test.ts

Written in: data/models/arca/party.ts

Tests: passed: suite/arca.test.ts every concept cites requirements, and every citation names a requirement that exists in th

FR-010checkpassing

Every name in the domain MUST be lower camel case, as a TypeScript identifier (0005-naming FR-001), and the names the model it replaces gave its tables and columns MUST be what the logical and the physical schema write from them in snake case (givenName as given_name), which a test holds.

Enforced (check): .github: cd commons/data && bun run verify — suite/arca.test.ts: every table and column of the model it replaces is what the words of this domain's names make in snake case; suite/arca.test.ts: every name in the domain is lower camel case, and splits into the words of the old model's names

Proved by: data/suite/arca.test.ts

Tests: passed: suite/arca.test.ts every table and column of the model it replaces is what the words of this domain's names m; passed: suite/arca.test.ts every name in the domain is lower camel case, and splits into the words of the old model's

Out of scope

  • A view over the model (the people in use, with their names) and the routines the model it replaces had: a view is a logical construct and a routine a feature of a database, built by later specifications.
  • Indexes, the names of constraints and the types of columns: they are chosen by the layers below, from what this domain says.
  • Other models of Arca (products, orders): each is a domain of its own, later.
  • Data Vault: not part of this library.

Edge cases

  • A person with no party: not possible, the relationship has cardinality one and identifies, per FR-003.
  • An address with no region or line_2: optional attributes, per FR-002.
  • Two identifiers of one kind for a party: refused by the uniqueness the domain says, per FR-008.
  • A relation from a party to itself: refused by the rule partiesDiffer, per FR-008.
  • A business that adds a role of its own, partner: the code list is open, per FR-006.
  • A medium fax: not allowed, the code list is closed, per FR-006.
  • A citation of a requirement this library does not have: found by the test that holds citations to the specifications, per FR-009.

Assumptions

  • The party model is written from its documentation, in governance terms.
  • The purposes named for personal data and the classification are Arca's own statements for a model that has none to carry over; a business that uses it states its own.
  • Arca keeps its own name, arca, as the owner role of the domain.

Open questions

OQ-1open question

Where a view over the model (FR-002 of 0001-layers) is written, since a model imports governance alone.

Key entities

  • Party, Person, Organization - who the business deals with, and what is true of a person or an organization only.
  • Party role, Party relation, Party identifier - what a party does, how parties are related, how a party is identified by others.
  • Electronic contact, Postal address - how a party is reached.
  • Reference code lists - the kinds the business names, which it may extend.

Success criteria

SC-001success criterion

The party model is one typed value that says what the business means by a party, holds itself to every vocabulary the library has, and is the single source the logical and the physical schema are made from.

SC-002success criterion

Every table and column of the model it replaces is accounted for, as an element of this domain or as a convention of a layer below.

Review & acceptance checklist

  • [x] Every requirement is testable (MUST / MUST NOT), not aspirational
  • [x] No company fact is asserted here
  • [x] Every open item is marked, not silently decided

Cited by

Data, models/arca/party, Intellectual Frontiers Commons, SQL features as extensions, Modules, Identity

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