
----------------------------------------------------------------
--
-- Table creation scripts for class trna
--

----------------------------------------------------------------
--
-- Schema
--

----------------------------------------------------------------
--
-- Main table - trna
--
CREATE TABLE trna
	(
		id                               	VARCHAR(32)	NOT NULL PRIMARY KEY,
		geneid                           	VARCHAR(255),
		contig                           	VARCHAR(255),
		description                      	VARCHAR(255),
		end_pos                          	VARCHAR(255),
		name                             	VARCHAR(255),
		organism                         	VARCHAR(255),
		position                         	VARCHAR(255),
		source                           	VARCHAR(255),
		start_pos                        	VARCHAR(255),
		strand                           	VARCHAR(255),
		type                             	VARCHAR(255)
	) TYPE=INNODB
;

----------------------------------------------------------------
--
-- Multivalue field - trna_method
--
CREATE TABLE trna_method
	(
		id                               	VARCHAR(32)	NOT NULL,
		method                           	VARCHAR(255)
	) TYPE=INNODB
;
CREATE INDEX trna_method_id_index ON trna_method (id);

----------------------------------------------------------------
--
-- Multivalue field - trna_names
--
CREATE TABLE trna_names
	(
		id                               	VARCHAR(32)	NOT NULL,
		names                            	VARCHAR(255),
		qualifier                        	VARCHAR(20)
	) TYPE=INNODB
;
CREATE INDEX trna_names_id_index ON trna_names (id);

----------------------------------------------------------------
--
-- Multivalue field - trna_product
--
CREATE TABLE trna_product
	(
		id                               	VARCHAR(32)	NOT NULL,
		product                          	VARCHAR(255)
	) TYPE=INNODB
;
CREATE INDEX trna_product_id_index ON trna_product (id);

----------------------------------------------------------------
--
-- Multivalue field - trna_systematic_id
--
CREATE TABLE trna_systematic_id
	(
		id                               	VARCHAR(32)	NOT NULL,
		systematic_id                    	VARCHAR(255)
	) TYPE=INNODB
;
CREATE INDEX trna_systematic_id_id_index ON trna_systematic_id (id);

----------------------------------------------------------------
--
-- Multivalue field - trna_temporary_systematic_id
--
CREATE TABLE trna_temporary_systematic_id
	(
		id                               	VARCHAR(32)	NOT NULL,
		temporary_systematic_id          	VARCHAR(255)
	) TYPE=INNODB
;
CREATE INDEX trna_temporary_systematic_id_id_index ON trna_temporary_systematic_id (id);

----------------------------------------------------------------
--
-- Expanded attribute - trna_xrefs
--
CREATE TABLE trna_xrefs
	(
		id                               	VARCHAR(32)	NOT NULL,
		external_db                      	VARCHAR(255),
		external_id                      	VARCHAR(255)
	) TYPE=INNODB
;
CREATE INDEX trna_xrefs_id_index ON trna_xrefs (id);
