Skip to main content

SHOW MODEL

Commands › Looking around · Any caller; rows they are not granted never appear

Lists what the model holds. SHOW MODEL gives one row per entity and relation; KINDS lists the entity kinds; STATS adds row counts; COVERAGE says which landed and cleaned tables the model reads.

Syntax​

SHOW MODEL [ KINDS | STATS | COVERAGE ]

Parameters​

FormResult
SHOW MODELOne row per entity, then one per relation: name; is (an entity's kind with its OF <host> [BY <column>], or a relation's <From> <verb> <To>); key (from_key, to_key for a relation); time (the time columns joined by ..); stored (query, materialised, materialised, refreshed by key or no instances; for a relation query or inferred: <rule>); description.
KINDSThe eight entity kinds: kind, needs (what the kind requires), meaning.
STATSOne row per entity and relation: name, object, kind, of, from, to, verb, count, activity, today, counted_at. The count columns are NULL until the object has been counted.
COVERAGEOne row per tables.<source>.<table> and clean.<source>.<table>: table, rows (always NULL: no cheap count is kept), read_by (the entities and relations whose bodies read it), cleaned_as, status.

Usage notes​

  • The MCP query tool runs every form. There, rows for entities and relations the caller may not read are left out, so no caller learns their names.
  • COVERAGE statuses: modelled (read by the model, directly or through its clean table), cleaned only (normalised, but nothing reads either table), not modelled, and left out (marked with ALTER TABLE ... SET MODEL IGNORE).
  • STATS counts only what the caller can read; the counts of anything else stay NULL.

Examples​

SHOW MODEL
nameiskeytimestoreddescription
CustomerTHINGkeyqueryAn account that places orders.
OrderARTEFACTkeymaterialisedA purchase order.
FulfilmentPROCESSkeyopened_at .. closed_atqueryPicking and shipping one order.
placedCustomer places Orderfrom_key, to_keyqueryThe customer an order is raised against.
SHOW MODEL KINDS
kindneedsmeaning
THINGExists on its own and keeps its identity over time: a person, an organisation, a system.
ARTEFACTInformation: one content however many copies or versions are kept (a ticket, a contract, a file).
QUALITYOF <host>A value borne by one host, with no identity of its own (a label, a status).
FUNCTIONOF <host>What its host is for, realised when a process runs (a capability of a product).
DISPOSITIONOF <host>How its host tends to behave under some condition (a rule, a defect).
ROLEOF <host>A status its host has for a while (reviewer, assignee).
PROCESSTIME <start>, <end>Unfolds over time from a start to an end, with participants (a change from opened to merged).
EVENTTIME <at>An instant that starts or ends a process (merged, released, an error raised).
SHOW MODEL COVERAGE
tablerowsread_bycleaned_asstatus
tables.crm.accountCustomerclean.crm.accountmodelled
tables.crm.legacy_noteleft out
tables.drive.filenot modelled

Not supported​

RefusedWrite instead
SHOW MODEL of one entityDESCRIBE <Entity>
-- Refused by the engine
SHOW MODEL Order

See also​

CREATE ENTITY · CREATE RELATION · SHOW LINKS · DESCRIBE · ALTER TABLE ... MODEL IGNORE · SHOW