Saturday, July 28, 2018

Merge, Split, or Append - another version of the rules for the moving topic

What has been hard to clarify is how you start with a tree of context IDs, and follow rules for saving records of statements about the IDs, you always have a list of "current IDs" starting from the top level [where a generic "ledger" is always part of a chain of more and more detailed IDs] and when a new ID occurs you either, merge, split, or append it as follows:
If the new ID is already in the current chain of IDs then you merge the new info into the old, unless there is an overwrite conflict - in which case you split off a duplicate set of records below the new (these duplicated details are "SOFT" and can be overwritten).
Otherwise the new ID is outside the current chain of IDs, so you find one in that chain that is the ancestor nearest to the new ID, and append a bit of chain below that, through the intermediary IDs (recorded as "EMPTY" details), and append the new record to the end of the new chain.
After merging, splitting, or appending, the newly written detail is "HARD" and cannot be overwritten.

No comments:

Post a Comment