That sounds like the easy part. What amount of data are you talking about?
Most importantly: does it fit into memory or not?
Amount of data is not a problem.
I don't know how Firebird handles this, but you should try if
a) it has a direct way to import XML data in some way
But here I loose the in between process of data manipulation
b) you can get away with generating "INSERT OR UPDATE" statements.
Hm, that sound like I should avoid my first naive approach.
However, if the diff is a real requirement, you may still have to find a
way to compare the data manually. What I did in a project once was to dump
the database content in SQL format, then line diff that with a dump I had
provided myself, after running both through Unix sort.
So basically you compared the values outside of the database? I wonder why it was faster, than using the database engine itself to search, compare etc. Are not databases supposed to do this in optimal way?
Regards
P.