thegraphnetwork / GRAPHnetEpiApp

MIT License
4 stars 1 forks source link

Add Unique constraint to line_list table #9

Closed fccoelho closed 3 years ago

fccoelho commented 3 years ago

the line_list needs an unique constraint to avoid the insertion of duplicate lines. we need to choose a set of fields (columns) to use to characterize uniqueness, i.e., if these fields are the same in two lines they should be considered duplicates

JyotiDalal93 commented 3 years ago

Hi @fccoelho! Sure, thank you.

In the table I created, 'patinfo_ID' is a primary key. Also, I am not sure whether we can use other columns to characterize uniqueness.

fccoelho commented 3 years ago

We should use a small set of columns to define uniqueness. maybe 3 or four will suffice, no need for them to be primary keys. They should be columns associated with the identification of the patient and not very likely to contain errors, otherwise, a mere misspelling in one of the fields would allow for duplicate lines.

fccoelho commented 3 years ago

Thank you @JyotiDalal93