{"id":481,"date":"2015-11-08T14:45:02","date_gmt":"2015-11-08T18:45:02","guid":{"rendered":"https:\/\/fieldscience.cs.earlham.edu\/?p=481"},"modified":"2015-11-08T14:45:02","modified_gmt":"2015-11-08T18:45:02","slug":"sqlite-db-for-data","status":"publish","type":"post","link":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/","title":{"rendered":"SQLite DB for Data."},"content":{"rendered":"<p>On Saturday, Charlie and I discussed the notion of persistent data for the Field Day android application. Previously, we would stream all of our data to a CSV &#8212; even empty lines or entries that are missing data in some spots, and this would cause data to be in a bunch of different data models.<\/p>\n<p>I recently read a chapter on SQLite databases in Android and it seems really powerful. We&#8217;ve decided that we are going to use a SQLite database instead of just writing to a CSV file. With this, we could create primary keys and easily pick out all the lines that have empty fields for one column or another. Using a SQLite database will also be useful for our plans to implement an &#8216;On-Bench&#8217; and &#8216;In-Field&#8217; option for the soil platform. There are some sensor data that you wouldn&#8217;t take in the field and would need to do later that day &#8212; like pH or organic content. Using a SQLite database, we&#8217;ll be able to simply ask for the sample ID from earlier that day and update it with the pH and Organic Content. Our data will be less messy and we&#8217;ll have less random lines of data floating around.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On Saturday, Charlie and I discussed the notion of persistent data for the Field Day android application. Previously, we would stream all of our data to a CSV &#8212; even empty lines or entries that are missing data in some &hellip; <a href=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/\">Read More<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"kt_blocks_editor_width":"","footnotes":""},"categories":[1,11],"tags":[15,27,13,14,16],"class_list":["post-481","post","type-post","status-publish","format-standard","hentry","category-kristin","category-progress-reports","tag-android","tag-application","tag-database","tag-design","tag-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SQLite DB for Data. - fieldscience @ earlham<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQLite DB for Data. - fieldscience @ earlham\" \/>\n<meta property=\"og:description\" content=\"On Saturday, Charlie and I discussed the notion of persistent data for the Field Day android application. Previously, we would stream all of our data to a CSV &#8212; even empty lines or entries that are missing data in some &hellip; Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/\" \/>\n<meta property=\"og:site_name\" content=\"fieldscience @ earlham\" \/>\n<meta property=\"article:published_time\" content=\"2015-11-08T18:45:02+00:00\" \/>\n<meta name=\"author\" content=\"Kristin Muterspaw\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kristin Muterspaw\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/\"},\"author\":{\"name\":\"Kristin Muterspaw\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\"},\"headline\":\"SQLite DB for Data.\",\"datePublished\":\"2015-11-08T18:45:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/\"},\"wordCount\":211,\"commentCount\":1,\"keywords\":[\"android\",\"application\",\"Database\",\"design\",\"development\"],\"articleSection\":[\"Kristin\",\"Progress Reports\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/\",\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/\",\"name\":\"SQLite DB for Data. - fieldscience @ earlham\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#website\"},\"datePublished\":\"2015-11-08T18:45:02+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/2015\\\/11\\\/sqlite-db-for-data\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQLite DB for Data.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#website\",\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/\",\"name\":\"fieldscience @ earlham\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/#\\\/schema\\\/person\\\/2559340425ea97e18ee79c40f3365222\",\"name\":\"Kristin Muterspaw\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g\",\"caption\":\"Kristin Muterspaw\"},\"url\":\"https:\\\/\\\/fieldscience.cs.earlham.edu\\\/index.php\\\/author\\\/kmmuterspaw\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQLite DB for Data. - fieldscience @ earlham","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/","og_locale":"en_US","og_type":"article","og_title":"SQLite DB for Data. - fieldscience @ earlham","og_description":"On Saturday, Charlie and I discussed the notion of persistent data for the Field Day android application. Previously, we would stream all of our data to a CSV &#8212; even empty lines or entries that are missing data in some &hellip; Read More","og_url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/","og_site_name":"fieldscience @ earlham","article_published_time":"2015-11-08T18:45:02+00:00","author":"Kristin Muterspaw","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kristin Muterspaw","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/#article","isPartOf":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/"},"author":{"name":"Kristin Muterspaw","@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222"},"headline":"SQLite DB for Data.","datePublished":"2015-11-08T18:45:02+00:00","mainEntityOfPage":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/"},"wordCount":211,"commentCount":1,"keywords":["android","application","Database","design","development"],"articleSection":["Kristin","Progress Reports"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/","url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/","name":"SQLite DB for Data. - fieldscience @ earlham","isPartOf":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/#website"},"datePublished":"2015-11-08T18:45:02+00:00","author":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222"},"breadcrumb":{"@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/2015\/11\/sqlite-db-for-data\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/fieldscience.cs.earlham.edu\/"},{"@type":"ListItem","position":2,"name":"SQLite DB for Data."}]},{"@type":"WebSite","@id":"https:\/\/fieldscience.cs.earlham.edu\/#website","url":"https:\/\/fieldscience.cs.earlham.edu\/","name":"fieldscience @ earlham","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fieldscience.cs.earlham.edu\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/fieldscience.cs.earlham.edu\/#\/schema\/person\/2559340425ea97e18ee79c40f3365222","name":"Kristin Muterspaw","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e7c298ecf2dd418cede9d8bbea149b1fd9aa9135a540aef28db205ac8749c8f2?s=96&d=wavatar&r=g","caption":"Kristin Muterspaw"},"url":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/author\/kmmuterspaw\/"}]}},"_links":{"self":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":1,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"predecessor-version":[{"id":482,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/posts\/481\/revisions\/482"}],"wp:attachment":[{"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fieldscience.cs.earlham.edu\/index.php\/wp-json\/wp\/v2\/tags?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}