Customer wants some data to appear after you later delete rows. System giant / not my creation. Fast

Posted by John Sullivan on Stack Overflow See other posts from Stack Overflow or by John Sullivan
Published on 2010-04-01T20:34:44Z Indexed on 2010/04/01 20:53 UTC
Read the original article Hit count: 152

Filed under:

This is a fairly common problem, it probably has a name, I just don't know what it is.

A.) User sees obscure piece of information in Row B of L_OBSCURE_INFO displayed on some screen at a certain point. It is in table L_Obscure_info.

B.) Under certain circumstances we want to correctly delete data in L_OBSCURE_INFO. Unfortunately, nobody accounted for the fact that the user might want to backtrack and see some random piece of information that was most recently in L_OBSCURE_INFO.

C.) The system is enormous and L_OBSCURE_INFO is used all the time. You have no idea what the ramifications are of implementing some kind of hack and whatever you do, you don't want to introduce more bugs.

I think the best approach would be to create an L_OBSCURE_INFO_HISTORY table and record a record in there every time you change data. But god help your ensuring it's accurate in this system where L_OBSCURE_INFO is being touched everywhere and you don't have time to implement L_OBSCURE_INFO_HISTORY.

Is there a particularly easy, clever design solution for this kind of problem -- basically an elegant database hack? If not, is this kind of design problem under a particular class of problems or have a name?

© Stack Overflow or respective owner

Related posts about database-design