Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: What do people want from DB abstraction modules?

by cees (Curate)
on Jan 05, 2006 at 18:14 UTC ( #521305=note: print w/ replies, xml ) Need Help??


in reply to What do people want from DB abstraction modules?

In order of importance I want the following from a DB abstraction module:

  1. Make DB interactions safer
  2. Make DB interactions easier
  3. Make DB interactions consistent

Using DBI is not that difficult, but it is very repetitive, and often very verbose. Repetitive and verbose tasks tend to suffer from lazy mistakes in the code (especially from cut and paste errors).

By simplifying the access to the databas, I make my life easier, while also reducing the chance of programming errors (in my code, not necesarily the abstraction module itself), and my code ends up more consistent.

Now whether you abstract the DB using functions to do the repetitive work, or you use objects to represent the data is just personal preference, as both can gain you the same benefits.

Personally I like treating my tables as classes and rows as objects. This means I have used Class::DBI for quite some time, but lately I have been tempted to use Rose::DB::Object, which so far has seemed much cleaner and nicer to work with than Class::DBI. I guess time will tell which one I stick with, but Rose::DB::Object should definately be on the list of 'things to check out' for people that are looking into database abstraction.


Comment on Re: What do people want from DB abstraction modules?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2014-07-25 17:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls