An Introduction to Class::DBI - Bonus Material 40

Other Database Abstraction Solutions

  • Many people have created systems to abstract database access in perl. Here are some approaches

  • OO-RDBMS mappers (bottom up)

    • mapping the DB schema in perl objects

    • Alzabo, Class::DBI

  • Object persistence layers (top down)

    • Making Perl objects persistent in a database

    • Tangram, SPOPS

  • See POOP (http://poop.sourceforge.net/)

The Dangers of Abstraction

  • Easy to become too complex/abstract

  • As abstraction layers become more complicated:

    • solve more and more of the problem space,

    • make harder to accomplish what they don't cover

    • e.g. handle 95 % of all database access needs, but the other 5 % are now nearly impossible

  • They often require special tables in the database to maintain their state information

  • Class::DBI is a good compromise between utility and simplicity

 

YAPC::Canada << Previous | Index | Next >>
Copyright © 2003 Michael Graham