[Zope-dev] Re: [ZODB-Dev] FileStorage modification help
fritz steindl
zope@floSoft.net
Tue, 8 Apr 2003 10:12:29 +0200
Am Dienstag, 8. April 2003 00:06 erhalten:
> On Mon, 7 Apr 2003, fritz steindl wrote:
> > i try to modify the class FileStorage (in a strange way ;-)
> >
> > i want to hook before the data is saved to the file, extract some data
> > and the rest should go to the file
>
> [...]
>
> What on earth for?
>
> Just curious
>
>
> John
i wanted for some reasons to save data in an external DB (mySQL at the
moment) still keeping to objects on the frontend - not caring for relational
design
for that i wrote a mapping from objects to a relational DB
(external methods are doing that)
thats done and running fine :-)
the second is that i want to use ZEO
but in my approach the ZODB does know nothing about my data so that won't work
so i had the idea to
1) store a zope object
2) hook the storing process at the right place (?)
3) filter my data out to save it to the relDB and
4) to ZODB should go a very litte object only knowing the object ID my object
of course on the way back the retrieval of of zope object with ID 1234 must
fetch the additional data from mySQL and return the complete object
only two little modifications at the right place, isn't it ;-)
with this awareness of my objects in the ZODB i should be able to use ZEO (?)
so far my ideas
but im very interested in other thoughts about keeping object design on front
and using a RDBMS at the backend (without endless writing SQL statements for
often changing objects with different attributes)
fritz
(-:fs)