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

Re: Introduction to databases in perl?

by martell (Friar)
on Jan 01, 2011 at 13:34 UTC ( #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.

Comment on Re: Introduction to databases in perl?

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-11-29 10:26 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (750 votes), past polls