I think if you're going to be querying for the dimensoins a lot, you should have 2 tables. Since you're probably going to have the key for the entity in the Image class, get_by_key_name or equivalent funciton wouldn't be as slow as a query.
On Jan 4, 5:52 pm, trung <[email protected]> wrote: > Do you recommend using two tables or one? > > With one table, it can look something like this. > > class Image > data = blobField > width = Int > height = Int > > with two tables > > class ImageInfo > width = Int > height = Int > image = refToImage > > class Image > data = blobField > > Advantages with one table: > One query to get both the dimension and its blob. > Disadvantages > Wasting bandwidth if you're only interested in the dimension. Unless > you have a way of lazyloading the blob. > The dimension can cut into the 1MB size limit of the document. > > Advantage of two tables: > Don't have to load the blob if you only want the dimension. > The blob can use the full 1MB size limit. > Disadvantage. > Need to perform two queries if you want both the dimension and the > blob. -- 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.
