It’s possible to create an in memory SQlite database:
rc = sqlite3_open(":memory:", &db);
but if I’ve understood the documentation correctly, this database is local to the app that created it.
I have a requirement for an in memory SQLite database which can be accessed by several apps. Other than creating the database on a ramdisk, is there any way of doing this?
This is for an embedded linux platform.
You can’t share an in-memory database across processes – it’s really not designed to do that because it lacks the right sort of integrity promises (but which does mean it’s faster) – so either put the database on more permanent storage (such as the ramdisk) or put the DB in a single process (the “database manager”) and use some form of local communication strategy (unix-domain sockets, named pipes, etc.) to allow the other processes to ask the database manager to do a query for them.