On Sat, Feb 1, 2014 at 6:58 PM, cynic limbu <lists / ruby-forum.com> wrote:
> Now I'm not talking about those type of databases that keeps datas of a
> given website. I'm talking about something similar to it but that can
> work offline. Still confused? Here is what I'm talking about.

Basically any database can be used without a web application. At least
I wouldn't be aware of any that could not.

> Let's say we have a login screen
>
> Source code : http://pastebin.com/iMvgxkMk
>
> Can I do something like that?
>
> The variable will empty itself and start over after the program is
> closed so can I do something so the program can save and retrieve data
> from a file anytime?
>
> Let's revise, all I'm asking for is
> Program creates a new file.
> Program can add/remove/retrieve data from the file.

Without knowing more about your requirements in terms of types of
data, data volume, access patterns, # of concurrent users etc. it's
hard to recommend something. You could use

- ASCII files
- Marhsalled data
- PStore
- JSON formatted file
- key value store
- relational database
  - of which SQLite is one variant


> Just like a database for a website.

Please do not associate "database" with "website". A database is just
that, a persistent (most are but there are also databases for
transient usage) storage for data.

Kind regards

robert


-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/