I have a three models for images:
class SMALLAVATARS(db.Model,):
author = db.UserProperty()
phrase = db.ReferenceProperty(PHRASES)
file = db.BlobProperty(default=None)
creationDate = db.DateTimeProperty(auto_now_add=True)
editDate = db.DateTimeProperty(auto_now=True)
class MEDIUMAVATARS(db.Model,):
author = db.UserProperty()
phrase = db.ReferenceProperty(PHRASES)
file = db.BlobProperty(default=None)
creationDate = db.DateTimeProperty(auto_now_add=True)
editDate = db.DateTimeProperty(auto_now=True)
class LARGEAVATARS(db.Model,):
author = db.UserProperty()
phrase = db.ReferenceProperty(PHRASES)
file = db.BlobProperty(default=None)
creationDate = db.DateTimeProperty(auto_now_add=True)
editDate = db.DateTimeProperty(auto_now=True)
Is this optimal or would using a single model such as:
class AVATARS(db.Model,):
author = db.UserProperty()
phrase = db.ReferenceProperty(PHRASES)
small = db.BlobProperty(default=None)
medium = db.BlobProperty(default=None)
large = db.BlobProperty(default=None)
creationDate = db.DateTimeProperty(auto_now_add=True)
editDate = db.DateTimeProperty(auto_now=True)
be better?
Obviously the later is nice and simple, but I'm concerned that when I
go to actually get the entity in question I will unnecessarily eat up
more system resources if I only need one of the three images?
As always, input is greatly appreciated!
-Larkin
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---