Definition
The database lock is the moment a study's collection and corrections stop. Before it, a value can be entered, reviewed, corrected. After it, the dataset is fixed: it is that one, and no other, that the analysis takes as input.
The act has three inseparable attributes: a date, an author, and a scope — which data is locked. A lock without a date proves nothing; a lock without an author commits no one; a lock whose coverage is unknown cannot tell you whether a given value was part of it.
What it closes, what it leaves open
| Before the lock | After the lock | |
|---|---|---|
| Enter a value | Yes | No |
| Correct a value | Yes, with a trace | No — you must unlock, and that shows |
| Add a record | Yes | No |
| Read, export, analyse | Yes | Yes — locking does not close reading |
| Change the protocol | No if already locked | No |
The commonest confusion is believing that locking prevents work. It is the opposite: the lock closes writing only. Reads, exports and analyses stay open, and that is the point — the purpose of locking is precisely to guarantee that today's export and next month's yield the same dataset.
Protocol lock and database lock
These are two distinct acts at two distinct moments, and conflating them is expensive.
- The protocol lock freezes the questions: the list of variables, their type, their unit, and the primary endpoint. It precedes collection.
- The database lock freezes the answers: the collected values. It precedes analysis.
Between the two, collection runs — the protocol no longer moves, the data comes in. Locking the protocol without locking the database leaves values mobile during analysis; locking the database without having locked the protocol freezes answers to questions that could still change.
What must be settled before locking
A premature lock is paid for in unlocks, and each unlock weakens what the lock was meant to demonstrate. The minimum list:
- Missing values are qualified. An empty cell meaning "not measured", "not applicable" or "lost to follow-up" does not say the same thing to the analysis. Locking undifferentiated blanks means locking an ambiguity.
- Known inconsistencies are settled. A discharge date earlier than admission is corrected before, not after.
- Pending reviews are done. Any value proposed by a rule or a model and not yet confirmed remains a proposal.
- The scope is fixed. Which records enter the cohort, under which inclusion criteria — and that is decided without looking at the results.
Unlocking
It happens: an entry error found late, a missing value recovered. Unlocking is not forbidden — it is simply an act that must show. An honest unlock leaves a dated trace, a written reason, and a fresh lock following the correction.
In AnzarSeha
The lock is triggered from the governance panel and writes a dated, signed event to the log. While the database is locked, writing is refused; reading and export stay open. Unlocking produces its own log entry, and the audit trail carries both.
Applicable frameworks
ICH E6(R3) for trial data control and traceability; STROBE for reporting the analysed dataset in a publication; the FAIR principles for identifying a dataset version.