
----------------------------------------------------------------
--
-- Table creation scripts for class source
--

----------------------------------------------------------------
--
-- Schema
--
use rsat;


----------------------------------------------------------------
--
-- Main table - source
--
CREATE TABLE source
	(
		id                               	VARCHAR(16)	NOT NULL,
		taxid                            	VARCHAR(255),
		chrom_position                   	VARCHAR(255),
		isolate                          	VARCHAR(255),
		chromosome                       	VARCHAR(255),
		serotype                         	VARCHAR(255),
		organism                         	VARCHAR(255),
		sub_strain                       	VARCHAR(255),
		contig                           	VARCHAR(255),
		strain                           	VARCHAR(255),
		type                             	VARCHAR(255),
		plasmid                          	VARCHAR(255)
	)
;

----------------------------------------------------------------
--
-- Multivalue field - source_transl_except
--
CREATE TABLE source_transl_except
	(
		id                               	VARCHAR(16)	NOT NULL,
		transl_except                    	VARCHAR(255)
	)
;

----------------------------------------------------------------
--
-- Multivalue field - source_organelle
--
CREATE TABLE source_organelle
	(
		id                               	VARCHAR(16)	NOT NULL,
		organelle                        	VARCHAR(255)
	)
;

----------------------------------------------------------------
--
-- Multivalue field - source_note
--
CREATE TABLE source_note
	(
		id                               	VARCHAR(16)	NOT NULL,
		note                             	VARCHAR(255)
	)
;

----------------------------------------------------------------
--
-- Multivalue field - source_db_xref
--
CREATE TABLE source_db_xref
	(
		id                               	VARCHAR(16)	NOT NULL,
		db_xref                          	VARCHAR(255)
	)
;
