/*
-- createtbl.sql

-- version 1.0

-- SQL File to create tables for CDS database

-- Programmed by Snehavadan Macwan

-- Last Update:		4  APRIL	1996, VERSION 1.0

-- ============================================================================

Constraint Naming Convention:

All Constraints should be named according to the following convention.  The 
constraint name should be preceeded by a abbreviation that indicates what type
of constraint is being implemented.  Next should follow the name of the column
that the constraint is being applied to.  If the constraint is table
constraint, then a descriptive name should be substituted for the column name.
The constraint name should end with the table abbreviation for the table that 
it is located in.  

For instance, suppose the not null constraint was being applied to the seq_num
column in the experiment table.  The constraint name would begin with the 
abbreviation for not null 'nn' followed by an underscore, followed by the 
column name 'seq_num', followed the abreviation for the experiment table '_ex'.
The entire constraint name would thus be:

	nn_seq_num_ex

Abreviations Used On Constraints:
	
	nn	Not Null
	pk	Primary Key
	fk	Foriegn Key
	unq	Unique
	df	Date Format
	tf	Time Format
	mem	Member of List
	check	Check

Table Name Abreviations Appended To Constraints

	_mn	Main
	_ex	Experiment
	_ca	Campaign
	_in	Institutes
	_ev	Events
	_wv	Wavelengths
	_ll     Linelist
        _ob	Objects
	_cmmn	Comment - Main
	_cmex	Comment - Experiment
	_cmca	Comment - Campaign
	_cmin	Comment - Institutes
	_cmev	Comment - Events
	_cn	Constants

*/
-- CREATE EACH TABLE IN THE DATABASE
--
-- Create the CONSTANT Tables
START crconstant
-- Create the OBJECTS Table
START crobjects
-- Create the CAMPAIGN Table
START crcampaign
-- Create the MAIN Table
START crmain
-- Create the EXPERIMENT Table
START crexperiment
-- Create the WAVELENGTHS Table
-- START crwl
-- Create the LINELIST Table
-- START crlinelist
-- Create the INSTITUTES Table
START crinstitutes
-- Create the EVENTS Table
-- START crevents
-- Create the COMMENT_MAIN Table
START crmncomnt
-- Create the COMMENT_EXPERIMENT Table
START crexcomnt
-- Create the COMMENT_CAMPAIGN Table
START crcacomnt
-- Create the COMMENT_INSTITUTES Table
START crincomnt
-- Create the COMMENT_EVENTS Table
-- START crevcomnt

