Lets say I have 2 datasets: A and B, that have the same columns. I want to get the ‘distance path’ – minimal operations needed to be done, to change datasets A to B.
I can assume, that A and B contain only in few differences and I’m looking for something better, then:
- remove all A’s elements
- insert all B’s elements into A
How can this be archived?
If you want to find out how to transform A into B, you need to know what the difference between A and B is. There’s a very simple general algorithm for that, though it might be more complicated depending on how many fields are in your dataset and how many of them can be different from A to B. But here’s the general idea:
datasets. Compare the two items with a comparison that can return
less than,equalorgreater than.Once you’re done, you’ll have a full list of differences between A and B, which will make the steps needed to transform A to B simple to calculate.