Skip to content

Engineering

Structuring multi-institution data without forking the product

Notes on tenancy, identity and reporting when one platform serves many schools with different structures and different rules.

Musber Technologies Engineering7 min read
Engineering04

Every education platform eventually meets the same request: can one installation serve several institutions? The naive answer is to add an institution identifier to every table. It works until reporting, permissions and migrations begin to disagree about what an institution actually is.

These are notes from the approach we take in SchoolOS. They are not a universal prescription, but the reasoning has held up across real institutional structures.

Model the institution as an entity, not a filter

If an institution is only a column on a row, every query becomes an exercise in remembering to filter correctly, and every missed filter is a cross-institution data leak. Treating an institution as a first-class entity — with its own structure, calendar, roles and ownership of records — makes tenancy explicit at the point where records are created, not at the point where they are read.

In practice this means scope is resolved once, at the boundary of a request, and carried through the data layer. Application code does not get to decide ad hoc which institution a record belongs to.

Structure varies more than you expect

One school has a primary and a secondary section sharing a bursar. Another has three campuses with separate heads but a single governing body. A third runs a term calendar that does not align with either.

A schema that hard-codes a single hierarchy will be migrated repeatedly. We separate three concepts:

  • Ownership — who the record legally and administratively belongs to.
  • Structure — how classes, sections and campuses nest, defined per institution.
  • Access — which roles may act on which scope, derived from structure but not identical to it.

Conflating these is the most common source of rework, because a reporting requirement (a group wants consolidated figures) gets mistaken for an access requirement (a group head can see individual learner records).

Reporting is where tenancy is tested

Consolidated reporting is the feature that exposes every earlier shortcut. If a group needs enrolment totals across institutions, the query must aggregate without either leaking individual records or producing numbers that disagree with each institution's own reports.

The discipline we apply is definitional: a metric has one definition, computed in one place, and every view — single institution or consolidated — renders that computation. This is slower to build than bespoke queries per report, and considerably cheaper than reconciling contradictory figures in front of a board.

Migrations deserve the same care

A schema change applied across many institutions is a change to many organisations' records at once. We treat migrations as deployable artefacts: reviewed, reversible where possible, and rehearsed against representative data. Where a change is irreversible, it is staged — write the new shape, backfill, verify, then remove the old path.

None of this is novel. It is simply the difference between a platform that can add a tenth institution without a bespoke deployment, and one that quietly becomes ten products maintained by the same team.

M

Musber Technologies Engineering

Musber Technologies

Share