in reply to Re: CDBI and multiple databases
in thread CDBI and multiple databases

Thanks perrin.

One other off-topic question: if we refactor the DBs into one monster DB over time, what are the downsides? It is harder for our power users to find tables, maybe, if everything is in one big bag. But beyond that, are there any CDBI downsides? Any database performance issues? Backup issues? The earlier comment about BLOBs was instructive -- while we're not using them, the comment made us realize that refactoring many small INNODBs into one large INNODB could have other consequences of which we're not aware......

(apologies for this OT post, but it continues the thread, and we're curious.)

Replies are listed 'Best First'.
Re: Re: Re: CDBI and multiple databases
by perrin (Chancellor) on Mar 22, 2004 at 17:23 UTC
    I'm not aware of any downsides to having all of your tables in one database, especially if you are already using them together.

    If multiple databases in MySQL are similar to multiple schemas in Oracle (i.e. you can just access tables by saying db_name.table_name), you may be able to convince Class::DBI to use that syntax. Try setting the table name in one of your classes to that fully-qualified syntax and see what happens.

      A thousand ++'s, perrin. Hadn't thought of the obvious -- have all CDBI classes point at one database (hence they all get the same Ima::DBI handle), then use fully qualified names in the table statement. IT WORKS.

      This lets us have our cake and eat it too -- simple txns (mpeppler's comment was right on -- I didn't really like the app-level txn rollback handling trick) and different DBs. Hurrah!

      Many many thanks, all