List Info

Thread: Re: DB v.s File??




Re: DB v.s File??
country flaguser name
United States
2007-09-17 17:19:09

On 17 Sep 2007 at 11:09, Lou Hernsen wrote:
> At what point does it save time and processer usage between
> reading and writing the entire file and using a database?
>
> How big does a file have to be before its faster to use a DataBase
> like mySql?

I'm afraid the best answer to this question you can get is "It
depends".

It depends heavily on the actions you need to do with the data and
the structure of the data. And often the reason to use DB is not as
much the speed of the processing but the speed of you implementing
the task. Once you invest the time to learn SQL and how to access the
database from Perl, it's often easiest to shove everything into a
database and then to run a few simple queries in SQL ... a langauge
that was specifically designed for querying and updating data.

> Yes.. I know I >SHOULD< use a DB.. .but I can't find a book that has
> the code in simple, plain perl (as opposed to perl that is written for
> people with PhD's in Programming) I just do this as a hobby.. Thanks
&gt; for any help Lou

I'm afraid I can't help here. I've been using Perl and programming
for too long to know of a good beginners tutorial or even to know
what is simple enough.

Hopefully someone else can suggest something, if something is not
clear still, don't be afraid to ask here.

Jenda
===== Jenda%40Krynicky.cz">JendaKrynicky.cz === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Yoga Resources

on Yahoo! Groups

Take the stress

out of your life.

Re: DB v.s File??
country flaguser name
United States
2007-09-17 18:26:01

--- In perl-beginner%40yahoogroups.com">perl-beginneryahoogroups.com, "Jenda Krynicky&quot; <Jenda...>
wrote:
>
&gt; On 17 Sep 2007 at 11:09, Lou Hernsen wrote:
&gt; > At what point does it save time and processer usage between
> > reading and writing the entire file and using a database?
> >
> > How big does a file have to be before its faster to use a
DataBase
> > like mySql?
&gt;
> I'm afraid the best answer to this question you can get is "It
> depends&quot;.
>
> It depends heavily on the actions you need to do with the data and
> the structure of the data. And often the reason to use DB is not
as
> much the speed of the processing but the speed of you implementing
> the task. Once you invest the time to learn SQL and how to access
the
> database from Perl, it's often easiest to shove everything into a
> database and then to run a few simple queries in SQL ... a
langauge
> that was specifically designed for querying and updating data.
&gt;
> > Yes.. I know I >SHOULD< use a DB.. .but I can't find a book that
has
&gt; > the code in simple, plain perl (as opposed to perl that is
written for
> > people with PhD's in Programming) I just do this as a hobby..
Thanks
> > for any help Lou
>
> I'm afraid I can't help here. I've been using Perl and programming
> for too long to know of a good beginners tutorial or even to know
> what is simple enough.
>
> Hopefully someone else can suggest something, if something is not
> clear still, don't be afraid to ask here.
&gt;
> Jenda
&gt; ===== Jenda... === http://Jenda.Krynicky.cz =====
&gt; When it comes to wine, women and song, wizards are allowed
> to get drunk and croon as much as they like.
&gt; -- Terry Pratchett in Sourcery
>

Hello LOu,

Just today, Chas Owens gave a nice example of using DBI on
perl.beginners. The link is:
http://groups.google.com/group/perl.beginners/browse_frm/thread/0b996
e05eb3a3d27/e627903fd9f7e9a7?hl=en#e627903fd9f7e9a7

Searching either comp.lang.perl.misc or perl.beginners for DBI will
give you many examples.

Chris

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )