lua-users home
lua-l archive

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


there is a textual list of shortwave broadcasters.

Each line of text contains column-oriented entries of some aspects
(language, frequency, time, day of the broadcast) of one broadcast.

There is already a small lua script, which is able to extract and
separate each bit of information of the whole table.

Since any value of each line is not unique in respect to the whole
table, there is no real key value for each line (despite its

I want to search the table very quickly, like 
"List all broadcasters transmitting on 9850kHz on sundays between
17:00 o'clock and 19:00 o'clock" and such...

(Yes, it sounds like a classical database task...but I dont want to 
urge my little single board computer to handle such a software for
such a little database (~7500++ lines)).

Hash tables / dictionaries were my first idea, but these are only
"one directional": Looking up the key results in the value, but 
the opposite direction means: Search the whole hash/dictoinary
"by hand" (for-loop or such).

How can I organize the data most "lua"ish so data lookups will
not be done by sequentiell searches but by resolving hash keys in a
way, so it is possible to search for as many aspects of the
information contained in the table as possible???

And to make things even more.....interesting.....<hrrrm>: the 
embedded computer runs linux and has limited RAM (256MB for 

Is there any way to got ??

Thank you very much in advance for any help!
Best regards,