Are these all not simply "places"? Why not add a CategoryProperty?
--
Read my blog! I depend on your acceptance of my opinion! I am interesting!
http://ironfroggy-code.blogspot.com/
Although, I'll be honest, I'm not really sure what the direct value is
with things like the Category and Rating property types. I mean, what
is it abstracting for us? Whats the point?
The speed argument could count for something, but an index on the
category property would solve that.
> Thanks for the advice but I remain skeptical - I prefer that the
> entities are stored in separate groups for speed's sake. If I want to
> fetch Continents (there are only 7), I don't want to search an entity
> group that includes 100's of 1000's of cities, regions, and
> countries...
Separate "groups" are largely irrelevant for the datastore; that's one
of the key differences between it and a regular SQL system. Objects
are keyed uniquely, regardless of their "type".
Using the filters (and thus indexes) is going to be fast enough,
especially if you start memcaching the common parts of it.
Dave.
well for one I wouldn't store that in the db. I don't think it will be
mutable enough :)
> I don't want to search an entity
> group that includes 100's of 1000's of cities, regions, and
> countries... Also, I do expect to uniquely extend the subclasses with
> properties - I just don't know what they are yet... I'm still
> designing.
>
> Calvin, I'm curious why this is frowned upon in Python. Can you tell
> me why or where I can read more about it? I'm so accustomed
> abstracting and normalizing "all the way" as good OO and db design,
this has no relevancy in python, it's just that python's OOP is way
beyond the typical restrictions of type-based-class objects.
I'll really suggest trying to see if you don't need the extra types
just to label them. Aren't they all locations?
> but if this can be problematic in some instances with Python and/or
> with the GAE datastore, I want to know - my purpose is to design for
> performance and scalability on this platform and I am all ears on the
> matter.
datastore is new and therefore we need to figure out the best
practices, and so far the conclusion is that data normalization, in
the SQL sense, is not a great idea. in appengine the less "joins" you
have the better.
from google.appengine.db import polymodel # ndb also has thisclass P(polymodel.PolyModel): passclass C1(P): passclass C2(P): passP.all() # May return instances of C1 and/or C2.
Thanks for the advice but I remain skeptical - I prefer that the
entities are stored in separate groups for speed's sake. If I want to
fetch Continents (there are only 7), I don't want to search an entity
group that includes 100's of 1000's of cities, regions, and
countries...
Also, I do expect to uniquely extend the subclasses with
properties - I just don't know what they are yet... I'm still
designing.
Calvin, I'm curious why this is frowned upon in Python. Can you tell
me why or where I can read more about it? I'm so accustomed
abstracting and normalizing "all the way" as good OO and db design,
but if this can be problematic in some instances with Python and/or
with the GAE datastore, I want to know - my purpose is to design for
performance and scalability on this platform and I am all ears on the
matter.