[INSTRM-762] Reconsider unique columns in e.g. mcsData Created: 08/Sep/19  Updated: 24/Dec/19  Resolved: 24/Dec/19

Status: Done
Project: Instrument control development
Component/s: spt_operational_database
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Normal
Reporter: rhl Assignee: Kiyoto Yabe
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to INSTRM-844 Additional updates to operational schema Done

 Description   

We have non-null serial columns in many databases (e.g. mcsData has mysid) which are probably not needed – the natural join key is usually (frameId, fiberId) and we should probably that tuple be the unique constraint and primary key (cf. this stack overflow answer)

This will save a little space, and should also speed up access significantly. In some cases the moveId will need to be included too.

In the cases that we do need a serial column, I propose that we always name them tableNameId (e.g. mcsDataId), or possibly mcsDataSerial to reduce confusion with e.g. fiberId


Generated at Sat Feb 10 16:28:23 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.