Creating Supersedes Condition in Entity Infrastructure

As the title of the question says ... I have a database using the supersedes model to store information ... that every time the client edits, instead of updating the row, the software just slams the new record into the database and then updates the old records. to have a pointer to this new entry.

I tried to draw a 1 <> 1 relationship, but not sure exactly how to do it efficiently ... any advice would be appreciated. Thanks.

0


a source to share


1 answer


This is a normal 1: 1 relationship with FK, pointing to a new record on every update (actually insert and update). You just need to make sure you paste first and then update the FK link to the newly inserted record.



Also, if you want to keep old records, you should move them to a different table and not bloat the existing one, given that these records are probably out of date and rarely need access other than auditing.

+1


a source







All Articles