Reading data from relational databases – MySQL

You can connect to relational databases using several different approaches.

The RODBC package provides access to most relational databases through the ODBC (Open Database Connectivity) interface. The RJDBC package provides access to databases through the JDBC interface and hence needs a Java environment.

There are database packages such as ROracle, RMySQL, and so on to provide connectivity to the specific relational databases.

Each of the aforementioned options performs differently and has different requirements. You should benchmark and select the package that performs best for your specific needs. In general, RJDBC performs poorly and hence you will likely choose RODBC or your database-specific R package. ...

Get R Data Analysis Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.