GAE python database object design for simple list of values

Posted by Joey on Stack Overflow See other posts from Stack Overflow or by Joey
Published on 2010-02-28T23:32:02Z Indexed on 2010/04/24 16:03 UTC
Read the original article Hit count: 433

I'm really new to database object design so please forgive any weirdness in my question. Basically, I am use Google AppEngine (Python) and contructing an object to track user info. One of these pieces of data is 40 Achievement scores. Do I make a list of ints in the User object for this? Or do I make a separate entity with my user id, the achievement index (0-39) and the score and then do a query to grab these 40 items every time I want to get the user data in total?

The latter approach seems more object oriented to me, and certainly better if I extend it to have more than just scores for these 40 achievements. However, considering that I might not extend it, should I even consider just doing a simple list of 40 ints in my user data? I would then forgo doing a query, getting the sorted list of achievements, reading the score from each one just to process a response etc.

Is doing this latter approach just such a common practice and hand-waved as not even worth batting an eyelash at in terms of thinking it might be more costly or complex processing wise?

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about database