Closed dsj976 closed 1 year ago
UPDATE: it has now be decided to have separate SQL tables for segment level annotations for Client, Therapist and Dyad. Having a single table was not maintainable because of the increasingly large number of columns. See #26.
Initially it was thought that the client, therapist and dyad all had the same Enums for the annotations at the segment level. However, this is not longer the case and they each have different Enums. The whole point of using Enums to define SQL table columns is to restrict the values that the column can have, and to ensure data integrity.
This complicates the infrastructure. It was thought that there were two possible solutions:
ps_dialog_turn_annotation
SQL table for the different entities (e.g.label_a_client
,label_a_therapist
,label_a_dyad
, etc.)ps_dialog_turn_annotation_client
,ps_dialog_turn_annotation_therapist
,ps_dialog_turn_annotation_dyad
)It was decided that option [1] was more sensible because having a different annotations table for each entity (client, therapist and dyad) would complicate the SQL infrastructure too much. By having a single table with more columns, each time an annotation is submitted (i.e. a new row in the table is created) for one entity, only the corresponding column is filled. The columns for the other entities remain empty (i.e. they keep their default value of
NULL
).See commit 93987e2.