Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Introduction to databases in perl?

by martell (Hermit)
on Jan 01, 2011 at 13:34 UTC ( [id://879995]=note: print w/replies, xml ) Need Help??


in reply to Introduction to databases in perl?

Additional modules that are interesting: class:dbi and class::dbi::sweet. I find them, for programming standard CRUD operations in small scale projects, very useful. Especially the neat tricks you can do with automatic inflating and deflating, with the iterators they create, with navigating between relationships without explicit writing SQL joins, ...

2 caveats:

Don't try to use the generated classes by class::dbi as classes to program your business layer on. In very heavy projects with lot of business logic, this means additional copying of data between class:dbi objects and your business layer objects and the resulting gain in programming time is very small, even negative. But in lightweight web applications that have to show data from databases, I like them.

For complex queries I find it faster to use the SQL syntax and placeholders directly than to use the elaborate search options offered by the classes.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-03-29 01:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found