Hi All,

I'm really new to python and databases period, so please take it easy
on me, im trying to learn.  im trying to roll my own energy monitor
and i cant really figure out how to get the number of entities in my
data store.

class PowerData(db.Model):
  date = db.DateTimeProperty(auto_now_add=True)         # timestamp
  kw = db.FloatProperty()                                                       
# current kilowatt data (0.01 scale)

my database will have more than 1000 entires in it quickly.  i want to
grab 1000 data points and send it to the google annotated timeline
display, but i know my query will be limited to 1000 results.  I want
to write a query that will return the number of entities in my
datastore, then write a function that decimates (get every Nth one)
the data based on a hop factor that will give me less than 100 data
points.

1- i have no idea how to get the full size of the datastore if its
greater than 1000 entities
2- i dont know how to grab the decimated data in a way that wont be
computationaly expensive

im not looking for handout code, just throw me a bone for something to
read up on?

is this a decent way to structure the data base?  should i change it
before i got further?

thanks,
adam

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

Reply via email to