[Zope-dev] Re: The remaining spanner in the works :-)

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Wed, 07 Aug 2002 12:17:12 +1000


>>> Shane Hathaway wrote
> I created another set of components called "record storages".  Their job 
> is to load and store record sequences in a schema that matches that of a 
> serializer.  In the current AdaptableStorage code, most of them are 
> still called a "table", the old name for "record storage", but when I 
> started serializing to the filesystem I realized that "table" wasn't 
> general enough!

Plug: people might want to browse the online draft of Martin Fowler's
"Patterns of Enterprise Application Architecture" for some nice ideas
in this sort of framework. There's a whole section on Object / Relational 
Mapping Patterns. And unlike the GoF book, most of the patterns aren't
just workarounds for C++ deficiencies </cheapshot>  

http://martinfowler.com/isa/index.html


> Most record storages store data in some kind of database, but other 
> record storages act as a proxy for other record storages, converting 
> data in one schema to another.  This theoretically enables application 
> developers and database administrators to work independently, bringing 
> their work together through proxy record storages.

Although this does mean you could end up in a really nasty nasty mess
when trying to figure out responsibilities for the data changes - particularly
if you're adding a new bit of data that needs to flow through the system from
RDBMS to ZODB.

> Record storages are similar to SQLMethods, with the difference that 
> record storages provide a way to both read and write a set of records. 

I think this sounds like a Data Mapper or a Table Data Gateway in the 
Fowler book.


-- 
Anthony Baxter     <anthony@interlink.com.au>   
It's never too late to have a happy childhood.