Accessing the "live" database
Relying on a direct connection to the database to access stock assessment results located on the RAM Legacy database will:
- ensure that your analyses are using the most up-to-date version of the database
- give you a thorough understanding of the database structure, its data contents and its limitations
- facilitate sharing your code and analytical contributions
- improve the reproducibility of your analyses
Adding an ODBC DSN
Setting up a DSN for the database connection establishes the details (where is the database, who is the user etc.) of the data source under a short name that will be used by and ODBC-compliant software.
To do this on your Windows machine:
Go to "Control Panel" -> "Administrative Tools" -> "Data Sources (ODBC)"
**Note: for 64 bit Windows 7 users, go to: C:\WINDOWS\SysWOW64\odbcad32.exe instead. This is a 32 bit driver and won't show up if you go through "Control Panel."
Under "User DSN" or "System DSN" (if you want the datasource to be accessible to all users on your computer), click "Add"
Select "PostgreSQL ANSI" driver (available here) and use the following login credentials:
RAM Legacy version 1.0 (production database)
Database name: srdb
A suggested name for the ODBC DSN to the production version of the RAM Legacy database is "ramlegacy".
RAM Legacy version 1.1beta (development database)
Please contact Daniel Ricard (email@example.com) for the login credentials.
Getting data from Microsoft Access
In Access, create a blank database and then choose "External Data - ODBC Database". The table relations can be re-established after the contents have been linked.
Getting data in R using the RODBC package
The RODBC package provides functionality to connect to the database, send queries and receive data from R. Getting R to do this will require 1) a properly defined and properly tested ODBC DSN to the RAM Legacy database, 2) installing the RODBC package in R and 3) using the proper login credentials to the database.
We hope to soon make additional resources about setting up R available and will also post some code examples that perform plotting and analytical tasks.
Using the RdbiPgSQL package
The RdbiPgSQL package is available from bioconductor and provide connectivity to the RAM Legacy from a Mac.