[google-appengine] Re: Entities question

2009-01-18 Thread Chen Harel
Ok, If I go with number 1, I'm not sure how can I denormalize it to print the CD titles... If I can't join on the CD titles them selves... How can I fetch the names of the CDs if the select is SELECT * FROM Ownership WHERE user_id = user_id ? Bill, 10x a lot for your help... On Jan 17, 10:13 

[google-appengine] Re: Entities question

2009-01-18 Thread Bill
By denormalize, I mean storing the CD titles in the Ownership entities as well. Yep, there'll be duplication to avoid the join, but you'll be able to get the CD titles from the fetched Ownership entities in one query. I'm still trying to figure out best practices myself with the datastore.

[google-appengine] Re: Entities question

2009-01-17 Thread Bill
Chen, Some differences between using an Ownership model and using a list of references to CDs in a User entity: 1) You can store info associated with Ownership as mentioned in my previous message. So if you want to print all the CD titles owned by a user, you could denormalize CD titles and

[google-appengine] Re: Entities question

2009-01-16 Thread Bill
You could do an entity that has 50 genre counters. Some thoughts: 1) It seems like you can make genre part of a list property in a CD since each CD will only be a small number of genres. 2) I wouldn't use a Reference List for a User entity, because a User might have thousands of CDs. See Rafe

[google-appengine] Re: Entities question

2009-01-16 Thread Chen Harel
Hi, I'm not sure I've followed you with whole Ownership model.. Isn't that a RDBMS approach to the data and not BigTable's? Regarding the genres, they are fixed (53 to be exact) and he can't select new genres that aren't in the predefined list. Regarding the counter entity, this is basically

[google-appengine] Re: Entities question

2009-01-16 Thread Bill
I'm not sure I've followed you with whole Ownership model.. Isn't that a RDBMS approach to the data and not BigTable's? The two approaches aren't mutually exclusive. In the case of User - CD, a User can have thousands or more CDs and a CD could be purchased by millions. Under those

[google-appengine] Re: Entities question

2009-01-16 Thread Chen Harel
Bill if I use an ownership model, How do you fetch all the cds of a user? you select on Ownership, then get the tuples with user id / cd id Now you need to fetch many cd id from the CD entity.. So what's the difference? If you store them as a list of IDs in the User, you still have to go over the