Thanks Olivier. That makes good sense and works perfectly. On Dec 16, 4:27 pm, Olivier Guilyardi <[email protected]> wrote: > On 12/16/2009 05:00 PM, Neilz wrote: > > > Hi all. > > > I want to store location data in sqlite. A latitude coordinate is a > > double, with 15 point precision. As far as I can tell this corresponds > > with the 'REAL' datatype which is 8 bytes. The alternative I suppose > > would be to store it as a String, and simply convert it back into a > > double later. > > > Does it make any odds which way I go? Are there differences in storage > > capacity / efficiency? > > Both the Java double and SQLite REAL types are 64bits (8 bytes) IEEE floating > point. This is a perfect match. There's no reason to add overhead by > converting > to and back to a string, which will certainly also occupy more space on disk. > Plus with REAL, you can do arithmetic operations/comparisons in SQL. > > -- > Olivier
-- 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

