Exploring a realistic postgreSQL database with R via Docker
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/ISSUE_TEMPLATE
book-src
diagrams updates files 11 and 21-29, recompile Oct 26, 2018
docs
r-database-docker Merge branch 'master' into znmeb Oct 22, 2018
screenshots
talks
.gitattributes
.gitignore Skip .bib backups Dec 30, 2018
00-basic-concepts.Rmd
01-using-this-book.Rmd
03-learning-goals-use-cases.Rmd Regularized spelling of 'Postgres' and 'postgreSQL' to 'PostgreSQL', … Jan 11, 2019
04-docker-setup-postgres-connect-with-r.Rmd
05a-docker-setup-postgres-with-dvdrental.Rmd
05b-secure-and-use-dbms-credentials-in-r.Rmd
10-environment_diagram.Rmd
11-dplyr_sql_summary_table.tsv
11a-elementary-queries.Rmd
11b-lazy-evalutation-and-downloading.Rmd
11c-dbi-and-sql.Rmd
13-sql_dplyr_joins.Rmd Reworked join section to use customer and store instead of customer and Jan 12, 2019
13-sql_joins-and-complex-queries.Rmd
15-sql_quick_start_simple_retrieval.Rmd Regularized spelling of 'Postgres' and 'postgreSQL' to 'PostgreSQL', … Jan 11, 2019
21-r-query-postgres-metadata.Rmd
22-drilling-into-db-environment.Rmd Regularized spelling of 'Postgres' and 'postgreSQL' to 'PostgreSQL', … Jan 11, 2019
71-explain-queries.Rmd
72-sql-query-steps.Rmd
73_write-to-the-database.Rmd
90-appendices-section.Rmd adding chapter link targets Jan 6, 2019
91-other-resources.Rmd Regularized spelling of 'Postgres' and 'postgreSQL' to 'PostgreSQL', … Jan 11, 2019
92-environment_diagram.Rmd
93-docker-detailed-postgres-setup-with-dvdrental.Rmd
94-SQLGuide.Rmd adding chapter link targets Jan 6, 2019
95-potential_architectures.Rmdx
95-windows-tech-details.Rmd
95a-setup-instructions.Rmd current status of the basic-concepts chapter. Jan 10, 2019
96a_dplyr_sql_summary_table.Rmd adding chapter link targets Jan 6, 2019
96b_dbi_summary_table.Rmd
96c_postgresql_authentication.Rmd adding chapter link targets Jan 6, 2019
96d_docker-concepts.Rmd
99-references.Rmd
CODE_OF_CONDUCT.md
Contributing.md
LICENSE create a LICENSE Aug 13, 2018
README.md
_21-29-drilling-into-db-environment.Rmd
_bookdown.yml
_output.yml
book.bib
book.bib.sav
build_book.R
define_postgresql_params.R
dvdrental.Dockerfile
formatted sql.eml
index.Rmd
init-dvdrental.sh
packages.bib
preamble.tex
sql-pet.Rproj newline at end on save Nov 2, 2018
style.css
xref.tsv

README.md

SQL Pet Tutorial

Table of Contents

  1. [Projects](#Project organization)

  2. Book

  3. Book

  4. Book

  5. How to contribute

  6. Code of Conduct

  7. License

Project organization

Book

  • Tutorial materials from this repo go in the R, Databases and Docker.
  • Each chapter is written so it can be executed independently (once the Docker container is built in Chapter 5). We are using a Knit-then-Merge approach so each chapter of the book can be Knitted separately.
  • The book depends on the sqlrpetr package. It can be downloaded using devtools::install_github("smithjd/sqlpetr")

Prerequisites

You will need:

  • A computer running
    • Windows (Windows 7 64-bit or late - Windows 10-Pro is recommended)
    • MacOS
    • Linux (any Linux distro that will run Docker Community Edition, R and RStudio will work)
  • Current versions of R and RStudio
  • Docker

Packages used in the book

Here are the R packages that are used in this project and are discussed in the book:

  • DBI
  • DiagrammeR
  • RPostgres
  • dbplyr
  • devtools
  • downloader
  • glue
  • here
  • knitr
  • skimr
  • tidyverse
  • sqlpetr (installs with: devtools::install_github("smithjd/sqlpetr"))
  • bookdown

How to contribute

If you'd like to contribute to this project, start by searching through the issues and pull requests to see whether someone else has already raised a similar idea or question.

If you don't see your idea listed, and you think it fits into the goals of this project, do one of the following:

  • If your contribution is minor, such as a typo fix, open a pull request.
  • If your contribution is major, such as a new learning module or a significant restructuring of current code and training material, start by opening an issue first. That way, before you do any work, other people can weigh in on the discussion to make sure that your goals are aligned with the direction of the project.

We provide more guidelines for coding style and developer's workflow in the Contributing document. The project wiki is also a good source of information for developers.

To compile the book, you need to additionally install webshot so that HTMLwidgets are displayed properly:

   install.packages("webshot")
   webshot::install_phantomjs()

Code of Conduct

If you plan to participate in the project in any way, such as a developer, reviewer, contributor, committer, or student, you are expected to follow the project's Code of Conduct. Please review those guidelines before choosing to participate in the project.

License

Software in this project is licensed under the MIT License.

How to contribute

If you'd like to contribute to this project, start by searching through the issues and pull requests to see whether someone else has already raised a similar idea or question.

If you don't see your idea listed, and you think it fits into the goals of this project, do one of the following:

  • If your contribution is minor, such as a typo fix, open a pull request.
  • If your contribution is major, such as a new learning module or a significant restructuring of current code and training material, start by opening an issue first. That way, before you do any work, other people can weigh in on the discussion to make sure that your goals are aligned with the direction of the project.

We provide more guidelines for coding style and developer's workflow in the Contributing document. The project wiki is also a good source of information for developers.

Code of Conduct

If you plan to participate in the project in any way, such as a developer, reviewer, contributor, committer, or student, you are expected to follow the project's Code of Conduct. Please review those guidelines before choosing to participate in the project.

License

Software in this project is licensed under the MIT License.