Hi Leandro,
  Think about the relative frequency of events.  It is probably
massively more common to list game info than for a player to change
their name / image, especially once they have a lot of data.  If
that's the case, denormalizing might be a very good choice.  If
someone does change their name/image you can easily use the taskqueue
to update all their game info.

  Depending on the data, you may also be able to keep the normalized
model but reduce the number of reads.  Just gather a list of all
entities you need to fetch, remove any duplicates, then get the info
from those entities.  If there are some players who's stuff is very
often displayed, use memcache to store their details.


Robert





On Tue, Jan 31, 2012 at 07:51, Leandro Rezende
<[email protected]> wrote:
> if i have 2 "Tables",
>
> "Table Player" , (Fields - PlayerKey, PlayerName, PlayerUrlPhoto)
> "Table PlayerGames", (Fields - PlayerGameKey, PlayerKey, GameDate)
>
> if i wanna list all games, i will create a query in "PlayerGames", and to
> show the "Players" info, i will have to "GetObjectbyID" to read PlayerName
> and PLayerUrlPhoto.
>
> What is the best way to do this?
>
> 1 - Using GetObjectByID is the right way (spending 1 "datastore read" more
> for each "PlayerGame" record)
> 2 - Store at "PlayerGames" the fields that i know that i will need to list
> in the future? (as playername and playerurlphoto, Saving the "DataStore
> read" to get Player info)
> 3 - Other way...
>
> * reminding that the player can change his name and his photo, so if i store
> the name and photo at "PlayerGames" i will have to update all the records
> too. (and will spend alot of DataStore Writes)
>
> Can someone give me a tip about this?
>
> thx
>
> --
> 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.

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