LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2002, 07:28 AM   #1
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Rep: Reputation: 47
Perl and Database formats.


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?

Any help?
 
Old 08-04-2002, 05:20 PM   #2
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu, mint, suse
Posts: 1,591

Rep: Reputation: 145Reputation: 145
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
 
Old 08-04-2002, 08:59 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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 ... :}

Cheers,
Tink
 
Old 08-09-2002, 02:22 PM   #4
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Original Poster
Rep: Reputation: 47
Yeah thanks for the info!

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?
 
Old 08-09-2002, 04:27 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
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.

Cheers,
Tink
 
Old 08-10-2002, 04:15 PM   #6
CragStar
Senior Member
 
Registered: Oct 2000
Location: UK - Frome
Distribution: Ubuntu
Posts: 1,081

Original Poster
Rep: Reputation: 47
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!
 
Old 08-11-2002, 03:05 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
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 :}

Cheers,
Tink
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with database perl silhoutte Linux - Newbie 4 05-23-2005 11:12 PM
Import Database Function Script Using Perl?? domquem Programming 3 01-13-2005 09:05 AM
How to interact with MYSQL database from within perl program Bassam Programming 5 02-26-2004 05:00 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
floppy formats? homer Linux - General 3 03-04-2002 10:07 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration