Diagram Report

 CISN Waveform
Version 1.2.6

Berkeley Seismological Laboratory
Stephane Zuzlewski
Last Modified 7/21/2010
Copyright 2010 CISN
 
Table of Contents

            Table of Contents	          
            Model Summary Report	          
            Model Detail Reports	          
            Entity Summary Report	          
            Entity Detail Reports	          
            Model Detail Reports	          
            Table Summary Report	          
            Table Detail Reports	          
            Oracle Sequence Summary Report	          
            Oracle Sequence Detail Report	          

Model Summary Report

Name	DatabasePlatform	 
Logical	Logical	
NCEDC	Oracle 10g	

Model Detail Reports

Logical

Model Name	Logical	
Database Platform	Logical	

Entity Summary Report

Entity Name	Entity Type	Primary Keys	 # Attr	
AssocWaE	Dependent	wfid,evid	5	
Filename	Independent	fileid	7	
Subdir	Independent	subdirid	3	
Waveform	Independent	wfid	27	
Waveroots	Independent	archive,wavetype,status,net,wave_fmt,datetime_on,datetime_off,wcopy	9	

Entity Detail Reports

AssocWaE

Entity Name	AssocWaE	
Owner Name		
Primary Keys	wfid,evid	
Definition	Data associating waveforms with events	
Attributes 

Attribute/Logical Rolename	Domain	Datatype	Null	Definition	
wfid		NUMERIC(15, 0)	N	Waveform identifier. The key field is a unique identifier for a segment of digital waveform data	 
evid		NUMERIC(15, 0)	N	Event identifier.  Each event is assigned a unique integer which identifies it in a database. It is possible for several records in the Origin relation to have the same evid. This indicates there are several opinions about the location of the event. The evid does not have to be identical to the local network's event identifier, which is stored in the Origin table. This allows to merge data for a single event from multiple sources without insisting that database evid is identical to the source's local event identifier
	 
datetime_on		NUMERIC(25, 10)	N	Time of first datum	 
datetime_off		NUMERIC(25, 10)	N	Time of last datum	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified	 
Defaults, Rules and Check Constraints 

Attribute	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
Relationships 

 Parent Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	
Waveform	Identifying	One To Zero or More					NO	 
 Child Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	

Filename

Entity Name	Filename	
Owner Name		
Primary Keys	fileid	
Definition	Summary information on a waveform filenames	
Attributes 

Attribute/Logical Rolename	Domain	Datatype	Null	Definition	
fileid		NUMERIC(15, 0)	N	Filename identifier. The key field is a unique identifier for a physical file on a disk	 
dfile		VARCHAR(32)	N	Data file. This is the file name of a disk-based waveform file	 
datetime_on		NUMERIC(25, 10)	Y	Time of first sample in the waveform file	 
datetime_off		NUMERIC(25, 10)	Y	Time of last sample in the waveform file	 
nbytes		NUMERIC(10, 0)	Y	Number of bytes. This quantity is the number of bytes in a waveform segment or a file	 
subdirid		NUMERIC(15, 0)	N	Directory identifier. The key field is a unique identifier for a directory name on a disk	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified	 
Defaults, Rules and Check Constraints 

Attribute	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
	Check	FN01	(nbytes >=0)	 
Relationships 

 Parent Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	
Subdir	Non-Identifying	One To Zero or More					NO	 
 Child Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	
Waveform	Non-Identifying	One To Zero or More					NO	 

Subdir

Entity Name	Subdir	
Owner Name		
Primary Keys	subdirid	
Definition	Summary information on a directory name	
Attributes 

Attribute/Logical Rolename	Domain	Datatype	Null	Definition	
subdirid		NUMERIC(15, 0)	N	Directory identifier. The key field is a unique identifier for a directory name on a disk	 
subdirname		VARCHAR(64)	N	Path name. This is the name of a disk-based directory	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified
	 
Defaults, Rules and Check Constraints 

Attribute	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
Relationships 

 Parent Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	
 Child Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	
Filename	Non-Identifying	One To Zero or More					NO	 

Waveform

Entity Name	Waveform	
Owner Name		
Primary Keys	wfid	
Definition	Summary information on a waveform	
Attributes 

Attribute/Logical Rolename	Domain	Datatype	Null	Definition	
wfid		NUMERIC(15, 0)	N	Waveform identifier. The key field is a unique identifier for a segment of digital waveform data	 
net		VARCHAR(8)	N	Unique network identifier. This character string is the name of a seismic network	 
sta		VARCHAR(6)	N	Station code. This is the common code-name of a seismic observatory. Generally only three or four characters are used	 
auth		VARCHAR(15)	N	The auth field specifies the source of the information. This may be a network identifier (FDSN or otherwise), or any other string indicating the source of the information in the record
	 
subsource		VARCHAR(8)	Y	A second identifier to specify a unique source within the domain specified by auth	 
channel		VARCHAR(8)	Y	Channel name	 
channelsrc		VARCHAR(8)	Y	Domain for channel. This specifies what naming convention is used for the channel name (i.e. SEED, USGS, etc.)	 
seedchan		VARCHAR(3)	N	SEED channel name. The first character denotes the band code, the second for the instrument code and the third represents the component code
	 
location		VARCHAR(2)	Y	Describes the individual sites on an array station, operated by the same network operator	 
archive		VARCHAR(8)	N	This field specifies the place where the seismogram is archived	 
datetime_on		NUMERIC(25, 10)	N	Time of first datum	 
datetime_off		NUMERIC(25, 10)	N	Time of last datum	 
samprate		FLOAT	N	Sampling rate. This attribute is the sample rate in samples/second	 
wavetype		VARCHAR(1)	Y	This attribute denotes the type of waveform	 
fileid		NUMERIC(15, 0)	N	Filename identifier. The key field is a unique identifier for a physical file on a disk	 
foff		NUMERIC(12, 0)	Y	File offset. This is the byte offset of a waveform segment within a data file	 
nbytes		NUMERIC(10, 0)	Y	Number of bytes. This quantity is the number of bytes in a waveform segment or a file	 
traceoff		NUMERIC(10, 0)	Y	File offset. This is the byte offset of the entire trace	 
tracelen		NUMERIC(10, 0)	Y	Number of bytes. This quantity represents the length of the entire trace	 
status		VARCHAR(1)	N	This attribute denotes the status of the waveform in the file	 
wave_fmt		NUMERIC(2, 0)	Y	Waveform type	 
format_id		NUMERIC(2, 0)	Y	This attribute denotes a code indicating the encoding format. This number is assigned by the FDSN Data Exchange Working Group	 
wordorder		NUMERIC(1, 0)	Y	Word order	 
recordsize		NUMERIC(5, 0)	Y	Record size for data. For MiniSEED, the value is the MiniSEED record size, eg. 512, 4096, etc	 
locevid		VARCHAR(12)	Y	Local event identifier. This attribute describes the original event identifier of the event. In combination with auth and subsource, it can be used to uniquely identify the original event identifier from that source. For example, waveforms from the original source may be associated with this identifier	 
qc_level		CHAR(1)	N	This flag specifies the Data Header/Quality indicator flag for the specified waveform.

Reference: SEED manual in Fixed Section of Data Header.

For non-MiniSEED data, this would be the MiniSEED flag to be used
if the data would be converted to MiniSEED.	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified
	 
Defaults, Rules and Check Constraints 

Attribute	Type	Name	Restriction	
qc_level	Default		('D')	 
lddate	Default		(SYSDATE)	 
	Check	WFRM05	(samprate > 0.0)	 
	Check	WFRM01	(fileid > 0)	 
	Check	WFRM02	(foff >=0)	 
	Check	WFRM03	(format_id >=1)	 
	Check	WFRM04	(recordsize >=0)	 
	Check	WFRM06	(tracelen >=0)	 
	Check	WFRM07	(traceoff >=0)	 
	Check	WFRM09	(wave_fmt >=1)	 
	Check	WFRM10	(wfid > 0)	 
	Check	WFRM11	(wordorder >=0)	 
	Check	WFRM12	(nbytes >=0)	 
	Check	WFRM13	(qc_level in ('R','D','Q','M'))	 
	Check	WFRM14	(status in ('E','T','A'))	 
	Check	WFRM08	(wavetype in ('C','T'))	 
Relationships 

 Parent Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	
Filename	Non-Identifying	One To Zero or More					NO	 
 Child Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	
AssocWaE	Identifying	One To Zero or More					NO	 

Waveroots

Entity Name	Waveroots	
Owner Name		
Primary Keys	archive,wavetype,status,net,wave_fmt,datetime_on,datetime_off,wcopy	
Definition	Summary information on possible locations of waveforms based on common columns it shares with the WAVEFORM table	
Attributes 

Attribute/Logical Rolename	Domain	Datatype	Null	Definition	
archive		VARCHAR(8)	N	This field specifies the place where the seismogram is archived - such as NCEDC/SCEDC	 
wavetype		VARCHAR(2)	N	This attribute denotes the type of waveform: (T)riggered or (C)ontinuous	 
status		VARCHAR(2)	N	This attribute denotes the status of the waveform in the file:  (A)rchived or (T)emporary	 
net		VARCHAR(8)	N	Unique network identifier. This character string is the name of a seismic network. A null value means waveforms from 
any network could reside in this location	 
wave_fmt		NUMERIC(2, 0)	N	Waveform type - (numeric code for  format mSEED, SAC, SEGY, ...)	 
datetime_on		NUMERIC(25, 10)	N	The datetime_on of the waveform row must be >= to this value	 
datetime_off		NUMERIC(25, 10)	N	The datetime_off of the waveform row must be <  to this value	 
wcopy		NUMERIC(10, 0)	N	Copy number of the waveform file location. Used to distinguish between locations that contain a copy of the waveform file. The copy number should start from 1.  The copy number does not indicate quality or any preference of one copy over another; it is used to just distinguish one copy from another	 
fileroot		VARCHAR(255)	N	The top file directory of the waveform file. Subdirectories are allowed (i.e. /top_directory/subdirectory1/subdirectory2) but the top level must be included and it must be consistent with entries in SUBDIR	 
Defaults, Rules and Check Constraints 

Attribute	Type	Name	Restriction	
	Check	wfroot01	(wcopy > 0)	 
	Check	wfroot02	(wavetype in ('T','C'))	 
	Check	wfroot03	(status in ('T','A'))	 
	Check	wfroot04	(wave_fmt in (1,2,3,4))	 
Relationships 

 Parent Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	
 Child Relationships: 

Entity Name	Type	Cardinality	Business Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	

Model Detail Reports

NCEDC

Model Name	NCEDC	
Database Platform	Oracle 10g	

Table Summary Report

Table Name	Table Type	Primary Keys	# Col	
AssocWaE	Dependent	wfid,evid,	5	
Filename	Independent	fileid,	7	
Subdir	Independent	subdirid,	3	
Waveform	Independent	wfid,	27	
Waveroots	Independent	archivewavetypestatusnetwave_fmtdatetime_ondatetime_offwcopy	9	

Table Detail Reports

AssocWaE

Table Name	AssocWaE	
Owner Name		
Primary Keys	wfid,evid	
Definition	Data associating waveforms with events	
Columns 

Column Name	Domain	Datatype	Null	Definition	
wfid		NUMBER(15, 0)	N	Waveform identifier. The key field is a unique identifier for a segment of digital waveform data	 
evid		NUMBER(15, 0)	N	Event identifier.  Each event is assigned a unique integer which identifies it in a database. It is possible for several records in the Origin relation to have the same evid. This indicates there are several opinions about the location of the event. The evid does not have to be identical to the local network's event identifier, which is stored in the Origin table. This allows to merge data for a single event from multiple sources without insisting that database evid is identical to the source's local event identifier
	 
datetime_on		NUMBER(25, 10)	N	Time of first datum	 
datetime_off		NUMBER(25, 10)	N	Time of last datum	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified	 
Defaults, Rules and Check Constraints 

Column	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
Foreign Keys 

 Parent Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	Deferrable	
Waveform	Identifying	One To Zero or More	Waveform_Event				NO	NO	 
 Child Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	Deferrable	
DDL Code 

CREATE TABLE AssocWaE(
    wfid            NUMBER(15, 0)     NOT NULL,
    evid            NUMBER(15, 0)     NOT NULL,
    datetime_on     NUMBER(25, 10)    NOT NULL,
    datetime_off    NUMBER(25, 10)    NOT NULL,
    lddate          DATE              DEFAULT (SYSDATE) NOT NULL,
    CONSTRAINT AWE00 PRIMARY KEY (wfid, evid)
    USING INDEX
        LOGGING, 
    CONSTRAINT Waveform_Event FOREIGN KEY (wfid)
    REFERENCES Waveform(wfid)
)
TABLESPACE WF_DATA
LOGGING
;

Filename

Table Name	Filename	
Owner Name		
Primary Keys	fileid	
Definition	Summary information on a waveform filenames	
Columns 

Column Name	Domain	Datatype	Null	Definition	
fileid		NUMBER(15, 0)	N	Filename identifier. The key field is a unique identifier for a physical file on a disk	 
dfile		VARCHAR2(32)	N	Data file. This is the file name of a disk-based waveform file	 
datetime_on		NUMBER(25, 10)	Y	Time of first sample in the waveform file	 
datetime_off		NUMBER(25, 10)	Y	Time of last sample in the waveform file	 
nbytes		NUMBER(10, 0)	Y	Number of bytes. This quantity is the number of bytes in a waveform segment or a file	 
subdirid		NUMBER(15, 0)	N	Directory identifier. The key field is a unique identifier for a directory name on a disk	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified	 
Defaults, Rules and Check Constraints 

Column	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
	Check	FN01	(nbytes >=0)	 
Foreign Keys 

 Parent Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	Deferrable	
Subdir	Non-Identifying	One To Zero or More	Filename_PartialPath				NO	NO	 
 Child Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	Deferrable	
Waveform	Non-Identifying	One To Zero or More	Waveform_Filename				NO	NO	 
DDL Code 

CREATE TABLE Filename(
    fileid          NUMBER(15, 0)     NOT NULL,
    dfile           VARCHAR2(32)      NOT NULL,
    datetime_on     NUMBER(25, 10),
    datetime_off    NUMBER(25, 10),
    nbytes          NUMBER(10, 0),
    subdirid        NUMBER(15, 0)     NOT NULL,
    lddate          DATE              DEFAULT (SYSDATE) NOT NULL,
    CONSTRAINT FN01 CHECK ((nbytes >=0)),
    CONSTRAINT Fil00 PRIMARY KEY (fileid)
    USING INDEX
        LOGGING, 
    CONSTRAINT Filename_PartialPath FOREIGN KEY (subdirid)
    REFERENCES Subdir(subdirid)
)
TABLESPACE WF_DATA
LOGGING
;

Subdir

Table Name	Subdir	
Owner Name		
Primary Keys	subdirid	
Definition	Summary information on a directory name	
Columns 

Column Name	Domain	Datatype	Null	Definition	
subdirid		NUMBER(15, 0)	N	Directory identifier. The key field is a unique identifier for a directory name on a disk	 
subdirname		VARCHAR2(64)	N	Path name. This is the name of a disk-based directory	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified
	 
Defaults, Rules and Check Constraints 

Column	Type	Name	Restriction	
lddate	Default		(SYSDATE)	 
Foreign Keys 

 Parent Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	Deferrable	
 Child Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	Deferrable	
Filename	Non-Identifying	One To Zero or More	Filename_PartialPath				NO	NO	 
DDL Code 

CREATE TABLE Subdir(
    subdirid      NUMBER(15, 0)    NOT NULL,
    subdirname    VARCHAR2(64)     NOT NULL,
    lddate        DATE             DEFAULT (SYSDATE) NOT NULL,
    CONSTRAINT Sub00 PRIMARY KEY (subdirid)
    USING INDEX
        LOGGING
)
TABLESPACE WF_DATA
LOGGING
;

Waveform

Table Name	Waveform	
Owner Name		
Primary Keys	wfid	
Definition	Summary information on a waveform	
Columns 

Column Name	Domain	Datatype	Null	Definition	
wfid		NUMBER(15, 0)	N	Waveform identifier. The key field is a unique identifier for a segment of digital waveform data	 
net		VARCHAR2(8)	N	Unique network identifier. This character string is the name of a seismic network	 
sta		VARCHAR2(6)	N	Station code. This is the common code-name of a seismic observatory. Generally only three or four characters are used	 
auth		VARCHAR2(15)	N	The auth field specifies the source of the information. This may be a network identifier (FDSN or otherwise), or any other string indicating the source of the information in the record
	 
subsource		VARCHAR2(8)	Y	A second identifier to specify a unique source within the domain specified by auth	 
channel		VARCHAR2(8)	Y	Channel name	 
channelsrc		VARCHAR2(8)	Y	Domain for channel. This specifies what naming convention is used for the channel name (i.e. SEED, USGS, etc.)	 
seedchan		VARCHAR2(3)	N	SEED channel name. The first character denotes the band code, the second for the instrument code and the third represents the component code
	 
location		VARCHAR2(2)	Y	Describes the individual sites on an array station, operated by the same network operator	 
archive		VARCHAR2(8)	N	This field specifies the place where the seismogram is archived	 
datetime_on		NUMBER(25, 10)	N	Time of first datum	 
datetime_off		NUMBER(25, 10)	N	Time of last datum	 
samprate		FLOAT(126)	N	Sampling rate. This attribute is the sample rate in samples/second	 
wavetype		VARCHAR2(1)	Y	This attribute denotes the type of waveform	 
fileid		NUMBER(15, 0)	N	Filename identifier. The key field is a unique identifier for a physical file on a disk	 
foff		NUMBER(12, 0)	Y	File offset. This is the byte offset of a waveform segment within a data file	 
nbytes		NUMBER(10, 0)	Y	Number of bytes. This quantity is the number of bytes in a waveform segment or a file	 
traceoff		NUMBER(10, 0)	Y	File offset. This is the byte offset of the entire trace	 
tracelen		NUMBER(10, 0)	Y	Number of bytes. This quantity represents the length of the entire trace	 
status		VARCHAR2(1)	N	This attribute denotes the status of the waveform in the file	 
wave_fmt		NUMBER(2, 0)	Y	Waveform type	 
format_id		NUMBER(2, 0)	Y	This attribute denotes a code indicating the encoding format. This number is assigned by the FDSN Data Exchange Working Group	 
wordorder		NUMBER(1, 0)	Y	Word order	 
recordsize		NUMBER(5, 0)	Y	Record size for data. For MiniSEED, the value is the MiniSEED record size, eg. 512, 4096, etc	 
locevid		VARCHAR2(12)	Y	Local event identifier. This attribute describes the original event identifier of the event. In combination with auth and subsource, it can be used to uniquely identify the original event identifier from that source. For example, waveforms from the original source may be associated with this identifier	 
qc_level		CHAR(1)	N	This flag specifies the Data Header/Quality indicator flag for the specified waveform.

Reference: SEED manual in Fixed Section of Data Header.

For non-MiniSEED data, this would be the MiniSEED flag to be used
if the data would be converted to MiniSEED.	 
lddate		DATE	N	Load date. Date and time that the record was created or last modified
	 
Defaults, Rules and Check Constraints 

Column	Type	Name	Restriction	
qc_level	Default		('D')	 
lddate	Default		(SYSDATE)	 
	Check	WFRM05	(samprate > 0.0)	 
	Check	WFRM01	(fileid > 0)	 
	Check	WFRM02	(foff >=0)	 
	Check	WFRM03	(format_id >=1)	 
	Check	WFRM04	(recordsize >=0)	 
	Check	WFRM06	(tracelen >=0)	 
	Check	WFRM07	(traceoff >=0)	 
	Check	WFRM09	(wave_fmt >=1)	 
	Check	WFRM10	(wfid > 0)	 
	Check	WFRM11	(wordorder >=0)	 
	Check	WFRM12	(nbytes >=0)	 
	Check	WFRM13	(qc_level in ('R','D','Q','M'))	 
	Check	WFRM14	(status in ('E','T','A'))	 
	Check	WFRM08	(wavetype in ('C','T'))	 
Foreign Keys 

 Parent Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	Deferrable	
Filename	Non-Identifying	One To Zero or More	Waveform_Filename				NO	NO	 
 Child Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	Deferrable	
AssocWaE	Identifying	One To Zero or More	Waveform_Event				NO	NO	 
DDL Code 

