Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Creating Moose Classes to Interact with mySQL/Oracle

by stvn (Monsignor)
on Feb 22, 2011 at 14:56 UTC ( #889599=note: print w/ replies, xml ) Need Help??


in reply to Creating Moose Classes to Interact with mySQL/Oracle

I would suggest DBIx::Class, Fey::ORM or Rose::DB::Object. They are all excellent modules, fully OOP and all will do everything you want and more, allowing for your application to grow. However, if you feel you want to write this from scratch here are a few CPAN modules you will want to look at.

1. connect/disconnect to/from oracle/mysql database.

Obviously you need DBI, but I also recommend using DBIx::Connector to manage your DB connections, it is battle tested code that has been extracted from DBIx::Class and will just make your life easier.

2. query tables and return data.

You really don't need anything more then DBI to do this, but you might want to look at Fey and in particular Fey::SQL as it is a nice way to manage your tables and have proper SQL generated for you. To make things a little easier when querying, you can take a look at FeyX::Active, which just wraps Fey::SQL (see the SYNOPSIS for details)

3. process data and create relevant html reports.

Well you will probably want Template to do HTML templating to create your reports with, and if you need to do any charts or graphs, I highly recommend Chart::Clicker. For data processing, well that is what Perl does best, but you might want to check out a few really useful CPAN modules like List::AllUtils and Data::Visitor::Callback.

-stvn


Comment on Re: Creating Moose Classes to Interact with mySQL/Oracle

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2014-07-12 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (238 votes), past polls