Revisions: algorithm and data structure

不打扰是莪最后的温柔 提交于 2019-12-06 10:00:45

One possibility is to have a object and property table (which you may have already). The create the association table containing ID ObjectId PropertyId Value Date_Added/version_number (as per your choice if you want to use timestamp or sequence column)

As per your problem you would always add to association table and never update it.

When you want to get a snapshot of latest object properties, you need to do a DISTINCT query for properties ordered by date_added/version number. For a given property checking history is straightforward as well.

I hope this helps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!