
----------------------------------------------------------------
--
-- Table creation scripts for class misc_rna
--

----------------------------------------------------------------
--
-- Schema
--
alter session set current_schema=rsat;


----------------------------------------------------------------
--
-- Main table - misc_rna
--
CREATE TABLE misc_rna
	(
		id                               	VARCHAR(32)	NOT NULL PRIMARY KEY,
		geneid                           	VARCHAR(255),
		chrom_position                   	VARCHAR(255),
		chromosome                       	VARCHAR(255),
		contig                           	VARCHAR(255),
		end_pos                          	VARCHAR(255),
		gene                             	VARCHAR(255),
		gene_id                          	VARCHAR(255),
		name                             	VARCHAR(255),
		organism                         	VARCHAR(255),
		product                          	VARCHAR(255),
		start_pos                        	VARCHAR(255),
		strand                           	VARCHAR(255),
		taxid                            	VARCHAR(255),
		type                             	VARCHAR(255)
	)
;
GRANT select ON misc_rna TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_db_xref
--
CREATE TABLE misc_rna_db_xref
	(
		id                               	VARCHAR(32)	NOT NULL,
		db_xref                          	VARCHAR(255)
	)
;
CREATE INDEX misc_rna_db_xref_id_index ON misc_rna_db_xref (id);
GRANT select ON misc_rna_db_xref TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_function
--
CREATE TABLE misc_rna_function
	(
		id                               	VARCHAR(32)	NOT NULL,
		function                         	VARCHAR(255)
	)
;
CREATE INDEX misc_rna_function_id_index ON misc_rna_function (id);
GRANT select ON misc_rna_function TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_locus_tag
--
CREATE TABLE misc_rna_locus_tag
	(
		id                               	VARCHAR(32)	NOT NULL,
		locus_tag                        	VARCHAR(255)
	)
;
CREATE INDEX misc_rna_locus_tag_id_index ON misc_rna_locus_tag (id);
GRANT select ON misc_rna_locus_tag TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_names
--
CREATE TABLE misc_rna_names
	(
		id                               	VARCHAR(32)	NOT NULL,
		names                            	VARCHAR(255),
		qualifier                        	VARCHAR(20)
	)
;
CREATE INDEX misc_rna_names_id_index ON misc_rna_names (id);
GRANT select ON misc_rna_names TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_note
--
CREATE TABLE misc_rna_note
	(
		id                               	VARCHAR(32)	NOT NULL,
		note                             	VARCHAR(255)
	)
;
CREATE INDEX misc_rna_note_id_index ON misc_rna_note (id);
GRANT select ON misc_rna_note TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_rna_old_locus_tag
--
CREATE TABLE misc_rna_old_locus_tag
	(
		id                               	VARCHAR(32)	NOT NULL,
		old_locus_tag                    	VARCHAR(255)
	)
;
CREATE INDEX misc_rna_old_locus_tag_id_index ON misc_rna_old_locus_tag (id);
GRANT select ON misc_rna_old_locus_tag TO amaze;

----------------------------------------------------------------
--
-- Quit
--
quit;