On Sat, 2005-05-07 at 14:57 +0100, [EMAIL PROTECTED] wrote: > Hello, > > Imagine you have a simple database with two tables, and a third to join them > as a many-to-many relationship. Someone sends me an SQLite database as a file > which has the same structure, but the data is different. I want to merge > these two databases together keeping all of the relationships intact, without > duplicating data.
Trivial. Don't use sqlite's "integer primary key", but instead globally unique identifiers. http://cr.yp.to/proto/maildir.html Has good hints on where to get your globally unique identifiers. Or translate the original keys to globally unique identifiers within a transaction before loading into your master database.