Access to the database
To access the database and the tables inside you need a username and password. They can be found at
- the internal wiki pages of the Division of Atmospheric Sciences
- ecophys group disk
If you have no access to those, send mail to atm-data(at)helsinki.fi
The database can be accessed from University network, excluding HUPNET. Use VPN from outside the university.
Whatever software you are using, you'll probably need to use SQL commands, e.g. select * from table. You can seek help from the MySQL documentation:
Matlab (Windows & Linux)
Platform-independent JDBC interface is the most straightforward way to set up database connections. Get version 5.1.48 here (select platform-independent version from dropdown menu). Install instructions for Matlab:
- Copy the JAR-file somewhere in your computer
- Locate file
- In startup.m, add line that tells Matlab the location of the JAR-file, like this:
Here is a simple Matlab function to download variables and their metadata from selected days from database 'smear'. Calling the function without input arguments returns all table and variable metadata from the database.
You can also use custom made interface. You can compile it to both Windows and Linux. Here is the Windows version compiled with Matlab2010b and Microsoft VisualC 2010 Express. Here is a bit newer version with support for win64
- Copy libmysql.dll to %matlabroot%\bin\win32 (or win64). You can get new an proper version from here
- Copy rest of the files somewhere in Matlab path
Install RMySQL package, that's all!
Other software (Windows)
You can download data using several programs like Matlab, R, Excel, Mathematica, Igor .. with the ODBC interface.
- (Ask helpdesk) Install Windows MySQL ODBC connector, latest version from here
- Configure the interface
- Control panel (- System and Security) - Administrative tools - Data Sources (ODBC) - User DSN (or System DSN) - Add...
- Select MySQL Unicode driver
- Write data source name: smear
- Write TCP/IP server: db5.csc.fi
- port 3320
- User and password see below
- Select the database: smear
- In the programs you refer to the database with the data source name. I have used the database names as data source names.
If you are using R for database access and your R installation is 32-bit you'll need 32-bit ODBC driver! Mixing 32-bit R and 64-bit driver doesn't work!
In Excel you can use
- Data - Get data from external data - From other sources - From Microsoft Query
Users of R can access the database by installing RODBC package.
Installing R packages to the default location (on WIndows computers c:\Program Files\R\R-x.y.z\library) requires admin rights.
You may, however, set up another directory where you install your packages. For instance, c:\Users\[your username]\R\packages.
Install RODBC by giving command
install.packages("RODBC", lib="c:\\Users\\[your username]\\R\\packages")
Then create somewhere (e.g. in c:\Users\[your username]\R) file "Rconfigure_default.R" with contents
## Set default directory for user installed packages
.libPaths(c("c:\\Users\\[your username]\\R\\packages", .libPaths()))
Finally edit (or create if one does not exist) the desktop shortcut to R GUI as
"C:\Program Files\R\R-x.y.z\bin\i386\Rgui.exe" R_PROFILE_USER="C:\Users\[your username]\R\Rconfigure_default.r"
One advanced tool for accessing the database is MySQL Workbench. It works without additional drivers.