Is there a database which i can use?

I am (trying) to program scenes etc using lua.

I often ‘miss’ a database where i can put values which i can use later on.

For example, i let a scene switch on when movement is detected and when no lights are on.

I want to save if motion was detected, on what lux value and the exact time
I want to use these values to run/swith other scenes and want to look back when and how often a motion is triggered our a value is reached.

Is there a ‘database’ which i can access and save my values in there, if so how do i use this, is there a manual?

(i normally program in php and mysql)

I use the Variable Container plugin for something similar. I have a “movie time on” and “movie time off” scene set up that stores the values of all of my dimmers to variables before setting them to a set configuration, then reads those values back to reset the room back to what it was before when i’m done with a movie

And how many variable containers do you use to do this? Each one holds 5 values right?

i do now the same, you can add as many variable containers as you desire.
I now use 5 containers, each one can store 5 variables, so in total i can store 25 variables