/*
-- crlinelist.sql

-- version 1.0

-- SQL File to create the LINELIST table

-- Programmed by Snehavadan Macwan

-- Table 		LINELIST

-- Number of Columns:	6

-- Primary Key:		INSTRUME, WAVE_ID

-- Foriegn Key:		NONE 

-- Last Update:		14 JULY	1995, 	VERSION 1.0

-- Description:

This LINELIST catalog contains a listing of the wavelengths that are
associated with each instrument entry in EXPERIMENT.  For each instrument entry
in EXPERIMENT there will be one or more entries in LINELIST.
*/
CREATE TABLE linelist
(
-- Table Constraints Follow
-- CONSTRAINT fk_instrume_ll
--	FOREIGN KEY (instrume)	
--	REFERENCES experiment(instrume),	
CONSTRAINT pk_instrume_waveid_waveind_ll 
	PRIMARY KEY (instrume, wave_id, wave_ind),
-- Column Definitions Follow
instrume	VARCHAR2(6)	--Instrument Name	
	CONSTRAINT nn_instrume_ll	NOT NULL,
--	CONSTRAINT mem_instrume_ll	REFERENCES instrument_type,
wave_id		NUMBER (12)	-- Wavelength identification number
	CONSTRAINT nn_wave_id_ll	NOT NULL,
wave_ind	NUMBER (12)	-- Wavelength index number
	CONSTRAINT nn_wave_ind_ll	NOT NULL,
wavemin		FLOAT,		-- Minimum Observed Wavelength
wavemax		FLOAT,		-- Maximum Observed Wavelength
date_mod	CHAR (23)	-- Date of Last Modification
	CONSTRAINT nn_date_mod_ll	NOT NULL
	CONSTRAINT df_date_mod_ll	
		CHECK (date_mod LIKE '____/__/__ __:__:__.___')
) ;
