I want to use SQLite
as file format for my app, a reporting program.
Below is an idea of the kind of schema I'll use (just the first few tables).
There will be one report
per file and all tables are children of that. So far so good.
But I want to be able to merge files, eg. to store 100 report
s in one file. I've read that with a little effort, I can use GUIDs in SQLite to avoid dealing with key conflicts when merging databases. Sounds good, but I need a GUID for every record in every table right? That's a lot of GUIDs for my statistics
table which might be large!
I then read about multi-column primary keys.
Is there any way I can create just one GUID for a report
, and have every child of the report incorporate that GUID into its key to make every record's key unique?
Is there a better overall approach?