
----------------------------------------------------------------
--
-- Table creation scripts for class rrna
--

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

----------------------------------------------------------------
--
-- Main table - rrna
--
CREATE TABLE rrna
	(
		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)
	)
;

----------------------------------------------------------------
--
-- Multivalue field - rrna_method
--
CREATE TABLE rrna_method
	(
		id                               	VARCHAR(32)	NOT NULL,
		method                           	VARCHAR(255)
	)
;
CREATE INDEX rrna_method_id_index ON rrna_method (id);

----------------------------------------------------------------
--
-- Multivalue field - rrna_names
--
CREATE TABLE rrna_names
	(
		id                               	VARCHAR(32)	NOT NULL,
		names                            	VARCHAR(255),
		qualifier                        	VARCHAR(20)
	)
;
CREATE INDEX rrna_names_id_index ON rrna_names (id);

----------------------------------------------------------------
--
-- Multivalue field - rrna_product
--
CREATE TABLE rrna_product
	(
		id                               	VARCHAR(32)	NOT NULL,
		product                          	VARCHAR(255)
	)
;
CREATE INDEX rrna_product_id_index ON rrna_product (id);

----------------------------------------------------------------
--
-- Multivalue field - rrna_systematic_id
--
CREATE TABLE rrna_systematic_id
	(
		id                               	VARCHAR(32)	NOT NULL,
		systematic_id                    	VARCHAR(255)
	)
;
CREATE INDEX rrna_systematic_id_id_index ON rrna_systematic_id (id);

----------------------------------------------------------------
--
-- Multivalue field - rrna_temporary_systematic_id
--
CREATE TABLE rrna_temporary_systematic_id
	(
		id                               	VARCHAR(32)	NOT NULL,
		temporary_systematic_id          	VARCHAR(255)
	)
;
CREATE INDEX rrna_temporary_systematic_id_id_index ON rrna_temporary_systematic_id (id);

----------------------------------------------------------------
--
-- Expanded attribute - rrna_xrefs
--
CREATE TABLE rrna_xrefs
	(
		id                               	VARCHAR(32)	NOT NULL,
		external_db                      	VARCHAR(255),
		external_id                      	VARCHAR(255)
	)
;
CREATE INDEX rrna_xrefs_id_index ON rrna_xrefs (id);
