[CDBI] multiple tables with same structure
blavender at gmail.com
Tue Sep 19 00:41:11 BST 2006
I'm starting on a new project (for me, anyway) which involves some
very problematic database layouts. Basically, it's a 10 year old
piece of software, which works on old Access databases. To work
around some limitations of access in 96, the original programmer had
to make multiple databases for certain objects.
Thus, I have a schema with a set of tables in a main database, and,
since the company has now grown, about 115 other databases which all
use a structure which is different from the main database and which
are identical to each other in structure but not data.
We have some software that will take the software out of access and
put it in to mysql, and it can even do nifty things like make the
needed tables from those 115 disparate databases into tables on the
main database, i.e. dbase1.table -> main.dbase1table, dbase2.table ->
main.dbase2.table, and so forth.
But that is, naturally, only half the battle when dealing with CDBI,
for the obvious reason that CDBI maps classes to table. I'm basically
trying to find a way to tell CDBI to fetch an object of type x from
table y, and the next time the script is run it might be table z, but
the object will still be of type x.
The data in one database doesn't need to be used with the data in
another right now, but these things tend to change when the higher-ups
see what can be done when the data finally escapes the prison of
Access. Read-only access is more than enough for now, so CDBI need
not neccessarily keep track of the table in which a particular record
Is there a way to do this with CDBI? I've scoured the wiki and the
mailing lists with google, but perhaps I'm just not searching on the
right words. Any help is appreciated!
More information about the ClassDBI