http://www.perlmonks.org?node_id=1173253


in reply to Re: Putting an SQLite DB file into memory
in thread Putting an SQLite DB file into memory

This works brilliantly, and the feature is built right in! This is more than what I was looking for. Thanks clueless newbie :)

I'm finally writing the tests for my app, and this works perfectly for testing, instead of copying a db file then removing it in each test file.

I keep all configuration inside of the db as well as the data (generated every five seconds), so I think what I'm going to do is have the config aspect in a separate db on disk, and the streaming data in memory which I back up with a timed event.

For those wondering, this is an application that gathers grow room environment information (temp, humidity so far, to also include water level, pH, EC/PPM etc for hydroponics, and soil moisture content data for soil) and writes it to what could be a volatile database. However, the configuration aspect of the system turns on/off electrical systems (lights, fans, humidifiers), so that part of the db must be reliably on disk, in case of a system crash/reboot, it needs to remember everything (timing, on/off configuration etc).