OODB Design Question

Michael Gorsuch michael.gorsuch at gmail.com
Thu Jun 14 18:59:32 UTC 2007


Hello, I'm looking to port one of my side projects to Seaside with a
Magma back end, and need a little clarification on how Magma would
handle one particular situation.

This service is an online dream journal (http://www.dreamjournal.com),
and has a very simple object model.  Essentially, we have a User
model, and a Dream model.

User has an attribute called 'dreams' that holds all of that user's
dream info.  Dreams also need to be accessed by the public (if you
mark the dream as so), therefore I was also holding all of my dreams
in another collection (as well as with the User).  This made it easy
to handle sorting and what not for each view.

Most importantly, the Dream object inside the User's 'dream'
collection is the same exact Dream object stored in the master dream
collection, allowing for changes to be made and reflected across both
areas with ease.  If a user edits a particular dream, it changes in
both collections.

So.  Finally.  The question:

If I commit a User in a Magma repository, I know that all of his
dreams will be saved with him.  But, if I commit the master dream
collection to the repository, and retrieve it, will it still contain
the same exact objects that the User's have, or will they merely be
copies?  If they are copies, perhaps someone can suggest a more
intelligent way to manage this dataset.

Thanks!

Michael

-- 
Styled Bits 2.0: They're Mostly Broken, But I Try
http://www.styledbits.com


More information about the Magma mailing list