MeltDBWiki/DeveloperDocumentation/DatabaseSetup

From BRF-Software
Jump to navigation Jump to search

MeltDB Database Setup

The MeltDB data scheme has been defined using O@DBI and the GPMS. The persistent storage of the metabolomic datasets is achieved using a object-relational mapping of Perl Objects to an SQL (MySQL) database.

Fine grained user roles, rights and permissions have been defined both on the underlying database tables as well as on the application level. This makes it possible to have secured acces to experiment and analysis data. The user management can be performed using the web based access management system.

Setting up the database

Use the following GPMSDB scripts to set up a MeltDB database. (Assuming the three files MELTDB.sql, meltdb_rights and meltdb_roles are in the current directory) These files are found here: /vol/gpms-intern/var/SQL-Table-definitions/ /vol/gpms-intern/projectmanagement/share/rights_and_roles/MySQL4.x/


add_project_class.pl -c MeltDB -d 'MeltDB Metabolomics Projects'
add_datasource_type.pl -y MeltDB -s MELTDB.sql -m 'MELT::DB'
add_project.pl -p 'MeltDB_Test' -c MeltDB -d 'Metabolomics test project (H.Neuweger)' -a 'CeBiTec'
add_db.pl -H dbhost -t MySQL-4.1.8 -y MeltDB -A O2DBI2 -p MeltDB_Test -D MeltDB_Test
add_rights.pl -f meltdb_rights
add_role.pl -f meltdb_roles
add_member.pl -l 'hneuwege' -p 'MeltDB_Test' -r Developer


Refreshing the Database

The development strategy of MeltDB realizes prototype based exploration. Changes in the database design will therefore be quite common, the update of the database files can be achieved in the following way (GPMS user gpmsadmin is required):


cd /vol/gpms-intern/projectmanagement/share/exec
export INSTALLDIR=/vol/gpms-intern/projectmanagement/
. build_environment
perl del_datasource.pl -D MeltDB_Test -z
perl add_db.pl -H dbhost -t MySQL-4.1.8 -y MeltDB -A O2DBI2 -p MeltDB_Test -D MeltDB_Test
perl add_member.pl -l 'hneuwege' -p 'MeltDB_Test' -r Developer