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

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


----------------------------------------------------------------
--
-- Main table - trna
--
CREATE TABLE trna
	(
		id                               	VARCHAR(32)	NOT NULL PRIMARY KEY,
		chrom_position                   	VARCHAR(255),
		gene                             	VARCHAR(255),
		gene_id                          	VARCHAR(255),
		product                          	VARCHAR(255)
	)
;
GRANT select ON trna TO amaze;

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

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

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

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