Hi,

I need help/advise designing the model of my GAE project.

Here is the list of the entities I need :
- User
- ToolBox
- Tool
- ToolBrand
- ToolCategory
- UserToolBox
- DIYSession
- UserToolUse


A User can pick Tools from the ToolBox and add them to its
UserToolBox.
Then a User can declare DIYSessions, using its own Tools, by creating
UserToolUse associations.
A User can browse any other User DIYSessions and see which tool have
been used.
I also need to expose some stats/graphs of the tools usage, globaly or
per User, as :
- tool usage count
- category usage count
- tool usage / year, month or season
- category usage / year, month or season
- tool brand usage / year, month or season

A the BigTable/Datastore doesn't allow to call agregation functions as
count(*), AVG() or SUM() neither to use joins, I thought that I could
create a tree structure that would make entity groups like that :
User => Year => Month = DIYSession => UserToolUsage

If each time a User creates a DIYSession and use Tools I can update
counters in parent Month, Year, and User entities, I think I'm done to
get my stats of tools usage by dates.

I could represent the ToolBox with another entity group :
ToolBox => ToolBrand => Tool

And each Tool could also have a date tree structure similar to the
User one to store counters :
... => Tool => Year => Month [containing a Key from a UserToolUsage]

The problem is that I'll also need the same tree structure for each
ToolBand, each ToolCategory, and duplicate everything so each User
will have its own UserToolBox and ToolCategory stats.

Technically, that's possible but it looks like each UserToolUsage
creation will generate many write operations to the User entity group,
but also to ToolBox entity group and to each Category the Tool is
associated to.
On the other hand, the read operations would be quite simple as all
the data is allready agregated.
Future stats or graphs needs won't be easy to develop as they will
mean structure updates, and a lot of data processing to fill new
counters.

Am I on the good way ?
Should I stick to a traditional relational database and use good old
JOINs to generate my data ?
I really would like to have the scalable facility from GAE...

Hope my english is good enough so someone hunderstand what I mean ;)

Thank you,
Pierre

--

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-appeng...@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=.


Reply via email to