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. In this recipe, we describe the steps to work with the MySQL database and build the foundation to create a recommendation...