CREATE TABLE Waveform(
    wfid            NUMBER(15, 0)     NOT NULL,
    net             VARCHAR2(8)       NOT NULL,
    sta             VARCHAR2(6)       NOT NULL,
    auth            VARCHAR2(15)      NOT NULL,
    subsource       VARCHAR2(8),
    channel         VARCHAR2(8),
    channelsrc      VARCHAR2(8),
    seedchan        VARCHAR2(3)       NOT NULL,
    location        VARCHAR2(2),
    archive         VARCHAR2(8)       NOT NULL,
    datetime_on     NUMBER(25, 10)    NOT NULL,
    datetime_off    NUMBER(25, 10)    NOT NULL,
    samprate        FLOAT(126)        NOT NULL,
    wavetype        VARCHAR2(1),
    fileid          NUMBER(15, 0)     NOT NULL,
    foff            NUMBER(12, 0),
    nbytes          NUMBER(10, 0),
    traceoff        NUMBER(10, 0),
    tracelen        NUMBER(10, 0),
    status          VARCHAR2(1)       NOT NULL,
    wave_fmt        NUMBER(2, 0),
    format_id       NUMBER(2, 0),
    wordorder       NUMBER(1, 0),
    recordsize      NUMBER(5, 0),
    locevid         VARCHAR2(12),
    qc_level        CHAR(1)           DEFAULT ('D') NOT NULL,
    lddate          DATE              DEFAULT (SYSDATE) NOT NULL,
    CONSTRAINT WFRM05 CHECK ((samprate > 0.0)),
    CONSTRAINT WFRM01 CHECK ((fileid > 0)),
    CONSTRAINT WFRM02 CHECK ((foff >=0)),
    CONSTRAINT WFRM03 CHECK ((format_id >=1)),
    CONSTRAINT WFRM04 CHECK ((recordsize >=0)),
    CONSTRAINT WFRM06 CHECK ((tracelen >=0)),
    CONSTRAINT WFRM07 CHECK ((traceoff >=0)),
    CONSTRAINT WFRM09 CHECK ((wave_fmt >=1)),
    CONSTRAINT WFRM10 CHECK ((wfid > 0)),
    CONSTRAINT WFRM11 CHECK ((wordorder >=0)),
    CONSTRAINT WFRM12 CHECK ((nbytes >=0)),
    CONSTRAINT WFRM13 CHECK ((qc_level in ('R','D','Q','M'))),
    CONSTRAINT WFRM14 CHECK ((status in ('E','T','A'))),
    CONSTRAINT WFRM08 CHECK ((wavetype in ('C','T'))),
    CONSTRAINT WF00 PRIMARY KEY (wfid)
    USING INDEX
        LOGGING, 
    CONSTRAINT Waveform_Filename FOREIGN KEY (fileid)
    REFERENCES Filename(fileid)
)
TABLESPACE WF_DATA
LOGGING
PARTITION BY RANGE (datetime_on)(
PARTITION Wf1986
VALUES LESS THAN (536457613)
TABLESPACE PWF1986
LOGGING,
PARTITION Wf1987
VALUES LESS THAN (567993614)
TABLESPACE PWF1987
LOGGING,
PARTITION Wf1988
VALUES LESS THAN (599616014)
TABLESPACE PWF1988
LOGGING,
PARTITION Wf1989
VALUES LESS THAN (631152015)
TABLESPACE PWF1989
LOGGING,
PARTITION Wf1990
VALUES LESS THAN (662688016)
TABLESPACE PWF1990
LOGGING,
PARTITION Wf1991
VALUES LESS THAN (694224016)
TABLESPACE PWF1991
LOGGING,
PARTITION Wf1992
VALUES LESS THAN (725846417)
TABLESPACE PWF1992
LOGGING,
PARTITION Wf1993
VALUES LESS THAN (757382418)
TABLESPACE PWF1993
LOGGING,
PARTITION Wf1994
VALUES LESS THAN (788918419)
TABLESPACE PWF1994
LOGGING,
PARTITION Wf1995
VALUES LESS THAN (820454420)
TABLESPACE PWF1995
LOGGING,
PARTITION Wf1996
VALUES LESS THAN (852076820)
TABLESPACE PWF1996
LOGGING,
PARTITION Wf1997
VALUES LESS THAN (883612821)
TABLESPACE PWF1997
LOGGING,
PARTITION Wf1998
VALUES LESS THAN (915148821)
TABLESPACE PWF1998
LOGGING,
PARTITION Wf1999
VALUES LESS THAN (946684821)
TABLESPACE PWF1999
LOGGING
)
;

Waveroots

Table Name	Waveroots	
Owner Name		
Primary Keys	archive,wavetype,status,net,wave_fmt,datetime_on,datetime_off,wcopy	
Definition	Summary information on possible locations of waveforms based on common columns it shares with the WAVEFORM table	
Columns 

Column Name	Domain	Datatype	Null	Definition	
archive		VARCHAR2(8)	N	This field specifies the place where the seismogram is archived - such as NCEDC/SCEDC	 
wavetype		VARCHAR2(2)	N	This attribute denotes the type of waveform: (T)riggered or (C)ontinuous	 
status		VARCHAR2(2)	N	This attribute denotes the status of the waveform in the file:  (A)rchived or (T)emporary	 
net		VARCHAR2(8)	N	Unique network identifier. This character string is the name of a seismic network. A null value means waveforms from 
any network could reside in this location	 
wave_fmt		NUMBER(2, 0)	N	Waveform type - (numeric code for  format mSEED, SAC, SEGY, ...)	 
datetime_on		NUMBER(25, 10)	N	The datetime_on of the waveform row must be >= to this value	 
datetime_off		NUMBER(25, 10)	N	The datetime_off of the waveform row must be <  to this value	 
wcopy		NUMBER(10, 0)	N	Copy number of the waveform file location. Used to distinguish between locations that contain a copy of the waveform file. The copy number should start from 1.  The copy number does not indicate quality or any preference of one copy over another; it is used to just distinguish one copy from another	 
fileroot		VARCHAR2(255)	N	The top file directory of the waveform file. Subdirectories are allowed (i.e. /top_directory/subdirectory1/subdirectory2) but the top level must be included and it must be consistent with entries in SUBDIR	 
Defaults, Rules and Check Constraints 

Column	Type	Name	Restriction	
	Check	wfroot02	(wavetype in ('T','C'))	 
	Check	wfroot03	(status in ('T','A'))	 
	Check	wfroot04	(wave_fmt in (1,2,3,4))	 
	Check	wfroot01	(wcopy > 0)	 
Foreign Keys 

 Parent Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Supertype	Deferrable	
 Child Relationships: 

Table Name	Type	Cardinality	Constraint Name	Verb Phrase	Inverse Phrase	Foreign Keys	Is Subtype	Deferrable	
DDL Code 

CREATE TABLE Waveroots(
    archive         VARCHAR2(8)       NOT NULL,
    wavetype        VARCHAR2(2)       NOT NULL,
    status          VARCHAR2(2)       NOT NULL,
    net             VARCHAR2(8)       NOT NULL,
    wave_fmt        NUMBER(2, 0)      NOT NULL,
    datetime_on     NUMBER(25, 10)    NOT NULL,
    datetime_off    NUMBER(25, 10)    NOT NULL,
    wcopy           NUMBER(10, 0)     NOT NULL,
    fileroot        VARCHAR2(255)     NOT NULL,
    CONSTRAINT wfroot02 CHECK ((wavetype in ('T','C'))),
    CONSTRAINT wfroot03 CHECK ((status in ('T','A'))),
    CONSTRAINT wfroot04 CHECK ((wave_fmt in (1,2,3,4))),
    CONSTRAINT wfroot01 CHECK ((wcopy > 0)),
    CONSTRAINT PK5 PRIMARY KEY (archive, wavetype, status, net, wave_fmt, datetime_on, datetime_off, wcopy)
    USING INDEX
        LOGGING
)
TABLESPACE WF_DATA
LOGGING
;

Oracle Sequence Summary Report

Name	ObjectType	
ncedcdba.fiseq	Sequence	
ncedcdba.sdseq	Sequence	
ncedcdba.waseq	Sequence	

Oracle Sequence Detail Report

ncedcdba.fiseq

Name	ncedcdba.fiseq	
ObjectType	Sequence	
Description 

Sequence for primary key Filename.fileid	
SQL 

CREATE SEQUENCE NCEDCDBA.FISEQ 
    START WITH 1
    INCREMENT BY 1
    NOMINVALUE
    NOMAXVALUE
    NOCYCLE
    CACHE 20
    ORDER
	
ncedcdba.sdseq

Name	ncedcdba.sdseq	
ObjectType	Sequence	
Description 

Sequence for primary key Subdir.subdirid	
SQL 

CREATE SEQUENCE NCEDCDBA.SDSEQ 
    START WITH 1
    INCREMENT BY 1
    NOMINVALUE
    NOMAXVALUE
    NOCYCLE
    CACHE 20
    ORDER
	
ncedcdba.waseq

Name	ncedcdba.waseq	
ObjectType	Sequence	
Description 

Sequence for primary key Waveform.wfid	
SQL 

CREATE SEQUENCE NCEDCDBA.WASEQ 
    START WITH 1
    INCREMENT BY 1
    NOMINVALUE
    NOMAXVALUE
    NOCYCLE
    CACHE 20
    ORDER