###################################################################################################
VIEW_DEFINITION shallow_events by BIN
	DESCRIPTION
#               textual description of view
		"Test View, CSS Oracle Database"
		"Selects shallow events form origin table"
		"William Menke, 8/28/92"
		END
	SHELL
#		C-shell
		"/bin/csh"
		END
	SQL_SERVER
#		sql engine
		"/usr/local/lib/oracle/bin/sqlplus center/data@t:hugo:oracle"
		END
	REFORMATTER
#		program to reformat sql output into standard tab separated format
		"/nfs/maui/other/maui/menke/oracle/sun4/oracle_reformatter"
		END
	FILENAME_FIELD
#		filename field in user.table.field format
		ims.origin.filename
		END
	HITMAP_PATH
#		view server looks into this directory for hit maps
		/nfs/maui/other/maui/menke/oracle
		END
	SCHEMA
#		view_field	type	user	table	field	comment
		id		INT	ims	origin	evid	"event id"
		lat		DOUBLE	ims	origin	lat	"Latitude, deg N of equator"
		lon		DOUBLE	ims	origin	lon	"Longitude, deg E of Greenwich"
		depth		FLOAT	ims	origin	depth	"depth, km"
		algorithm	STR 40	ims	origin	algorithm	"location algorithm"
		END
	SQL_JOIN
#		gets only records that are shallow
		"ims.origin.depth < 1"
		END
	END
###########################################################################################################
VIEW_DEFINITION detailed_shallow_event by ID
	DESCRIPTION
#               textual description of view
		"Test View, CSS Oracle Database"
		"Gets more details (more fields) about a given event"
		"William Menke, 8/28/92"
		END
	SHELL
#		C-shell
		"/bin/csh"
		END
	SQL_SERVER
#		sql engine
		"/usr/local/lib/oracle/bin/sqlplus center/data@t:hugo:oracle"
		END
	REFORMATTER
#		program to reformat sql output into standard tab separated format
		"/nfs/maui/other/maui/menke/oracle/sun4/oracle_reformatter"
		END
	FILENAME_FIELD
#		filename field in user.table.field format
		ims.origin.filename
		END
	HITMAP_PATH
#		view server looks into this directory for hit maps
		/nfs/maui/other/maui/menke/oracle
		END
	SCHEMA
#		view_field	type	user	table	field	comment
		id		INT	ims	origin	evid	"event id"
		lat		DOUBLE	ims	origin	lat	"Latitude, deg N of equator"
		lon		DOUBLE	ims	origin	lon	"Longitude, deg E of Greenwich"
		depth		FLOAT	ims	origin	depth	"depth, km"
		time		DOUBLE	ims	origin	time	"time"
		algorithm	STR 40	ims	origin	algorithm	"location algorithm"
		author		STR 20	ims	origin	auth	"author"
		END
	SQL_JOIN
#		gets only records that are shallow
		"ims.origin.depth < 1"
		END
	SQL_ID 1
#		we want the record with the same evid as the target record
		"ims.origin.evid = $evid"
		END
#note reveral of sense of relation
	VIEWS_TO_WHICH_THIS_VIEW_IS_RELATED
		VIEW shallow_events THROUGH SQL_ID 1
#			the id field of the target view is the evid
			$evid id
			END
		END
	END
