Thanks for all replies,

But I'm beginning to realise that my confusion might have more to do
with wishful thinking on my part than any sudden deterioration in grey
matter :-)

Part of my concern relates to data isolation between accounts but when
I saw the following post, I realised that I had better not confuse the
issue further:

http://groups.google.com/group/google-appengine/browse_thread/thread/439d466d4e04b522

I am beginning to think that the best way of storing my data is to
store each user's data for a given year as individual group entities
(at root) but using special key prefixes to assist retrieval and data
isolation

e.g. data for Account Id 1234567, User Id 98765, Year 2009 would be
stored in a root node with a key something like AUY1234567-98765-2009.

To assist with data isolation safety, the current "active" account,
user and year would be held as session-specific global variables. I
would create my own low level data retrieval, update and query methods
which will automatically generate the root/parent key for the current
data set.

And I can re-use this approach for other aspects of my data model.

Of course, I will need to maintain separate tables for housekeeping
e.g. user lists for each account, etc

What I am effectively doing is mapping my "conceptual" data model
(which is fully hierarchical) to the "less hierarchical/slightly
flattened" storage model.

Can anyone advise if this approach makes any sense?

Are there any "as-yet-unenvisaged" roadmap changes which might make
such a solution obsolete?

Are there any obvious stumbling blocks I might run into which I
haven't thought about?


On May 17, 4:35 pm, Jaroslav Záruba <[email protected]> wrote:
> On Mon, May 17, 2010 at 5:28 PM, rvjcallanan <[email protected]> wrote:
> > For example, if my user data has no ancestor, how do I retrieve user
> > data for a given account without adding a redundant account field to
> > the user data and filtering by account?
>
> The hierarchy (or ancestor path) is encoded in each key, and you can call
> then: key.getParent() which you can use in a query to obtain the parent
> entity.
>
>
>
> > Another related question: Are there hard limits on the number of
> > entity groups?
>
> Nope.
>
> --
> 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 
> athttp://groups.google.com/group/google-appengine?hl=en.

-- 
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