All the data of a study is saved in datasets. These datasets are part of a relational database.
The data in each datasets is linked through a unique ID, the primary key. For a clinical trial it would be the patient ID, but depending of the study, it could be mice ID, plants ID or cells ID.
Example of a LabKey dataset: