Skip to main content
6 events
when toggle format what by license comment
May 3, 2018 at 14:30 history edited Dan Guzman CC BY-SA 4.0
added identity column to order by
May 3, 2018 at 13:08 comment added Dan Guzman I can think of no magic bullet for a foreign key that's essentially on time alone. A kludge could be a materialized flag for the row that would be assigned during insert to identify the first row and a different flag value for other rows. That would allow you to maintain a logical relationship but not with an actual foreign key constraint.
May 3, 2018 at 13:06 comment added HugoRune My question was perhaps a bit unclear on this point, I have tried to clarify why an auto-id is something I am trying to avoid.
May 3, 2018 at 12:52 comment added HugoRune An identity column will avoid dupes, and is of course an option. But it will make my foreign key reationship difficult. If I want to reference an event that happend at time X, I would have to first find that event in the table and look up its identity column, instead of assuming it has the unique key [timeX & 0]. I was hoping to avoid that roundtrip.
May 3, 2018 at 12:49 history edited Erik Reasonable Rates Darling CC BY-SA 4.0
added 3 characters in body
May 3, 2018 at 12:15 history answered Dan Guzman CC BY-SA 4.0