Tim Bunce wrote:

I know what it does, I'm trying to find real examples that demonstrate
why people think it's needed. Nick has provided a good one. Any others?

Something like DBIx::DBH is in use in our organization. This is because every sql "source" (meaning database table) is accessed with standard objects and an external definition file like:

  USER john
  PASS smith
  DBNAME <default>
  FILE sessions
  HOST my.hostname.com
  PORT 1521

  # ...
  # Definition of table fields
  myfield1  ... bla bla blah
  myfield2  ... bla bla blah

Thus, every piece of information needed for connection *should*
be separated and a frontend is provided to be able to define new
sources or modify existing sources from a browser.

Then, we provide different sql "driver" modules, that assemble
the DSN string given all the pieces.

For some db servers like Sybase, DB2 (MySQL?) a
"use <dbname>" is needed after connection to properly select
the database. Of course this is handled by the driver class.

--
Cosimo




Reply via email to