-- MySQL dump 10.9
--
-- Host: localhost    Database: empty
-- ------------------------------------------------------
-- Server version	4.1.21

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `t_author`
--

DROP TABLE IF EXISTS `t_author`;
CREATE TABLE `t_author` (
  `author_id` bigint(20) NOT NULL auto_increment,
  `author_name` varchar(255) NOT NULL default '',
  `author_lastname` varchar(255) default NULL,
  `author_firstname` varchar(255) default NULL,
  `author_middlename` varchar(255) default NULL,
  `author_suffix` varchar(255) default NULL,
  PRIMARY KEY  (`author_id`),
  KEY `author_name` (`author_name`(7))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_author`
--

LOCK TABLES `t_author` WRITE;
/*!40000 ALTER TABLE `t_author` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_author` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_keyword`
--

DROP TABLE IF EXISTS `t_keyword`;
CREATE TABLE `t_keyword` (
  `keyword_id` bigint(20) NOT NULL auto_increment,
  `keyword_name` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`keyword_id`),
  KEY `keyword_name` (`keyword_name`(10))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_keyword`
--

LOCK TABLES `t_keyword` WRITE;
/*!40000 ALTER TABLE `t_keyword` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_keyword` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_link`
--

DROP TABLE IF EXISTS `t_link`;
CREATE TABLE `t_link` (
  `link_id` bigint(20) NOT NULL auto_increment,
  `link_url` blob NOT NULL,
  PRIMARY KEY  (`link_id`),
  KEY `link_url` (`link_url`(16))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_link`
--

LOCK TABLES `t_link` WRITE;
/*!40000 ALTER TABLE `t_link` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_link` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_meta`
--

DROP TABLE IF EXISTS `t_meta`;
CREATE TABLE `t_meta` (
  `meta_app` varchar(20) default NULL,
  `meta_type` varchar(20) default NULL,
  `meta_version` varchar(20) default NULL,
  `meta_dbversion` smallint(6) default NULL,
  `meta_create_date` datetime default NULL,
  `meta_modify_date` datetime default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_meta`
--

LOCK TABLES `t_meta` WRITE;
/*!40000 ALTER TABLE `t_meta` DISABLE KEYS */;
INSERT INTO `t_meta` VALUES ('<package>','risx','<version>',2,UTC_TIMESTAMP,UTC_TIMESTAMP);
/*!40000 ALTER TABLE `t_meta` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_note`
--

DROP TABLE IF EXISTS `t_note`;
CREATE TABLE `t_note` (
  `note_id` bigint(20) NOT NULL auto_increment,
  `note_key` varchar(255) default NULL,
  `note_title` varchar(255) default NULL,
  `note_content` blob,
  `note_content_type` varchar(255) default NULL,
  `note_content_xmllang` varchar(255) default NULL,
  `note_user_id` bigint(20) default NULL,
  `note_date` date default NULL,
  `note_share` smallint(6) default NULL,
  PRIMARY KEY  (`note_id`),
  UNIQUE KEY `note_key` (`note_key`),
  KEY `note_title` (`note_title`),
  KEY `note_user_id` (`note_user_id`),
  KEY `note_date` (`note_date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_note`
--

LOCK TABLES `t_note` WRITE;
/*!40000 ALTER TABLE `t_note` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_note` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_periodical`
--

DROP TABLE IF EXISTS `t_periodical`;
CREATE TABLE `t_periodical` (
  `periodical_id` bigint(20) NOT NULL auto_increment,
  `periodical_name` varchar(255) NOT NULL default '',
  `periodical_abbrev` varchar(255) NOT NULL default '',
  `periodical_custabbrev1` varchar(255) NOT NULL default '',
  `periodical_custabbrev2` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`periodical_id`),
  KEY `periodical_name` (`periodical_name`(20)),
  KEY `periodical_abbrev` (`periodical_abbrev`(5)),
  KEY `periodical_custabbrev1` (`periodical_custabbrev1`(5)),
  KEY `periodical_custabbrev2` (`periodical_custabbrev2`(5))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_periodical`
--

LOCK TABLES `t_periodical` WRITE;
/*!40000 ALTER TABLE `t_periodical` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_periodical` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_refdb`
--

DROP TABLE IF EXISTS `t_refdb`;
CREATE TABLE `t_refdb` (
  `refdb_id` bigint(20) NOT NULL auto_increment,
  `refdb_citekey` varchar(255) default NULL,
  `refdb_type` varchar(6) default NULL,
  `refdb_pubyear` smallint(6) NOT NULL default '0',
  `refdb_secyear` smallint(6) NOT NULL default '0',
  `refdb_startpage` varchar(255) default NULL,
  `refdb_endpage` varchar(255) default NULL,
  `refdb_abstract` mediumblob,
  `refdb_title` blob,
  `refdb_volume` varchar(255) default NULL,
  `refdb_issue` varchar(255) default NULL,
  `refdb_booktitle` blob,
  `refdb_city` varchar(255) default NULL,
  `refdb_publisher` varchar(255) default NULL,
  `refdb_title_series` blob,
  `refdb_address` blob,
  `refdb_issn` varchar(255) default NULL,
  `refdb_pyother_info` varchar(255) default NULL,
  `refdb_secother_info` varchar(255) default NULL,
  `refdb_periodical_id` bigint(20) default NULL,
  `refdb_user1` varchar(255) default NULL,
  `refdb_user2` varchar(255) default NULL,
  `refdb_user3` varchar(255) default NULL,
  `refdb_user4` varchar(255) default NULL,
  `refdb_user5` varchar(255) default NULL,
  `refdb_misc1` varchar(255) default NULL,
  `refdb_misc2` varchar(255) default NULL,
  `refdb_misc3` varchar(255) default NULL,
  PRIMARY KEY  (`refdb_id`),
  UNIQUE KEY `refdb_citekey` (`refdb_citekey`),
  KEY `refdb_pubyear` (`refdb_pubyear`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_refdb`
--

LOCK TABLES `t_refdb` WRITE;
/*!40000 ALTER TABLE `t_refdb` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_refdb` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_user`
--

DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
  `user_id` bigint(20) NOT NULL auto_increment,
  `user_name` varchar(16) NOT NULL default '',
  PRIMARY KEY  (`user_id`),
  KEY `user_name` (`user_name`(8))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_user`
--

LOCK TABLES `t_user` WRITE;
/*!40000 ALTER TABLE `t_user` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_user` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_xauthor`
--

DROP TABLE IF EXISTS `t_xauthor`;
CREATE TABLE `t_xauthor` (
  `xauthor_id` bigint(20) NOT NULL auto_increment,
  `author_id` bigint(20) NOT NULL default '0',
  `refdb_id` bigint(20) NOT NULL default '0',
  `xauthor_type` enum('primary','secondary','tertiary') default NULL,
  `xauthor_role` varchar(64) default NULL,
  `xauthor_position` int(11) default NULL,
  PRIMARY KEY  (`xauthor_id`),
  KEY `author_id` (`author_id`),
  KEY `refdb_id` (`refdb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_xauthor`
--

LOCK TABLES `t_xauthor` WRITE;
/*!40000 ALTER TABLE `t_xauthor` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_xauthor` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_xkeyword`
--

DROP TABLE IF EXISTS `t_xkeyword`;
CREATE TABLE `t_xkeyword` (
  `xkeyword_id` bigint(20) NOT NULL auto_increment,
  `keyword_id` bigint(20) NOT NULL default '0',
  `xref_id` bigint(20) NOT NULL default '0',
  `xkeyword_type` enum('REFERENCE','NOTE') default NULL,
  PRIMARY KEY  (`xkeyword_id`),
  KEY `keyword_id` (`keyword_id`),
  KEY `xref_id` (`xref_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_xkeyword`
--

LOCK TABLES `t_xkeyword` WRITE;
/*!40000 ALTER TABLE `t_xkeyword` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_xkeyword` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_xlink`
--

DROP TABLE IF EXISTS `t_xlink`;
CREATE TABLE `t_xlink` (
  `xlink_id` bigint(20) NOT NULL auto_increment,
  `link_id` bigint(20) NOT NULL default '0',
  `xref_id` bigint(20) NOT NULL default '0',
  `xlink_type` enum('URL','PDF','FULLTEXT','RELATED','IMAGE') default NULL,
  `xlink_source` enum('REFERENCE','NOTE') default NULL,
  PRIMARY KEY  (`xlink_id`),
  KEY `link_id` (`link_id`),
  KEY `xref_id` (`xref_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_xlink`
--

LOCK TABLES `t_xlink` WRITE;
/*!40000 ALTER TABLE `t_xlink` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_xlink` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_xnote`
--

DROP TABLE IF EXISTS `t_xnote`;
CREATE TABLE `t_xnote` (
  `xnote_id` bigint(20) NOT NULL auto_increment,
  `note_id` bigint(20) NOT NULL default '0',
  `xref_id` bigint(20) NOT NULL default '0',
  `xnote_type` enum('REFERENCE','KEYWORD','AUTHOR','PERIODICAL') default NULL,
  PRIMARY KEY  (`xnote_id`),
  KEY `note_id` (`note_id`),
  KEY `xref_id` (`xref_id`),
  KEY `xnote_type` (`xnote_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_xnote`
--

LOCK TABLES `t_xnote` WRITE;
/*!40000 ALTER TABLE `t_xnote` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_xnote` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `t_xuser`
--

DROP TABLE IF EXISTS `t_xuser`;
CREATE TABLE `t_xuser` (
  `xuser_id` bigint(20) NOT NULL auto_increment,
  `user_id` bigint(20) NOT NULL default '0',
  `refdb_id` bigint(20) NOT NULL default '0',
  `xuser_reprint` enum('IN FILE','NOT IN FILE','ON REQUEST') default NULL,
  `xuser_date` date default NULL,
  `xuser_avail` varchar(255) default NULL,
  `xuser_notes` mediumblob,
  PRIMARY KEY  (`xuser_id`),
  KEY `user_id` (`user_id`),
  KEY `refdb_id` (`refdb_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `t_xuser`
--

LOCK TABLES `t_xuser` WRITE;
/*!40000 ALTER TABLE `t_xuser` DISABLE KEYS */;
/*!40000 ALTER TABLE `t_xuser` ENABLE KEYS */;
UNLOCK TABLES;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

