Coming from a relational database background, as I\'m sure many others are, I\'m looking for some solid guidelines for setting up / designing my datastore on Google App Engine.
Don't duplicate the properties if they'll always be the same between the SearchResult
and a Search
. If a SearchResult
should have a reference to a Search
, keep a ReferenceProperty pointing to the Search. This basically stores the related Search
's Key
in the model.
class SearchResult(db.Model):
search = db.ReferenceProperty(Search, required=True)
# other stuff...
I also highly recommend you watch some of the App Engine videos from last year's Google I/O (and from 2008), in particular this one by Brett Slatkin, and this one by Ryan Barrett. They're all pretty helpful videos if you have the time, but I found those two in particular to be really great.