The core
Model the grammar, not the business
World's core has no table called Customer, Book or Patient. Businesses change; what they do does not: someone acts on something, money or goods move, and other things happen at a known time. The core holds only those four ideas, and each world adds its own nouns and verbs as data.
Nouns are rows, not tables
"Patient", "pizza", "parcel", "book" are not tables in World. They are types, written as rows, and a world invents its own. "FIRE the order" and "LAUNCH the drone" are not code either. They are verbs, also rows, and an actor may use a verb only if it holds the capability for it. Where a kind of thing really needs columns of its own, it gets them in a side table (a typed extension), listed in World's own catalog so the engine knows what a world added.
The design is older than World. It comes from Robot, the engine Dimitar Hrisafov built around a hospital, and from its paper, Abstract Object-Oriented Event-Driven Schema Design, with its eleven principles (below). See Robots and the ward.
The actor is a super class
A super class is a programmer's term: one general kind that many specific kinds belong to. Actor is that general kind.
An actor is not a user account, and most actors never sign in. A customer, a supplier, a waiter robot, a drone, a loader that moved a database in, and the world itself are all actors - one family, one table.
A sign-in is a key
A person signs in, and the sign-in is a key to act as an actor of one world. The key, not the application, is what the database checks before every act.
Who really did it
The ledger names the actor who acted - a nurse, a waiter robot - never the organization. The organization is the world. A hospital acts only as itself: when it signs a contract, or founds its world.
Worlds are its siblings
"For me Tenants (Worlds) are siblings of Super Class Actor," Dimitar wrote. A world already has an actor that stands for it, its founder. Today no world acts in another.
The eleven principles, in one line each
- Nouns are rows. A new kind of thing is an insert, not a new table.
- One identity for every thing, with a typed extension where a kind really needs columns.
- Relationships are a graph in time: who belonged to what, and from when to when.
- One event spine for everything that happened.
- Verbs are routed by capability: an actor may do only what it was granted.
- One ledger for every quantity and value.
- Tenancy is part of every row: each row belongs to one world.
- The schema describes itself, so the engine can extend itself.
- Views are the business's costume: reports see the business's own words.
- Codes from outside systems are translated at the door, never mixed into the core.
- Backups, restores and checks are part of the design.