[PEAK] Re: Persistence styles, MDA, AOP, PyProtocols, and PEAK

John Landahl john at landahl.org
Fri Jul 16 17:01:27 EDT 2004


On Monday 12 July 2004 12:15 pm, Paul Moore wrote:
> [...]
>
> > a mechanism that's at its best only for the document style -- as
> > PEAK's is.
>
> And this is another piece of the puzzle for me. My background is in
> database admin - specifically Oracle - and a lot of my focus is on the
> types of model which you refer to as "fact base".

Note that you can use peak.storage at a lower level and bypass the current 
MDA / "domain model" / object persistence features.  The very unfinished 
"PeakDatabaseApplications" tutorial on the wiki [1] shows a very small but 
functional example of interacting with an RDBMS through an ISQLConnection.  
Straight SQL commands return a result iterator, each iteration of which 
produces a nicely wrapped result object.  The example also shows basic use of 
the binding API as well.

[1] http://peak.telecommunity.com/DevCenter/PeakDatabaseApplications

> How would you view the DM used in the "Hello, world" sample from the
> Wiki? I found it quite non-intuitive, and I'm not sure if that was
> because I don't understand DMs well, or because the example was an
> inappropriate (or at least, strained) use of them.

Personally I don't find DMs terribly unintuitive, but then I've been working 
with them for a while.  Have you looked at the RDBMS-based DMs in the 
"bulletins" example in addition to the file-based DM in IntroToPeak?  A 
'shelve'-based DM is an interesting option, too, and one can be done in about 
12 lines of code.

But like Phillip has pointed out, they're best suited for working with single 
or small groups of objects rather than working across large datasets in an 
RDBMS.  They're also a good solution for dealing with non-RDBMS storage media 
in a consistent way.



More information about the PEAK mailing list