300 likes | 418 Views
TRIG Training Session Sept. 13, 2006 David Waetjen dwaetjen@ucdavis.edu Information Center for the Environment (ICE) UCDavis. Truckee River Information Gateway. Outline. TRIG Website Overview Drupal Content Management System SODA and MySQL Q & A + Brainstorming. Outline: TRIG Website.
E N D
TRIG Training Session Sept. 13, 2006 David Waetjen dwaetjen@ucdavis.edu Information Center for the Environment (ICE) UCDavis Truckee River Information Gateway
Outline • TRIG Website Overview • Drupal Content Management System • SODA and MySQL • Q & A + Brainstorming
Outline: TRIG Website • TRIG Website Overview • Community Site – We can all contribute • Tools Used • News Aggregator and RSS feeds • (Semantic) Online Data Access • Project Overview • Resources Overview
Outline: Drupal • Drupal Content Management System • Sign up for Account • HTML Basics • How to Add a Report - making good URL's • How to Add Bibliography Record • Adding Images • Adding other Content
Outline: SODA and MySQL • SODA and MySQL • phpMyAdmin • SODA Architecture • Metadata
SODA Database Types CREATE TABLE `soda_db_types` ( `db_type_cd` varchar(8) NOT NULL default '', `db_name` varchar(64) NOT NULL default '', `description` text, `website_url` varchar(128) default NULL, PRIMARY KEY (`db_type_cd`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='ADOdb supported databases'; INSERT INTO `soda_db_types` (`db_type_cd`, `db_name`, `description`, `website_url`) VALUES ('mysql', 'MySQL', 'Without transaction support.', NULL), ('postgres', 'PostgreSQL', 'Generic postgresql support.', NULL); (ADOdb also supports Oracle, DB2, MSSQL, Sybase, Informix, Access, and others).
SODA Database CREATE TABLE `soda_db` ( `dbid` int(11) NOT NULL auto_increment, `username` varchar(64) NOT NULL default '', `passwd` varchar(64) NOT NULL default '', `dbname` varchar(64) NOT NULL default '', `hostname` varchar(128) NOT NULL default '', `db_type_cd` varchar(8) NOT NULL default '', `dsn` varchar(255) NOT NULL, `source_name` varchar(64) NOT NULL, `tablename` varchar(128) NOT NULL, `drupal_uid` int(11) NOT NULL default '0', `description` text, PRIMARY KEY (`dbid`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='hold database information';
SODA Primitive CREATE TABLE `soda_primitive` ( `pid` int(11) NOT NULL, `col_head` varchar(32) NOT NULL, `name` varchar(255) NOT NULL, `data_type` varchar(64) NOT NULL default 'text', `units` varchar(32) default NULL, `units_html` varchar(64) default NULL, `theory_low` varchar(32) NOT NULL default '', `theory_high` varchar(32) NOT NULL default '', `description` text, PRIMARY KEY (`pid`), UNIQUE KEY `col_head` (`col_head`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='SODA primitive values';
{data source} SODA Station CREATE TABLE `{data_source}_station` ( `sid` int(11) NOT NULL auto_increment, `station_code` varchar(128) NOT NULL, `station_name` varchar(255) NOT NULL, `start_date` datetime default NULL, `end_date` datetime default NULL, `latitude` varchar(128) default NULL, `longitude` varchar(128) default NULL, `datum` varchar(8) NOT NULL default 'NAD83', `description` text, PRIMARY KEY (`sid`), UNIQUE KEY `station_code` (`station_code`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
{data source} SODA Data CREATE TABLE `{data_source}` ( `eid` int(11) NOT NULL auto_increment, `sid` int(11) NOT NULL, `pid` int(11) NOT NULL, `date_time` datetime NOT NULL, `year` smallint(6) NOT NULL, `month` tinyint(4) NOT NULL, `day` tinyint(4) NOT NULL, `hour` tinyint(4) default NULL, `minute` tinyint(4) default NULL, `second` tinyint(4) default NULL, `qualifier` varchar(255) default NULL, `value_int` int(11) default NULL, `value_float` float default NULL, `value_txt` varchar(255) default NULL, `value_longtxt` text, PRIMARY KEY (`eid`), KEY `sid` (`sid`), KEY `pid` (`pid`), KEY `date_time` (`date_time`), UNIQUE KEY `event` (`sid`,`pid`,`date_time`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Outline: Q & (hopefully) A • Q & A • Brainstorming