Here's something I've been wondering about Expando.

Say you define an Expando model like so:

class meStats(db.Expando):
    meNumber = db.IntegerProperty(required=True)


And, then you begin populating it like so:

meEntity1 = meStats(meNumber = 200,
                                June          = 14,
                                2009          = 6)

meEntity.put()

meEntity2 = meStats(meNumber = 381,
                                July           = 21,
                                2009          = 7)

meEntity2.put()

..and so on.

The "July" column only has indexes for entities that have "July"
defined.. correct?  So, in effect, I am creating a partitioned index
for a table that can grow indefinitely.. and each time I get to a new
year/month combo, I am inserting into new indexes..? (instead of
inserting into an ever increasing, monolithic "Month" column index..)

Mainly, I'm packing the pertinent information into the column names
and column values (instead of making the column name just some dummy
value like "Month").. this allows me to implicitly create the
partitioned table/index (I think of it as a partitioned index since it
is, schematically [as far as I'm concerned], one table.)

You could give the columns better names.. maybe "June_Day" and maybe
"2009_Month" if you wanted...

Does this make sense?  Have I misunderstood how Expando handles
indexes?


Another way to word this question would be:

Is there a difference between the indexes created for the June and
July entries in the above Expando model and the below Model models:

class meJune09Stats(db.Model):
    meNumber = db.IntegerProperty(required=True)
    June = db.IntegerProperty(required=True)
    2009 = db.IntegerProperty(required=True)

class meJuly09Stats(db.Model):
    meNumber = db.IntegerProperty(required=True)
    July = db.IntegerProperty(required=True)
    2009 = db.IntegerProperty(required=True)


Thanks for any information.




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

Reply via email to