Pass in memory database between apps?

I’m trying to use multi-processing where each helper app is creating an in memory database (two tables, where each has the other as foreign key)

At the end I need to combine all these databases into one.

I could save them to disk and use a shell to combine them with

sqlite3 database1 .dump | sqlite database3
sqlite3 database2 .dump | sqlite database3

and then load the resulting database3

But is there a way to do it in memory? To pass the databases back to the main app?

[quote=219890:@Markus Winter]I’m trying to use multi-processing where each helper app is creating an in memory database (two tables, where each has the other as foreign key)

At the end I need to combine all these databases into one.

I could save them to disk and use a shell to combine them with

sqlite3 database1 .dump | sqlite database3
sqlite3 database2 .dump | sqlite database3

and then load the resulting database3

But is there a way to do it in memory? To pass the databases back to the main app?[/quote]

IPC comes to mind, but it is probably far more complex than what you posted. Not even sure it would be faster…

I’m using IPC for the communication, just not sure how to do databases with it …

you’d have to send the data for the records in the DB or stream the entire db, write it to disk then open it as a db