Re: Database vs. File Parsing [message #48061] |
Tue, 21 March 2006 08:58 |
Antonio Santiago
Messages: 201 Registered: February 2004
|
Senior Member |
|
|
James Everton wrote:
> Hello everybody,
>
> I'm at the point in a project where I need to start deciding on a
> method for local storage, and I was wondering if anyone knew the pros
> and cons of using a local database versus performing file parsing.
>
> In my situation, users will be performing specific queries to retrieve
> data from our site, and when they download these specific files, I'll
> need some way of storing the parameters of the queries so that they can
> browse through their downloaded files later on.
>
> I was first thinking that I might want to do a local database where
> each attribute in the database responds to a certain query parameter,
> but I wasn't exactly sure what IDL can do alone with databases, or if I
> would need each user to go out and download MySQL or something.
>
You can use the Java bridge to do so with DB. I use it in some program
and works very well.
> My second idea was that I could create a 'Table of Contents' file in
> which I would just store the information of each query by its file
> name, then just parse through this file when the user performs a local
> search. The problem I thought there might be with this idea is that the
> user can potentially have thousands of files, and I'm not too sure
> whether parsing a single file would take far too long compared to a
> database scheme.
Parsing file must be quicly for long files (I think those less than 2Mb)
but if you have a lot of information it will be better to use a DB.
>
> I hope I have explained this well enough that you can give me some
> ideas of which solution to go with.
>
> Thanks very much for your help,
>
> - James
>
--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
|
|
|