java - Is it good practice to Store Age of a Person in Google App Engine? -


i need search through thousands of records of type 'person' , fetch ones, say: age between 25 , 30. practice if store age @ write time , run scheduler update age on every persons bday. scheduler runs everday person having birthday day. know wrong relational database. experienced in gae/j guide me on this.

my proposal might bit off topic, make job simpler.

having non-normalized db schema might make sense use case. believe can achieve without background job.

i'd store dates integers in db:

  • for example 2011-01-01 store: 20110101
  • ...

afterwards you'd between this:

  • let's today 20130810 , search 1 year old people:
    • so you'd end like: between (20110811, 20120810)

the problem you'd between each time search (so no database index involved), if search age intervals anyway, should not hurt queries skip indexes anyway


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -