We are developing a large applications which are related to business. You can find these applications similar to some ERP, CRM, etc.
Now we have a requirement that we ne
I've had to do something similar to this in the past.
I found that the easiest way, if starting from scratch was to add an extra column in the objects data table that held the index of the replacement object. If the value held was zero then I knew that it was the latest version. This also meant that objects were never deleted, although I later added functioanlity that would allow the deletion of the past history.
Effectively the index becomes the version number of the object in question and any query to the DB for the latest version would use the qualifier WHERE NextVersionIndex=0
.
If not starting from scratch this can be implemented into a live system by adding an extra table to store these values - Object Index, Previous version index, next version index.