Objects have historical changes, and historical changes must be traced back. Some attributes must be inherited to the status quo, that is, they must be quickly queried from the current object to historical attributes. Taking a house as an example, the current situation of the House will change, or the actual measurement and replacement predictions with surveying and mapping usually require that all historical conditions be queried, so the historical conditions should be retained, however, the property rights or mortgages of houses registered in the past must be quickly queried.
The design table is as follows:
Field |
Description |
Oldfid |
ID of the room to be replaced |
Newfid |
House ID after replacement |
Nowfid |
The current idc id. The default value is the same as that of newfid. |
|
|
During replacement, record (oldfid, newfid, newfid) is added based on the new and old IDs, and the update is executed:
Update XXX set nowfid = newfid where nowfid = oldfid.
In this way, the historical chain is maintained, and all old fids can be quickly queried from nowfid, and then historical business attributes can be queried.