
----------------------------------------------------------------
--
-- Table creation scripts for class misc_feature
--

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


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

----------------------------------------------------------------
--
-- Multivalue field - misc_feature_exons
--
CREATE TABLE genbank.misc_feature_exons
	(
		id                               	VARCHAR(32)	NOT NULL,
		exons                            	VARCHAR(255)
	)
;
CREATE INDEX misc_feature_exons_id_index ON genbank.misc_feature_exons (id);
GRANT select ON genbank.misc_feature_exons TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_feature_function
--
CREATE TABLE genbank.misc_feature_function
	(
		id                               	VARCHAR(32)	NOT NULL,
		function                         	VARCHAR(255)
	)
;
CREATE INDEX misc_feature_function_id_index ON genbank.misc_feature_function (id);
GRANT select ON genbank.misc_feature_function TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_feature_introns
--
CREATE TABLE genbank.misc_feature_introns
	(
		id                               	VARCHAR(32)	NOT NULL,
		introns                          	VARCHAR(255)
	)
;
CREATE INDEX misc_feature_introns_id_index ON genbank.misc_feature_introns (id);
GRANT select ON genbank.misc_feature_introns TO amaze;

----------------------------------------------------------------
--
-- Multivalue field - misc_feature_label
--
CREATE TABLE genbank.misc_feature_label
	(
		id                               	VARCHAR(32)	NOT NULL,
		label                            	VARCHAR(255)
	)
;
CREATE INDEX misc_feature_label_id_index ON genbank.misc_feature_label (id);
GRANT select ON genbank.misc_feature_label TO amaze;

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

----------------------------------------------------------------
--
-- Multivalue field - misc_feature_note
--
CREATE TABLE genbank.misc_feature_note
	(
		id                               	VARCHAR(32)	NOT NULL,
		note                             	VARCHAR(255)
	)
;
CREATE INDEX misc_feature_note_id_index ON genbank.misc_feature_note (id);
GRANT select ON genbank.misc_feature_note TO amaze;

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