hey, I am unsure of the "proper" or best way to structure my datastore models, so i was hoping someone could point me in the right direction:
How its done now using References: Model A (user information/login) Model B (references Model A and contains attributes of when referencing Models were last updated) Model C (references Model A and contains one other attribute) Model D (references Model A and contains one other attribute) Model E (references Model B. This is an expando model and can grow EXTREMELY large in size, i'm talking about 1GB every 3 months) Model F (references Model B. This is a daily counter for Model E, so it needs to be run in a transaction with Model E which i do not have currently) Model G (references Model C) Model H (references Model H and Model C) Model I (references Model D. This is an expando model and can also grow large but not as large as Model E. This model also contains Sums for other types of entries in this model). Model J (references Model D) My idea is to break Model I into two parts like i did for Model E and F so that the running totals are in different models. Again, these would need to be run in transactions. I am also thinking of removing the references and making Model D a group entity. I need to be able to get ALL entries of Model E for a certain Model B (no biggie with the reference) and the same is true for Model F. I think references are fine for this, but would it better to replace the references and just set Model B as an entity group? I need to have it as an entity group to run transactions from my understanding. And I can get all of Model's E and F for a certain Model B by using the ancestor() function. Also, I need to be able to get ALL of Model H for any Model C or Model G and order by date. This is why i reference the two in every Model H. Should I create Model C as an entity group and get rid of the references found in Model G and H? Or is there a way to query a reference's reference while still ordering the outcome? I guess my final question is, are my intended uses of group entities "good practice?" Should I just make my Model A one big super group entity and make it an ancestor for everything below it? I assume this would put a single user's data into one node in the data store. Would this be bad? I really could use some advice on what would save me space and get me an efficient system. My current method of referencing forces me to create a lot of indexes because I need to order by the reference AND one other attribute. Would creating group entities remove this? I apologize if my method of describing my models is confusing. I think it clearly shows the dependencies and aggregation though. --~--~---------~--~----~------------~-------~--~----~ 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-appengine@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=en -~----------~----~----~----~------~----~------~--~---