SQL FUNDAMENTALS FOR R USERS > MISSION 5 > RSQLITE

Querying SQLite from R

In our Querying SQLite from R mission, you’ll learn how to query a SQLite database using the DBI and RSQLite packages. 

Being able to write SQL queries using R can be quite beneficial. Otherwise, you would find yourself writing code in R, exporting data from R, importing that in a separate program you have that can query data, saving that data, and importing it back into R. That would be, needless to say, a cumbersome process! 

In this mission, you will learn how to avoid that process by writing queries for a SQLite database from within R using the DBI and RSQLite packages. As you progress through the mission, you will get familiar with connecting to SQLite databases and build experience with the SQL query workflow.

Throughout this mission, you’ll also continue your analysis of the 2010-2012 college grade data to give you practice using SQL to solve real-world data science problems. 

Objectives

  • How to run SQL queries using RSQLite in R.

Mission Outline

1. Overview
2. Introduction to the Data
3. Connecting to the Database
4. Running Queries With Our Connection
5. Limitations of dbGetQuery()
6. Cleaning Up After Ourselves
7. Using the Whole Workflow
8. Wrapping Up The Connection
9. Next Steps
10. Takeaways

sql-fundamentals

Course Info:

Beginner

The median completion time for this course is 3.5 hours. ​View Details​​​

This course requires a basic subscription and includes four missions and one guided project.  It is the fifth course in the ​Data Analyst in R Path​​​

START LEARNING FREE

Take a Look Inside