Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Simple & convenient Perl database

by santander (Acolyte)
on Sep 22, 2004 at 15:36 UTC ( #392933=perlquestion: print w/ replies, xml ) Need Help??
santander has asked for the wisdom of the Perl Monks concerning the following question:

Could someone recommend simple, convenient Perl database, freeware(not shareware). Keyword is *freeware*. I have small flat text database 8847 rows, 10 columns. Delimiter -semi-colon, or pipe. Two search fields, nice html template. Correct/update items online is not necessary; but upload full file online will OK.

Comment on Simple & convenient Perl database
Re: Simple & convenient Perl database
by Paladin (Priest) on Sep 22, 2004 at 15:42 UTC
    Checkout SQLite for which there are Perl bindings on CPAN.

    Update: Even better, the entire DB engine is included in the Perl module, so you don't even need to install SQLite to use it from Perl, just DBD::SQLite and DBI.

      Hi, NO, I am not a guru. I use third-party hosting. I know nothing about SQLite; DBD::SQLite; DBI. Its very abstract. What I need is freeware database PERL SCRIPT. All I need is *change path to perl* and put script on web server. No *ANY* other headache, sorry. Otherwise Perl is wrong tool.
        What I need is freeware database PERL SCRIPT. All I need is *change path to perl* and put script on web server.
        It sounds to me like you're an end user, not a Perl programmer. In that case, you're probably asking this question in the wrong place, as The monastery is about supporting Perl programmers, not Perl end-users. Perhaps you could choose to become a programmer, or perhaps you should hire a programmer or consultant to finish your task, or find some sort of end-user support community.

        -- Randal L. Schwartz, Perl hacker
        Be sure to read my standard disclaimer if this is a reply.

        Otherwise Perl is wrong tool

        Wrong tool for what? And what would you consider as alternative tools?

        Santander, you have to be more forthcoming with what you want and what you don't want. You wanted a free database, but you didn't specify that you didn't want to deal with DBI (hence, I am assuming, SQL). So, various wise monks recommended SQLite, and one even recommended DBD-CSV, but they all seem to not meet your requirements. These kinds of questions are not very helpful and waste everyone's effort.

        You also say that you want a "freeware database PERL SCRIPT." What do you want... a database, or a script?

        What do you exactly want to do? From your original post it seems that your text file is doing the work for you quite well, isn't it? 8847 rows, 10 columns are peanuts for a decent computer and Perl... no one will even know there is any processing going on. And since you also mentioned "Correct/update items online is not necessary" (whatever that means), a text file would be fine for you. Perl can happily munch through few tens of thousands of lines of text without any problems. If you start running into speed issues, you can think of converting to BerkeleyDB, but you haven't specified upfront if that is too "abtract" for you.

        Ask mostly exactly what you want, and also check out a recent article on perl.com regarding embedded databases.

        Hope all this helps.

Re: Simple & convenient Perl database
by herveus (Parson) on Sep 22, 2004 at 15:44 UTC
    Howdy!

    DBI plus DBD::CSV gets you the database. The rest is not really part of the database, per se. There are many choices on CPAN that will give you HTML templating options...

    yours,
    Michael
Re: Simple & convenient Perl database
by davido (Archbishop) on Sep 22, 2004 at 15:59 UTC

    For lightweight, simple, no-frills, it's hard to beat DBD::SQLite. It does have its limitations though, one of which is that its implementation of SQL is a little less than complete and total. Nevertheless, it provides all of the essentials, so long as essential needs aren't too elaborate. You can read up on SQLite's implementation of SQL and its features at http://www.sqlite.com. SQLite's source is in the public domain, and the CPAN module is distributed under the same terms as Perl. SQLite, as others have mentioned, installs everything you need when you install the single CPAN module DBD::SQlite. And the databases are contained in single files.

    If your needs are more involved, more demanding, and if you can live with increased complexity, then PostgreSQL is another very good option. Its implementation of SQL and its feature set are more complete, and include many advanced features. I doubt that you'll ever outgrow it, unless you become the next eBay or something. PostgreSQL is distributed under the same license as BSD, and is also free. You can find the database engine at http://www.postgresql.com, and the Perl drivers for it at DBD::Pg.

    Both DBD::SQLite, and DBD::Pg are designed to be used with DBI.

    Good luck!


    Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://392933]
Approved by herveus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (10)
As of 2014-12-28 09:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (180 votes), past polls