Hi I am new to this android stuff and SQLlite etc.

I am going to log some numbers at a certain interval, and will put
them into a dynamic histogram, by dynamic i mean that there will be a
maximum number of samples in the histogram, the histogram and age
stuff should be persisted either in db or plain file.

I am thinking something like this:

DynamicHistogram
  nBins
  bin
  samples
  minValue
  maxValue
  maxAge
  nSamples
  samples

  add(x)
   if (nSamples == maxAge )
      remove old sample from bin and samples
      --nSamples
   add x to bin
   ++nSamples

my concern is, what would be the optimal way to persist this?,

I am considering a single table layet such as
[name, samples]

For simplicity, I would like the samples to be stored in a blob type
datafield, but i cannot se if this is possible.
Alternative i could have another table with the samples
Or I could simply have files with filename = name and content =
samples

my concern might be unclear by now, but put simply, what is most
effecient regarding power usage?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" 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/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to