You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/30-database-design/012-integrity.md
+28-6Lines changed: 28 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Relational databases excel at expressing and enforcing such rules through **inte
51
51
52
52
# Types of Data Integrity Constraints
53
53
54
-
This section introduces six fundamental types of integrity constraints. Each will be covered in detail in subsequent chapters, with DataJoint implementation examples.
54
+
This section introduces seven fundamental types of integrity constraints. Each will be covered in detail in subsequent chapters, with DataJoint implementation examples.
55
55
56
56
## 1. Domain Integrity
57
57
**Ensures values are within valid ranges and types.**
**Operations execute in valid sequences that respect enterprise processes.**
153
+
154
+
Workflow integrity extends referential integrity by enforcing not just *what* relationships exist, but *when* and *how* entities are created through operational sequences. While traditional databases ensure that a recording session references a valid mouse (referential integrity), workflow integrity also ensures that the mouse must be created *before* the recording session can be created—preserving the temporal and operational order of your enterprise processes.
-**Workflow dependencies** that extend foreign keys with operational semantics—parent entities must exist before child entities can be created
158
+
-**Directed Acyclic Graph (DAG) structure** that prevents circular dependencies and ensures workflows can always execute
159
+
-**Enforced temporal order** that guarantees operations occur in sequences that reflect real-world processes
160
+
-**Computational validity** that ensures downstream results remain consistent with upstream inputs throughout the workflow
161
+
162
+
**Example:** An analysis pipeline cannot compute results before acquiring raw data. If `NeuronAnalysis` depends on `SpikeData`, which depends on `RecordingSession`, the database enforces that recordings are created before spike detection, which occurs before analysis—maintaining the integrity of the entire scientific workflow.
163
+
164
+
**Covered in:**
165
+
-[Relational Workflows](../concepts/04-workflows.md) — The Relational Workflow Model and workflow dependencies
166
+
-[Foreign Keys](030-foreign-keys.ipynb) — How foreign keys encode workflow dependencies
167
+
-[Computation](../operations/010-computation.ipynb) — Automatic workflow execution and dependency resolution
0 commit comments