ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What I am looking for is some guidance to Perl and Databases. I am in the process of designing perl scripts which will need to be able to read a small file (preferably a perticular database format) for instructions, but will then link to another database which has the potential to be huge in size.
I was thinking along the lines of DBM Files or XML. MySQL had crossed my mind, but at the end of the day, it would need to be able to used on many machines, and MySQL is not installed on every machine. XML is more likely, but is it really designed for database side of things?
i ve almost never worked with xml but read about it. there is xml query language to query data stored in xml similar to sql. so i guess it's what u need. but i don't know how fast it handles huge piles of data.
is the program intended to run on *nix or various platforms? there's no perl on doze by default either, is it?
cheers, jens
I got no experience whatsoever with XML, but if your files
tend to get huge performance might become an issue, and
you'd probably wish for a SQL database engine
PostgreSQL is quite portable and not very huge ... :}
It is intended solely for Linux, which I believe that most have perl installed as default (and if not, why not! ).
To have a size guestimate, I would say approx 500 - 1000 rows, which would contain 5 -7 fields. What do you think something like RPM's use as their database format?
Originally posted by CragStar
To have a size guestimate, I would say approx 500 - 1000 rows, which would contain 5 -7 fields. What do you think something like RPM's use as their database format?
Gidday!
In that case you can probably even use a flat file format, without
indexing or a hash, since not everybody has LibXML or the
Perl XML module(s) installed, either :} and Perl is fast enough for
doing files with that few lines decently.
Originally posted by CragStar Thanks. I did think that a flat file format would suffice, and your right, the XMLmodule would need to be installed on the other machines.
I think I will start off with a basic file format, and if performance drops considerably then I guess I'll have to
change. Cheers for all the info!
Sounds like a good idea ... worst case scenario would be to get (I bet there's something out there :})
some kind of indexing algorithm in Perl and throw that in when performance drops ... that way you'd
stay library independent ... and as it's not multi-user (is it?) you don't have to consider stuff like
record locking ... ;)
Wasn't a lot of info, just a few basics ... and it was my pleasure :}
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.