Data Warehouse Tables Structure For Single Study Dataset Retrieval

From ICISWiki

Jump to: navigation, search

Schema of wh_datasets

MySQL Data Definition script:

DROP TABLE IF EXISTS `wh_datasets`;
CREATE TABLE `wh_datasets` (
`study` int(11) default NULL,               -- the study ID 
`dataset` int(11) default NULL,              -- dataset number (a.k.a. REPRESNO)
`maxrow` int(11) default NULL,               -- maximum number of rows for the dataset
`maxcol` int(11) default NULL,               -- maximum number of columns for the dataset
`desc`	varchar(255) default NULL              -- description of the dataset
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Schema of wh_columns

MySQL Data Definition script:

DROP TABLE IF EXISTS `wh_columns`;
CREATE TABLE `wh_columns` (
`study` int(11) default NULL,              -- the study ID
`dataset` int(11) default NULL,            -- this is the REPRESNO (representation number) 
`col` int(11) default NULL,                -- column number (1 to n)
`colname` varchar(255) default NULL,       -- column name: combination of trait name-scale name-tmethod name
`fieldid` int(11) default NULL,            -- contains the LABELID or VARIATID, depending on coltype
`coltype` char(1) default NULL,            -- "F" (factor) or "V" (variate) 
`valtype` char(1) default NULL,            -- "C" if text, "N" if numeric
`traitid` int(11) default NULL,            -- link to TRAIT table
`scaleid` int(11) default NULL,            -- link to SCALE table
`tmethid` int(11) default NULL            -- link to TMETHOD table
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Sample data (for rice):

Personal tools