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

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-04-17 22:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (458 votes), past polls