With App Engine, I don't think you can ask "Here is my data, what
shape should it be?"  You could ask this question if this were a
relational db because it has the freedom to perform any kind of query:
full table scans, joins, aggregates etc.  As App Engine is very
limited in the kinds of queries it can run you have to shape your data
ahead of time to allow those queries.

Therefore you will have to think of all the queries you want to run
before you can know how to arrange your data into Model classes.

The most basic model would be:

  class MafiaWars(db.Model):
      json = db.TextProperty()

Keyed on user_id, this would be more efficient in storage space and
query time than your examples: multiple entities or multiple
properties on a single entity; but you could only ask the question
"give me all the data for user X".

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to