R SQL Fundamentals

Intermediate
120 minutes SQL R

About This Workshop

In this workshop, we provide an introduction to using SQL to query and retrieve data from relational databases in R. First, we’ll cover what relational databases and SQL are. Then, we’ll use different packages in R to navigate relational databases using SQL.


If you are not familiar with material in R FundamentalsR Data Wrangling, and R Data Visualization, we recommend attending those workshops first.


After this workshop, you will be able to:

  1. Explain what a relational database is and why we would want to use it.
  2. Access and query a database using SQL.
  3. Use DBI and dbplyr to query data from a relational database.

This workshop does not cover the following:

  • Read and conduct basic data operations in R. These are covered in R Fundamentals.
  • Wrangle data for basic data analysis using R. These are covered in R Data Wrangling.


What You Should Know First

Prior experience with R FundamentalsR Data Wrangling, and R Data Visualization is assumed.

Software Requirements

We will use RStudio to go through the workshop materials, which requires installation of both the R language and the RStudio software. Installation instructions.

Cloud Alternative

If you do not have R installed and the materials loaded on your workshop by the time it starts, we strongly recommend using the UC Berkeley Datahub to run the materials for these lessons. Cloud options.

Get Started
Quick Info
Duration: 120 minutes
Level: Intermediate
Materials:  GitHub Repository