SQLite: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
m Created page with 'I am using SQLite for a web + Android app that will track and map my MPGs. Schema id key date datetime odometer decimal(7,1) mileage decimal(5,1) distance traveled since la…'
 
Brian Wilson (talk | contribs)
mNo edit summary
Line 1: Line 1:
I am using SQLite for a web + Android app that will track and map my MPGs.
I am using SQLite for a web + Android app that will track and map my MPGs.


Schema
== Schema ==
=== log ===
  id key
  id key
  date datetime
  date datetime
Line 12: Line 13:
  lon text
  lon text
  comment text ex: gas station name and address
  comment text ex: gas station name and address
=== journal ===
id key
date datetime
odometer decimal(7,1)
weight int(11)
comment text
=== trip ===
id key
date datetime
start decimal(7,1)
stop decimal(7,1)
comment text
== Reports ==


Calculated
Calculated
  mpg
  mpg
  average mpg
  average mpg

Revision as of 03:31, 24 December 2012

I am using SQLite for a web + Android app that will track and map my MPGs.

Schema

log

id key
date datetime
odometer decimal(7,1) 
mileage decimal(5,1) distance traveled since last fillup
gallons decimal(5,3)
price decimal(6,3) price per gallon
cost decimal(6,2) total purchase
lat text
lon text
comment text ex: gas station name and address

journal

id key
date datetime
odometer decimal(7,1) 
weight int(11)
comment text

trip

id key
date datetime
start decimal(7,1)
stop decimal(7,1)
comment text

Reports

Calculated

mpg
average mpg