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

simple database solution without root access



I have some data in text format organized as follows

field_1,field_2,field_3,...,field_9
val_1_1,val_1_2,val_1_3,...,val_1_9
val_2_1,val_2_2,val_2_3,...,val_2_9
...
val_100_1,val_100_2,val_100_3,...,val_100_9


I want to do database (sql) like operations on this data. For example,
        - I want to find all the entries that have a particular value in field_2 and then use the hits to sum up the values in field_8
        - I want to find all the entries that have a particular value in field_2 and filed_7
        - If the values in the first column are dates, I want to find all the entries in field1 that are in a given date range
These are just a few examples... and the actual operations can be more complex.

The data is used only by myself. I will be the only person updating/deleting the entries.

Is there a simple way to achieve what I am after?

I looked at mysql (http://zetcode.com/databases/mysqltutorial/), but there the configuration seems to focus on having a central database that could be shared across different users. This does not work for me for three reasons:

1) I want the data to be stored in my home directory. So, I can backup the data as I please.
2) I want the data to be in text format. Since some times, I do sed/grep/awk the data myself. Also, this helps me to edit the data file directly using editors such as vim.
3) I do not have root access and am trying to avoid compiling large software applications.

Any ideas, pointers to existing code (perl scripts?) are much appreciated.

thanks
raju
--
Kamaraju S Kusumanchi
http://malayamaarutham.blogspot.com/

Reply to: