Relational database schema for a hospital clinical trials management system. Covers pseudonymised participant records, longitudinal measurements and file attachments, variable definitions, and role-based access control scoped per study. Implemented in MySQL.
| From | To | Cardinality | Description |
|---|---|---|---|
| studies | enrollments | 1 : N | A study has many enrolled participants |
| participants | enrollments | 1 : N | A participant can be enrolled in multiple studies |
| studies | variables | 1 : N | Each study defines its own set of measurement variables |
| studies | timepoints | 1 : N | Each study has scheduled assessment timepoints |
| enrollments | measurements | 1 : N | Longitudinal data items collected per enrolled participant |
| enrollments | data_files | 1 : N | File attachments associated with an enrolment |
| variables | measurements | 1 : N | Each measurement records a value for a defined variable |
| timepoints | measurements | 1 : N | Measurements are taken at a specific visit/timepoint |
| timepoints | data_files | 1 : N (optional) | Files may be associated with a timepoint |
| users | measurements | 1 : N | Records who collected the measurement |
| users | data_files | 1 : N | Records who uploaded the file |
| users | user_roles | 1 : N | Role assignments per user |
| roles | user_roles | 1 : N | A role can be assigned to many users |
| studies | user_roles | 1 : N (optional) | study_id NULL = global role; set = study-scoped role |