From his presentation at the Greater Boston useR Group[*], R user Jeffrey Breen has shared some useful slides detailing how to bring data from relational databases like MySQL and Oracle. In fact, data from just about any relational database is accessible from R by sending an SQL query to the standard ODBC or JDBC interfaces. R packages also offer other handy tricks, like being able to loop R code over the elements of a SQL result set. Even if you aren't using a relational database, you can still perform SQL queries on R data directly. Check out Jeff's slides at the link below, especially slide 10 which includes links to many useful database-access resources for R.
Greater Boston useR Group: useR Vignette – Accessing Databases from R – 20110504 (Jeffrey Breen)
[*] Proudly sponsored by Revolution Analytics