On 7/27/2012 3:06 PM, Jan E. wrote:
> Hi,
>
> Well, you'll obviously need some kind of database for the restaurants.
> The easiest way is probably to save them in a file as CSV ("comma
> separated values"). You can then use Ruby's CSV class from the standard
> library to process them:
>
> http://ruby-doc.org/stdlib-1.9.2/libdoc/csv/rdoc/CSV.html
>
> Processing means going through each row and checking if the values match
> the search criteria.
>
> You could also use a "real" database system like PostgreSQL. But that
> would take quite some time to learn.
>
and you can take some approach about it like:
load from file to mem.
write data on one of these conditions:
exit
write\save command
every 10 or other writes to db.

these will allow you lower disk access but has the risk of loosing data.

Regards,
Eliezer

-- 
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il