Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Database in Perl

by biohisham (Priest)
on Jun 08, 2009 at 12:50 UTC ( #769508=perlquestion: print w/replies, xml ) Need Help??
biohisham has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone, I have been using Perl as a script processing tool, since I am a computational biologist, but now a question is popping up, on a database perspective, how well does Perl score?, can it be compared with those established database programs...I am considering doing a project on a database that is a standalone, but the question is do you think Perl can really be dependable ? so I could start weighing the pros and cons against selecting an effecient DB tool

Replies are listed 'Best First'.
Re: Database in Perl
by JavaFan (Canon) on Jun 08, 2009 at 13:02 UTC
    Perl is not very well suited to write databases in. Luckely, it's very easy to connect to all major databases from within a Perl program.
      so I can assume it is not a good idea to come with Perl as a database develoment language? but I could use it as an interface to an existing database right?
        There are so many free, good quality, general purpose database products around I have to wonder why you would want to write another - unless you have some ground breaking search or index algorithim. Most database engines are written in C, for performance reasons, and may even have assembler in some performance critcal areas.

        Perl is used as an interface because most database engines have a C interface, and a wrapper can be written using the Perl-C API (that is XS). Many other languages use C wrappers in this way, not just Perl.
        Well, my $.02 on the subject-- I wouldn't use Perl to create an MS SQL database. I also wouldn't use Java to do that. (Although I'm sure both Perl and Java could construct databases of many different flavors from scratch.)

        If I needed a database, I wouldn't use programming languages to build it. I'd use the database tools to create and manage the database.

        Then I'd use programming languages to connect to the databases to do interesting things with the data; including add, delete and update information in the database.

        In my mind, it's a question of using the best tool for the job. To sum it up, the tools that come with the databases are best for me for creating databases, and program languages are the best tools for doing things with databases. Different tools for different jobs. (You can use a hammer and screw driver to fix just about anything. But sometimes a saw just works better.)



        -- Yeah, I'm a Delt.
        Yes, and yes.
Re: Database in Perl
by targetsmart (Curate) on Jun 08, 2009 at 12:55 UTC
    hmm, this will give you some idea

    -- In accordance with the prarabdha of each, the One whose function it is to ordain makes each to act. What will not happen will never happen, whatever effort one may put forth. And what will happen will not fail to happen, however much one may seek to prevent it. This is certain. The part of wisdom therefore is to stay quiet.
Re: Database in Perl
by bungeejumper (Initiate) on Jun 08, 2009 at 12:58 UTC
    Perl can very well connect to Database and some of big organizations i know, who does processing big files put tons of data every day in D/B. I'm not sure when you say we can compare it to other db tools (what are those db tools you are trying to compare). If your requirement is processing data and do DML operations then perl is quite good.
      with tools I mean, SQL or Access... since I am not way too familiar with them but I know they could produce databases adn ACCESS could also give interfaces as well as VB if i could achieve the same using Perl from the scratch, building a database until generating and maintaining such reports from this database and all that
        Oh absolutely NO. Why to reinvent wheel if it's already there. I thought you are parsing files and inserting data into databases. Use third party tools. there are lot of them.
Re: Database in Perl
by hangon (Deacon) on Jun 09, 2009 at 01:08 UTC
    ... ACCESS could also give interfaces as well as VB if i could achieve the same using Perl from the scratch, building a database until generating and maintaining such reports from this database and all that

    You seem to be looking for a RAD (Rapid Application Development) system for a database. I suggest you take a look at RBase. It's had a long development history (almost 30 years - much longer than Access has been around) and is very robust. RBase is a commercial product with a GUI for designing database, input forms, reports and application logic. It also has a programming language with embedded SQL, though the language is not as powerful as Perl. Support is very good, and even the company president answers questions on the mailing list.

    You also should be able to do you want with Perl, but it would probably mean more work. The easiest way to get a database engine is to install the SQLite module. Then if you need a GUI you can choose from Perl/Tk, Gtk, wxPerl and Prima, with their associated learning curves. In any case it would also be good to learn SQL, since variants of the language are used for most databases you will find.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://769508]
Approved by wfsp
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2018-05-25 21:05 GMT
Find Nodes?
    Voting Booth?