SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Light, Open Source RDBMS
SQLite
Tanner Jessel
Spring 2014
IS 592 - Big Data Analytics
School of Information Sciences
College of Communication & Information
• Big Data in a Little
Package
– Portable, No Server
– Writes directly to
common media
– Cross-platform (Mac,
Windows, Linux)
What is SQLite?
• Portable
– Small Gadgets (Windows
Phone, Android, iOS)
• (500 KB, 300 KB)
• Embeddable
– Computer Applications
(Chrome, Firefox, Skype)
• Single file database
– Triggers
– Tables
– Indices
– Views
What is SQLite?
• Not a full database
application
– No forms
– No reports
– No saved queries
What it is not…
*Free*
• No Server (no mess)
• Command Line Interface
• GUI Interface
• Works with R
• Works with Python
• Good for students to learn advanced SQL
queries, command line interaction
• Good for small database projects
Why should you be interested?
Alter, analyze, attatch, begin, commit, create (table, trigger, view, virtual
table), delete, select, insert…
SQLite Query Language
“Mostly” SQL
“Database Interface R driver for SQLite. This
package embeds the SQLite database engine in
R and provides an interface compliant with the
DBI package. The source for the SQLite engine
(version 3.7.17) is included.”
–Comprehensive R Archive Network (CRAN)
http://cran.r-project.org/web/packages/RSQLite/
RSQLite
Sqlite3
http://www.sqlite.org/cli.html
Command Line Shell
$ sqlite3 myexampledb
SQLite version 3.8.4 2014-02-11 16:24:34
Enter ".help" for usage hints.
sqlite> CREATE table tbl1(one varchar(10), two
smallint);
sqlite> INSERT into tbl1 values('hello!',10);
sqlite> INSERT into tbl1 values('goodbye', 20);
sqlite> SELECT * from tbl1;
hello!|10
goodbye|20
sqlite>
*Free*
• Feature Rich GUI
• Cross-platform
– Windows
– Mac
– Linux
– Solaris
• http://sqlitestudio.pl/
SQLite Studio
• Rstudio Console
> install.packages("RSQLite")
> library(RSQLite)
> dbDIR <- "/Users/apple/Documents/IS592-Big-
Data-Analytics/SQLite-Presentation"
> dbFileName <-
paste(dbDIR,"classHOBOData2013.db3", sep="/")
>drv <- dbDriver("SQLite”)
>con <- dbConnect(drv, dbname = dbFileName)
Connect to Data
• Rstudio Console
> allDf <- dbGetQuery(con, "select * from
HoboTable ")
>View(allDf)
Load Data to Frame
Pendant monitor data from SQLite database in data frame
SQLite Table Data in R Studio
15,186 rows
>summary(allDf)
obsNum serialNo recNo dateTime temperatureC
Min. : 1 Length:15186 Min. : 1.0 Length:15186 Min. :14.42
1st Qu.: 3797 Class :character 1st Qu.: 422.0 Class :character 1st Qu.:23.58
Median : 7594 Mode :character Median : 844.0 Mode :character Median
:23.87
Mean : 7594 Mean : 844.5 Mean :26.43
3rd Qu.:11390 3rd Qu.:1266.0 3rd Qu.:25.12
Max. :15186 Max. :1722.0 Max. :59.81
intensityLight
Min. : 0.0
1st Qu.: 0.0
Median : 10.8
Mean : 2524.8
3rd Qu.: 21.5
Max. :231468.2
Pendant monitor data from SQLite database in plot
>plot(allDf$temperatureC)
Temperature Data
• Rstudio Console
> temperatureF <- (allDf$temperatureC *
(9/5.0))+32.0
Transformation C to F
• Rstudio Console
> temperatureF <- (allDf$temperatureC *
(9/5.0))+32.0
> newDf <- cbind(allDf,temperatureF)
> dbWriteTable(con, "newTable", newDf)
Update Data Frame
Pendant data .db3 file now has two tables
SQLite Table Data Modified by R
15,186 rows, new TemperatureF column added
>view(hotDf)
serialNo dateTime temperatureC
1 10081427 2013-06-04 12:32:30 37.824
2 10081427 2013-06-04 12:32:40 37.935
3 10081427 2013-06-04 12:32:50 37.935
4 10081427 2013-06-04 12:33:00 37.935
5 10081427 2013-06-04 12:33:10 38.046
6 10081427 2013-06-04 12:33:20 38.046
7 10081427 2013-06-04 12:33:30 38.490
8 10081427 2013-06-04 12:33:40 38.490
9 10081427 2013-06-04 12:33:50 38.602
10 10081427 2013-06-04 12:34:00 38.602
Quality Assurance / Control
• Import SQLite3
import sqlite3
conn=sqlite3.connect('/Users/apple/D
ocuments/IS592-Big-Data-
Analytics/SQLite-
Presentation/classHOBOData2013.db
3')
c=conn.cursor()
Quality Assurance / Control
• Find, list “errors”
• Whatever you define
them to be
• > 100 F in Antarctica,
for example
c.execute('SELECT
obsNum,serialNo,temperatureF
FROM newTable 
WHERE temperatureF > 100 OR
temperatureF < 10')
Quality Assurance / Control
• Check for Errors
• Nice printed
messsage with your
selected “errors”
• python
QAQCdemo.py
#Fetch all the query results
myListOfNames=c.fetchall()
# print them out
print
print("Range Errors for
Temperature:")
for myTuple in myListOfNames:
print("obsNum:
"+str(myTuple[0])+" SerialNo:
"+str(myTuple[1])+" Temperature:
"+str(myTuple[2]))
conn.commit()
conn.close()
'SELECT obsNum,serialNo,temperatureF FROM newTable
WHERE temperatureF > 100 OR temperatureF < 10'
>100 F: SQLite/Python QAQC
1,538 records where the temperature was over 100 F
Access SQLite
Convert Access to SQLite
Further reading
http://www.sqlite.org/books.html
Questions?
@mountainsol
http://www.slideshare.net/mountainsol/sqlite

Weitere ähnliche Inhalte

Was ist angesagt?

A brief introduction to SQLite PPT
A brief introduction to SQLite PPTA brief introduction to SQLite PPT
A brief introduction to SQLite PPTJavaTpoint
 
android sqlite
android sqliteandroid sqlite
android sqliteDeepa Rani
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012sqlserver.co.il
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum versionsqlserver.co.il
 
Persitance Data with sqlite
Persitance Data with sqlitePersitance Data with sqlite
Persitance Data with sqliteArif Huda
 
Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Khaled Anaqwa
 
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAGeek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAIDERA Software
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101IDERA Software
 
Using sqlite database in android with sqlite manager browser add ons
Using sqlite database in android with sqlite manager browser add onsUsing sqlite database in android with sqlite manager browser add ons
Using sqlite database in android with sqlite manager browser add onsVincent Clyde
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and dockerBob Ward
 
Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsEdwin M Sarmiento
 
01 upgrade to my sql8
01 upgrade to my sql8 01 upgrade to my sql8
01 upgrade to my sql8 Ted Wennmark
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceEdwin M Sarmiento
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialAssistSoftware
 

Was ist angesagt? (20)

A brief introduction to SQLite PPT
A brief introduction to SQLite PPTA brief introduction to SQLite PPT
A brief introduction to SQLite PPT
 
Getting Started with SQLite
Getting Started with SQLiteGetting Started with SQLite
Getting Started with SQLite
 
SQLite database in android
SQLite database in androidSQLite database in android
SQLite database in android
 
android sqlite
android sqliteandroid sqlite
android sqlite
 
Database
DatabaseDatabase
Database
 
Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012Adi Sapir ISUG 123 11/10/2012
Adi Sapir ISUG 123 11/10/2012
 
Products.intro.forum version
Products.intro.forum versionProducts.intro.forum version
Products.intro.forum version
 
SQL server Backup Restore Revealed
SQL server Backup Restore RevealedSQL server Backup Restore Revealed
SQL server Backup Restore Revealed
 
Persitance Data with sqlite
Persitance Data with sqlitePersitance Data with sqlite
Persitance Data with sqlite
 
Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)Android Training (Storing data using SQLite)
Android Training (Storing data using SQLite)
 
Play 2.0
Play 2.0Play 2.0
Play 2.0
 
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERAGeek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
Geek Sync | Data Integrity Demystified - Deborah Melkin | IDERA
 
Mysql
MysqlMysql
Mysql
 
Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101Geek Sync | SQL Security Principals and Permissions 101
Geek Sync | SQL Security Principals and Permissions 101
 
Using sqlite database in android with sqlite manager browser add ons
Using sqlite database in android with sqlite manager browser add onsUsing sqlite database in android with sqlite manager browser add ons
Using sqlite database in android with sqlite manager browser add ons
 
Experience sql server on l inux and docker
Experience sql server on l inux and dockerExperience sql server on l inux and docker
Experience sql server on l inux and docker
 
Fundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groupsFundamentals of SQL Server 2012 Availability groups
Fundamentals of SQL Server 2012 Availability groups
 
01 upgrade to my sql8
01 upgrade to my sql8 01 upgrade to my sql8
01 upgrade to my sql8
 
Database Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 PerformanceDatabase Configuration for Maximum SharePoint 2010 Performance
Database Configuration for Maximum SharePoint 2010 Performance
 
How to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework TutorialHow to Play at Work - A Play Framework Tutorial
How to Play at Work - A Play Framework Tutorial
 

Andere mochten auch

Andere mochten auch (20)

Sqlite
SqliteSqlite
Sqlite
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
SQLite
SQLiteSQLite
SQLite
 
Aula 06 - TEP - Introdução SQLite
Aula 06 - TEP - Introdução SQLiteAula 06 - TEP - Introdução SQLite
Aula 06 - TEP - Introdução SQLite
 
Python sqlite3
Python sqlite3Python sqlite3
Python sqlite3
 
SQLite
SQLiteSQLite
SQLite
 
SQLite
SQLiteSQLite
SQLite
 
09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)09.1. Android - Local Database (Sqlite)
09.1. Android - Local Database (Sqlite)
 
SQLite in Adobe AIR
SQLite in Adobe AIRSQLite in Adobe AIR
SQLite in Adobe AIR
 
Gestores de base de datos
Gestores de base de datosGestores de base de datos
Gestores de base de datos
 
Access ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-FrontendsAccess ohne Access: Freie Datenbank-Frontends
Access ohne Access: Freie Datenbank-Frontends
 
Sqlite Base de Datos
Sqlite Base de Datos Sqlite Base de Datos
Sqlite Base de Datos
 
Sqlite
SqliteSqlite
Sqlite
 
Sq lite
Sq liteSq lite
Sq lite
 
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
 
Advance sqlite3
Advance sqlite3Advance sqlite3
Advance sqlite3
 
(140625) #fitalk sq lite 소개와 구조 분석
(140625) #fitalk   sq lite 소개와 구조 분석(140625) #fitalk   sq lite 소개와 구조 분석
(140625) #fitalk sq lite 소개와 구조 분석
 
Sqlite
SqliteSqlite
Sqlite
 
In01 - Programmation Android - 05 - Google map
In01 - Programmation Android - 05 - Google mapIn01 - Programmation Android - 05 - Google map
In01 - Programmation Android - 05 - Google map
 
In01 - Programmation Android - 03 - HMI
In01 - Programmation Android - 03 - HMIIn01 - Programmation Android - 03 - HMI
In01 - Programmation Android - 03 - HMI
 

Ähnlich wie SQLite: Light, Open Source Relational Database Management System

Experience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data PlatformExperience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data PlatformBob Ward
 
Jump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksJump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksAnyscale
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBob Ward
 
Everything comes in 3's
Everything comes in 3'sEverything comes in 3's
Everything comes in 3'sdelagoya
 
PASS Summit - SQL Server 2017 Deep Dive
PASS Summit - SQL Server 2017 Deep DivePASS Summit - SQL Server 2017 Deep Dive
PASS Summit - SQL Server 2017 Deep DiveTravis Wright
 
Unified Big Data Processing with Apache Spark
Unified Big Data Processing with Apache SparkUnified Big Data Processing with Apache Spark
Unified Big Data Processing with Apache SparkC4Media
 
Spark to DocumentDB connector
Spark to DocumentDB connectorSpark to DocumentDB connector
Spark to DocumentDB connectorDenny Lee
 
Scylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScyllaDB
 
Ray and Its Growing Ecosystem
Ray and Its Growing EcosystemRay and Its Growing Ecosystem
Ray and Its Growing EcosystemDatabricks
 
NewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACIDNewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACIDTony Rogerson
 
Speed up R with parallel programming in the Cloud
Speed up R with parallel programming in the CloudSpeed up R with parallel programming in the Cloud
Speed up R with parallel programming in the CloudRevolution Analytics
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Serban Tanasa
 
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Amazon Web Services
 
Oracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodOracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodLudovico Caldara
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...Bob Ward
 
ETL with SPARK - First Spark London meetup
ETL with SPARK - First Spark London meetupETL with SPARK - First Spark London meetup
ETL with SPARK - First Spark London meetupRafal Kwasny
 
Spca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingSpca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingNCCOMMS
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)Paul Chao
 
20150716 introduction to apache spark v3
20150716 introduction to apache spark v3 20150716 introduction to apache spark v3
20150716 introduction to apache spark v3 Andrey Vykhodtsev
 
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...Artificial Intelligence Institute at UofSC
 

Ähnlich wie SQLite: Light, Open Source Relational Database Management System (20)

Experience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data PlatformExperience SQL Server 2017: The Modern Data Platform
Experience SQL Server 2017: The Modern Data Platform
 
Jump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with DatabricksJump Start on Apache Spark 2.2 with Databricks
Jump Start on Apache Spark 2.2 with Databricks
 
Brk2051 sql server on linux and docker
Brk2051 sql server on linux and dockerBrk2051 sql server on linux and docker
Brk2051 sql server on linux and docker
 
Everything comes in 3's
Everything comes in 3'sEverything comes in 3's
Everything comes in 3's
 
PASS Summit - SQL Server 2017 Deep Dive
PASS Summit - SQL Server 2017 Deep DivePASS Summit - SQL Server 2017 Deep Dive
PASS Summit - SQL Server 2017 Deep Dive
 
Unified Big Data Processing with Apache Spark
Unified Big Data Processing with Apache SparkUnified Big Data Processing with Apache Spark
Unified Big Data Processing with Apache Spark
 
Spark to DocumentDB connector
Spark to DocumentDB connectorSpark to DocumentDB connector
Spark to DocumentDB connector
 
Scylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDSScylla Summit 2016: Scylla at Samsung SDS
Scylla Summit 2016: Scylla at Samsung SDS
 
Ray and Its Growing Ecosystem
Ray and Its Growing EcosystemRay and Its Growing Ecosystem
Ray and Its Growing Ecosystem
 
NewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACIDNewSQL - Deliverance from BASE and back to SQL and ACID
NewSQL - Deliverance from BASE and back to SQL and ACID
 
Speed up R with parallel programming in the Cloud
Speed up R with parallel programming in the CloudSpeed up R with parallel programming in the Cloud
Speed up R with parallel programming in the Cloud
 
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
Get up to Speed (Quick Guide to data.table in R and Pentaho PDI)
 
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
Empowering Congress with Data-Driven Analytics (BDT304) | AWS re:Invent 2013
 
Oracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodOracle Client Failover - Under The Hood
Oracle Client Failover - Under The Hood
 
Brk3288 sql server v.next with support on linux, windows and containers was...
Brk3288 sql server v.next with support on linux, windows and containers   was...Brk3288 sql server v.next with support on linux, windows and containers   was...
Brk3288 sql server v.next with support on linux, windows and containers was...
 
ETL with SPARK - First Spark London meetup
ETL with SPARK - First Spark London meetupETL with SPARK - First Spark London meetup
ETL with SPARK - First Spark London meetup
 
Spca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessingSpca2014 advanced share point troubleshooting hessing
Spca2014 advanced share point troubleshooting hessing
 
AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)AI與大數據數據處理 Spark實戰(20171216)
AI與大數據數據處理 Spark實戰(20171216)
 
20150716 introduction to apache spark v3
20150716 introduction to apache spark v3 20150716 introduction to apache spark v3
20150716 introduction to apache spark v3
 
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...
Scalable, Pluggable, and Fault Tolerant Multi-Modal Situational Awareness Dat...
 

Mehr von Tanner Jessel

Hemlock Forest Change in Great Smoky Mountains National Park
Hemlock Forest Change in Great Smoky Mountains National ParkHemlock Forest Change in Great Smoky Mountains National Park
Hemlock Forest Change in Great Smoky Mountains National ParkTanner Jessel
 
Natural Resources Inventory & Monitoring: Marketing Service Offerings
Natural Resources Inventory & Monitoring: Marketing Service OfferingsNatural Resources Inventory & Monitoring: Marketing Service Offerings
Natural Resources Inventory & Monitoring: Marketing Service OfferingsTanner Jessel
 
Profile of an Industry: Research Data Services
Profile of an Industry: Research Data ServicesProfile of an Industry: Research Data Services
Profile of an Industry: Research Data ServicesTanner Jessel
 
Big Data in Ecology: Volume, Variety, and Velocity in Environmental Data
Big Data in Ecology: Volume, Variety, and Velocity in Environmental DataBig Data in Ecology: Volume, Variety, and Velocity in Environmental Data
Big Data in Ecology: Volume, Variety, and Velocity in Environmental DataTanner Jessel
 
Geocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsGeocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsTanner Jessel
 
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...Tanner Jessel
 
TVA Kingston Ash Pond Failure Photo Slide Show
TVA Kingston Ash Pond Failure Photo Slide ShowTVA Kingston Ash Pond Failure Photo Slide Show
TVA Kingston Ash Pond Failure Photo Slide ShowTanner Jessel
 

Mehr von Tanner Jessel (7)

Hemlock Forest Change in Great Smoky Mountains National Park
Hemlock Forest Change in Great Smoky Mountains National ParkHemlock Forest Change in Great Smoky Mountains National Park
Hemlock Forest Change in Great Smoky Mountains National Park
 
Natural Resources Inventory & Monitoring: Marketing Service Offerings
Natural Resources Inventory & Monitoring: Marketing Service OfferingsNatural Resources Inventory & Monitoring: Marketing Service Offerings
Natural Resources Inventory & Monitoring: Marketing Service Offerings
 
Profile of an Industry: Research Data Services
Profile of an Industry: Research Data ServicesProfile of an Industry: Research Data Services
Profile of an Industry: Research Data Services
 
Big Data in Ecology: Volume, Variety, and Velocity in Environmental Data
Big Data in Ecology: Volume, Variety, and Velocity in Environmental DataBig Data in Ecology: Volume, Variety, and Velocity in Environmental Data
Big Data in Ecology: Volume, Variety, and Velocity in Environmental Data
 
Geocoding in Geographic Information Systems
Geocoding in Geographic Information SystemsGeocoding in Geographic Information Systems
Geocoding in Geographic Information Systems
 
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...
ATBI Mapping Program: Species Distribution Models for Great Smoky Mountains N...
 
TVA Kingston Ash Pond Failure Photo Slide Show
TVA Kingston Ash Pond Failure Photo Slide ShowTVA Kingston Ash Pond Failure Photo Slide Show
TVA Kingston Ash Pond Failure Photo Slide Show
 

Kürzlich hochgeladen

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 

SQLite: Light, Open Source Relational Database Management System

  • 1. Light, Open Source RDBMS SQLite Tanner Jessel Spring 2014 IS 592 - Big Data Analytics School of Information Sciences College of Communication & Information
  • 2. • Big Data in a Little Package – Portable, No Server – Writes directly to common media – Cross-platform (Mac, Windows, Linux) What is SQLite?
  • 3. • Portable – Small Gadgets (Windows Phone, Android, iOS) • (500 KB, 300 KB) • Embeddable – Computer Applications (Chrome, Firefox, Skype) • Single file database – Triggers – Tables – Indices – Views What is SQLite?
  • 4. • Not a full database application – No forms – No reports – No saved queries What it is not…
  • 5. *Free* • No Server (no mess) • Command Line Interface • GUI Interface • Works with R • Works with Python • Good for students to learn advanced SQL queries, command line interaction • Good for small database projects Why should you be interested?
  • 6. Alter, analyze, attatch, begin, commit, create (table, trigger, view, virtual table), delete, select, insert… SQLite Query Language “Mostly” SQL
  • 7. “Database Interface R driver for SQLite. This package embeds the SQLite database engine in R and provides an interface compliant with the DBI package. The source for the SQLite engine (version 3.7.17) is included.” –Comprehensive R Archive Network (CRAN) http://cran.r-project.org/web/packages/RSQLite/ RSQLite
  • 8. Sqlite3 http://www.sqlite.org/cli.html Command Line Shell $ sqlite3 myexampledb SQLite version 3.8.4 2014-02-11 16:24:34 Enter ".help" for usage hints. sqlite> CREATE table tbl1(one varchar(10), two smallint); sqlite> INSERT into tbl1 values('hello!',10); sqlite> INSERT into tbl1 values('goodbye', 20); sqlite> SELECT * from tbl1; hello!|10 goodbye|20 sqlite>
  • 9. *Free* • Feature Rich GUI • Cross-platform – Windows – Mac – Linux – Solaris • http://sqlitestudio.pl/ SQLite Studio
  • 10. • Rstudio Console > install.packages("RSQLite") > library(RSQLite) > dbDIR <- "/Users/apple/Documents/IS592-Big- Data-Analytics/SQLite-Presentation" > dbFileName <- paste(dbDIR,"classHOBOData2013.db3", sep="/") >drv <- dbDriver("SQLite”) >con <- dbConnect(drv, dbname = dbFileName) Connect to Data
  • 11. • Rstudio Console > allDf <- dbGetQuery(con, "select * from HoboTable ") >View(allDf) Load Data to Frame
  • 12. Pendant monitor data from SQLite database in data frame SQLite Table Data in R Studio 15,186 rows
  • 13. >summary(allDf) obsNum serialNo recNo dateTime temperatureC Min. : 1 Length:15186 Min. : 1.0 Length:15186 Min. :14.42 1st Qu.: 3797 Class :character 1st Qu.: 422.0 Class :character 1st Qu.:23.58 Median : 7594 Mode :character Median : 844.0 Mode :character Median :23.87 Mean : 7594 Mean : 844.5 Mean :26.43 3rd Qu.:11390 3rd Qu.:1266.0 3rd Qu.:25.12 Max. :15186 Max. :1722.0 Max. :59.81 intensityLight Min. : 0.0 1st Qu.: 0.0 Median : 10.8 Mean : 2524.8 3rd Qu.: 21.5 Max. :231468.2
  • 14. Pendant monitor data from SQLite database in plot >plot(allDf$temperatureC) Temperature Data
  • 15. • Rstudio Console > temperatureF <- (allDf$temperatureC * (9/5.0))+32.0 Transformation C to F
  • 16. • Rstudio Console > temperatureF <- (allDf$temperatureC * (9/5.0))+32.0 > newDf <- cbind(allDf,temperatureF) > dbWriteTable(con, "newTable", newDf) Update Data Frame
  • 17. Pendant data .db3 file now has two tables SQLite Table Data Modified by R 15,186 rows, new TemperatureF column added
  • 18. >view(hotDf) serialNo dateTime temperatureC 1 10081427 2013-06-04 12:32:30 37.824 2 10081427 2013-06-04 12:32:40 37.935 3 10081427 2013-06-04 12:32:50 37.935 4 10081427 2013-06-04 12:33:00 37.935 5 10081427 2013-06-04 12:33:10 38.046 6 10081427 2013-06-04 12:33:20 38.046 7 10081427 2013-06-04 12:33:30 38.490 8 10081427 2013-06-04 12:33:40 38.490 9 10081427 2013-06-04 12:33:50 38.602 10 10081427 2013-06-04 12:34:00 38.602
  • 19. Quality Assurance / Control • Import SQLite3 import sqlite3 conn=sqlite3.connect('/Users/apple/D ocuments/IS592-Big-Data- Analytics/SQLite- Presentation/classHOBOData2013.db 3') c=conn.cursor()
  • 20. Quality Assurance / Control • Find, list “errors” • Whatever you define them to be • > 100 F in Antarctica, for example c.execute('SELECT obsNum,serialNo,temperatureF FROM newTable WHERE temperatureF > 100 OR temperatureF < 10')
  • 21. Quality Assurance / Control • Check for Errors • Nice printed messsage with your selected “errors” • python QAQCdemo.py #Fetch all the query results myListOfNames=c.fetchall() # print them out print print("Range Errors for Temperature:") for myTuple in myListOfNames: print("obsNum: "+str(myTuple[0])+" SerialNo: "+str(myTuple[1])+" Temperature: "+str(myTuple[2])) conn.commit() conn.close()
  • 22. 'SELECT obsNum,serialNo,temperatureF FROM newTable WHERE temperatureF > 100 OR temperatureF < 10' >100 F: SQLite/Python QAQC 1,538 records where the temperature was over 100 F