Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: How to modify/delete records in a flat-file database?

by matija (Priest)
on Apr 28, 2004 at 10:59 UTC ( [id://348780]=note: print w/replies, xml ) Need Help??


in reply to How to modify/delete records in a flat-file database?

Those are exactly the type of problems which should cause you to switch away from the CSV file for the underlying "database".

A colon (or comma etc) separated file is fine as long as you have a relatively small number of records, and you will be mostly searching them, only occasionaly adding records.

As soon as you start changing records, deleting them, or trying to manage hunderds or more, a database comes in really handy. A database can complete such operations faster because it isn't hobbled by the CSV format: it can create indices, trade space for speed, and use other strategies which are not available to a CSV using program.

There are a number of very lightweight databases, such as DBD::SQLite which can be installed without fuss and aren't difficult to administer.

If you need the CSV format for other programs, or because humans want to also edit by hand, you can allways emit the CSV from the database after every change.

  • Comment on Re: How to modify/delete records in a flat-file database?

Replies are listed 'Best First'.
Re: Re: How to modify/delete records in a flat-file database?
by JoeJaz (Monk) on Apr 28, 2004 at 17:00 UTC
    From looking at the Document pages, this looks like a nice little database. I guess I am caught between deciding if there are going to be enough file operations to warrent a database, of if I should use a flat file. The database looks like a nice solution, however, and I might just use it if it will make my life easier in the long run. Thank you for sharing your advice and experience with me. Joe

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://348780]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found