Todd Benson
4/1/2008 4:37:00 PM
On Tue, Apr 1, 2008 at 10:32 AM, James Dinkel <jdinkel@gmail.com> wrote:
>
> > But ultimately it depends on what you want to do with the data.
>
> yeah, it's kinda hard to describe without just posting my entire script,
> which I doubt people will want to read.
>
> The data will be accessed by one ruby script, running on one computer.
> The data will be read in, then the file closed and done for a couple
> hours. So no concurrent access, no relations, no keeping the connection
> open for extended periods of time, which is why I thought a database
> would probably be overkill and just add overhead.
>
> But I didn't know if maybe reading a file into memory would take more
> effort than reading entries from a database. Also, I was a little off
> on the numbers, I meant to say that there are hundreds of names per
> category, so total names could be over a thousand. That size will
> likely never ever change beyond +/- 100 at the most.
>
> Thanks for the info. I'm really a newb at this, so any thoughts on
> storing data using any of these methods is helpful.
>
> James.
I'm going to slightly disagree with Lionel -- and also Robert -- on
this one. First of all, a database is not necessarily just for
concurrency. It's for data integrity and allows the ability to build
reports on that data that you can trust because of the strict nature
of the underlying data store (I'm talking about RDBMS, but I've kept
my eyes open about OO databases as well; stay away from Pick,
though!!).
Here's the problem with relational databases, though (RDBMSs): it's
hard to model a hierarchy (which you can pull off somewhat clumsily
with XML).
If you are not going to do serious queries and inserts on the db, and
your data isn't complex, then a flat file approach might work. It
works, after all, for software builds. I strongly recommend against
it in higher languages, though, even for small apps. And, no, I am
not a database vendor.
I always tell people they should learn SQL, but nowadays I'm getting a
cold shoulder, especially with OO people :)
The other important thing that I've noticed about data and storage is:
what do you want to do with it and how often? Store it, query it (and
how), add to it, move it around, archive it, etc. These are important
factors to consider.
Todd