Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re^2: Putting an SQLite DB file into memory

by stevieb (Canon)
on Oct 04, 2016 at 13:35 UTC ( #1173253=note: print w/replies, xml ) Need Help??

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).

  • Comment on Re^2: Putting an SQLite DB file into memory

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1173253]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (10)
As of 2021-01-22 14:23 GMT
Find Nodes?
    Voting Booth?