lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Title: RE: Data logging data base?

IMHO, I'd grab a copy of Metakit, a great little DB package which
is perfect for exactly this sort of thing. It's written in C++ but
has Lua bindings, and I believe the developer is even on this list.

        www.equi4.com/metakit/

Jason
379



> From: owner-lua-l@tecgraf.puc-rio.br
> I'm doing my very first Lua program, so go easy on me please. :-)
>
> Thought I'd ask some advice from the Gurus before I shoot my
> self in my
> foot in my naivete.
>
> I have a data logging system that gives me the time as the
> number of seconds since Jan/1/2000, then 17 one byte Analog
> to Digital converter values.  These values get scaled
> differently, but I already have working Lua code that handles
> that ok (I call one of 17 functions from a table that is an
> array of functions, as the data comes in).
>
> My question is what is the most effective way to build a data
> base, for fast access?  It will be write once, read many.
>
> When extracting the data I will be giving a start and end time, and a
> channel number.
>
> Because the data is sampled every three seconds for several
> days, this data base could get large fast.  However I'm more
> interested in speed than disk space.  Tho I don't want have
> to take up all of the computer memory with the data file.
>
> I was thinking of converting the time value to a string like:
>
> YEAR:MONTH:DAY:SECONDS_FROM_MIDNIGHT as the key, then a
> channel number in array format, to get the values.
>
> Is there a better way?
>
> One of the other requirements is that I be able to delete the
> data, on a
> day/date range bases.  Just put in NIL's?
>
> Also what would be the best way to save/restore this file?
>
>