The OPUS Database
The database is the middle of OPUS. The import pipeline writes it, the web application
reads it, and neither one knows anything about the other: they share this schema, and
their only other common ground is opus_config and opus_support. That makes
it the thing to understand first, which is why it comes before both of them here.
It is one MySQL schema. Observation metadata lives in the obs_* tables, one row per
observation and one table per group of fields the user interface offers as a “Constraints”
menu; the enumerated values those rows point at live in the mult table, beside
mult_field and mult_group; and a handful of auxiliary tables describe the fields
themselves, hold the data dictionary, and carry what a user’s session produces. No OPUS
table is created by a Django migration: the import pipeline creates every one of them
from a checked-in JSON description, and the only tables in the schema that a migration
does create are Django’s own contrib tables.
The Database Schema is the table-by-table reference.
Table Schemas is the JSON every one of those tables is created from –
the single description that the import, the validation and the web application’s search
form all read. OPUS ID Format is the identifier each observation hangs off, and
The Data Dictionary is where the tooltip text in contexts and definitions
comes from.