IF Commons GitHub

control

concept

A control: what must hold, who answers for it, how often it is checked and the test or evidence that checks it, one row of the control matrix

Model contract. Written in commons/data/models/contract/mod.ts:106. Identified by controlId.

Governance: attributes

controlIdidentifierrequired

What identifies the control

Becomes the column control_id of control.

Written at commons/data/models/contract/mod.ts:109

evidenceReftextrequired

The test, spec or report that checks it

Becomes the column evidence_ref of control.

Written at commons/data/models/contract/mod.ts:113

frameworktextoptional

The framework or rule it answers to, where one

Becomes the column framework of control.

Written at commons/data/models/contract/mod.ts:114

frequencytextrequired

How often it is checked, as a number of days

Becomes the column frequency of control.

Written at commons/data/models/contract/mod.ts:112

objectivetextrequired

What must hold

Becomes the column objective of control.

Written at commons/data/models/contract/mod.ts:110

ownertextrequired

Who answers for it

Becomes the column owner of control.

Written at commons/data/models/contract/mod.ts:111

Logical: the table

Projects to the table control with the primary key control_id.

ColumnTypeNullRoleFrom
control_idtextfalseattributecontrol.controlId
evidence_reftextfalseattributecontrol.evidenceRef
frameworktexttrueattributecontrol.framework
frequencytextfalseattributecontrol.frequency
objectivetextfalseattributecontrol.objective
ownertextfalseattributecontrol.owner

Physical: SQL

CREATE TABLE IF NOT EXISTS "control" (
    "control_id" VARCHAR NOT NULL PRIMARY KEY,
    "objective" VARCHAR NOT NULL,
    "owner" VARCHAR NOT NULL,
    "frequency" VARCHAR NOT NULL,
    "evidence_ref" VARCHAR NOT NULL,
    "framework" VARCHAR
);

Physical: the typed table

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

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

const rows = await from(control).select((s) => ({ controlId: s.control.controlId, objective: s.control.objective })).run(runner);

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