I have 3 SQLite DBs, each having exactly the same set of 7 tables with respect to table structure. [They are Log Dumps from 3 different Machines].
I want to combine them into one SQLite DB, having those very same 7 tables, but each table should have the combined data from all the three DBs. since I want to run queries across the 3 of them.
What is the best, fastest way to do it.
Export each database to an SQL dump and then import the dumps into your new combined database.
Using console
sqlite3sqlite3is available in most linux repos and usually already present ootb on linux and macos.sqlite3utility create the SQL dumps:Using sqlite GUI’s
For available GUIs have a look at https://www2.sqlite.org/cvstrac/wiki?p=ManagementTools
For example, to make a dump with DB Browser for SQLite on the menu pick File > Export > Database to SQL file.
NOTE: With GUI tools you have more flexibility in terms of picking which columns to include, e.g. for example, in some cases, you might want to exclude primary/foreign keys, etc.