national park service se coastal water quality monitoring metadata

325
National Park Service SE Coastal Water Quality Monitoring Metadata Project Database Design NPS_WaterQuality (version 1.0, 30-Mar-2009) 04/02/2009

Upload: others

Post on 12-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service SE Coastal Water Quality Monitoring

Metadata Project

Database Design NPS_WaterQuality (version 1.0, 30-Mar-2009)

04/02/2009

Page 2: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 2 of 325

Index Database: NPS_WaterQuality......................................................................................................................... 6

Tables ......................................................................................................................................................... 10 Table: dbo.CountyCodes ..................................................................................................................... 11

Indexes .............................................................................................................................................. 14 Index: PK_CountyCodes on table dbo.CountyCodes .............................................................. 15 Index: IX_CountyCodes_StateCode on table dbo.CountyCodes ............................................ 16 Index: IX_CountyCodes_CountyCode on table dbo.CountyCodes ........................................ 18

Relationships .................................................................................................................................... 20 Relationship: [FK_CountyCodes_StateCodes] on [CountyCodes] ........................................ 21

Table: dbo.DatabaseRoles ................................................................................................................... 22 Indexes .............................................................................................................................................. 23

Index: PK_DatabaseRoles on table dbo.DatabaseRoles ......................................................... 24 Table: dbo.DatabaseUsers................................................................................................................... 25

Indexes .............................................................................................................................................. 27 Index: PK_DatabaseUsers on table dbo.DatabaseUsers ......................................................... 28

Table: dbo.Logins ................................................................................................................................. 29 Indexes .............................................................................................................................................. 31

Index: PK_Logins on table dbo.Logins...................................................................................... 32 Relationships .................................................................................................................................... 33

Relationship: [FK_Logins_DatabaseRoles] on [Logins].......................................................... 34 Relationship: [FK_Logins_DatabaseUsers] on [Logins].......................................................... 35

Table: dbo.MonitoringDescriptorList.................................................................................................. 36 Indexes .............................................................................................................................................. 38

Index: PK_MonitoringDescriptorList on table dbo.MonitoringDescriptorList....................... 39 Relationships .................................................................................................................................... 41

Relationship: [FK_MonitoringDescriptorList_WebFormFieldTypes] on [MonitoringDescriptorList] .......................................................................................................... 42

Table: dbo.MonitoringDescriptorVocab ............................................................................................. 43 Indexes .............................................................................................................................................. 45

Index: PK_MonitoringDescriptorVocab on table dbo.MonitoringDescriptorVocab .............. 46 Relationships .................................................................................................................................... 48

Relationship: [FK_MonitoringDescriptorVocab_MonitoringDescriptor List] on [MonitoringDescriptorVocab] ..................................................................................................... 49

Table: dbo.MonitoringProgramDescriptors ....................................................................................... 50 Indexes .............................................................................................................................................. 52

Index: PK_MonitoringProgramDescriptors on table dbo.MonitoringProgramDescriptors.. 53 Index: IX_MonitoringProgramDescriptors_ProgramID on table dbo.MonitoringProgramDescriptors .......................................................................................... 55 Index: IX_MonitoringProgramDescriptors_DescriptorName on table dbo.MonitoringProgramDescriptors .......................................................................................... 57

Relationships .................................................................................................................................... 59 Relationship: [FK_MonitoringProgramDescriptors_MonitoringDescrip torList] on [MonitoringProgramDescriptors] ............................................................................................... 60 Relationship: [FK_MonitoringProgramDescriptors_MonitoringProgram s] on [MonitoringProgramDescriptors] ............................................................................................... 61

Table: dbo.MonitoringProgramParameters........................................................................................ 62 Indexes .............................................................................................................................................. 65

Index: PK_MonitoringProgramParameters on table dbo.MonitoringProgramParameters... 66 Index: IX_MonitoringProgramParameters_ProgramID on table dbo.MonitoringProgramParameters........................................................................................... 68 Index: IX_MonitoringProgramParameters_TypeCode on table dbo.MonitoringProgramParameters........................................................................................... 70 Index: IX_MonitoringProgramParameters_ParameterID on table dbo.MonitoringProgramParameters........................................................................................... 72

Relationships .................................................................................................................................... 74 Relationship: [FK_MonitoringProgramParameters_MonitoringPrograms ] on [MonitoringProgramParameters]................................................................................................ 75

Page 3: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 3 of 325

Relationship: [FK_MonitoringProgramParameters_MonitoringTypes] on [MonitoringProgramParameters]................................................................................................ 76 Relationship: [FK_MonitoringProgramParameters_Parameters] on [MonitoringProgramParameters]................................................................................................ 77

Table: dbo.MonitoringPrograms ......................................................................................................... 78 Indexes .............................................................................................................................................. 80

Index: PK_MonitoringPrograms on table dbo.MonitoringPrograms ...................................... 81 Index: IX_MonitoringPrograms_Pro jectID on table dbo.MonitoringPrograms..................... 83 Index: IX_MonitoringPrograms_OrgID on table dbo.MonitoringPrograms............................ 85 Index: IX_MonitoringPrograms_ProgramName on table dbo.MonitoringPrograms ............. 87

Relationships .................................................................................................................................... 89 Relationship: [FK_MonitoringPrograms_Organizations] on [MonitoringPrograms] ............ 90

Table: dbo.MonitoringStationParameters .......................................................................................... 91 Indexes .............................................................................................................................................. 93

Index: PK_MonitoringStationParameters on table dbo.MonitoringStationParameters........ 94 Index: IX_MonitoringStationParameters_StationID on table dbo.MonitoringStationParameters ............................................................................................. 96 Index: IX_MonitoringStationParameters_ParameterID on table dbo.MonitoringStationParameters ............................................................................................. 98 Index: IX_MonitoringStationParameters_TypeCode on table dbo.MonitoringStationParameters ........................................................................................... 100

Relationships .................................................................................................................................. 102 Relationship: [FK_MonitoringStationParameters_MonitoringStations ] on [MonitoringStationParameters] ................................................................................................ 103 Relationship: [FK_MonitoringStationParameters_MonitoringTypes] on [MonitoringStationParameters] ................................................................................................ 104 Relationship: [FK_MonitoringStationParameters_Parameters] on [MonitoringStationParameters] ................................................................................................ 105

Table: dbo.MonitoringStations .......................................................................................................... 106 Indexes ............................................................................................................................................ 109

Index: PK_MonitoringStations on table dbo.MonitoringStations ......................................... 110 Index: IX_MonitoringStations_Pro gramID on table dbo.MonitoringStations ..................... 111 Index: IX_MonitoringStations_SiteCode on table dbo.MonitoringStations ......................... 113 Index: IX_MonitoringStations_SiteName on table dbo.MonitoringStations ........................ 115 Index: IX_MonitoringStations_State on table dbo.MonitoringStations ................................ 117 Index: IX_MonitoringStations_Latitude on table dbo.MonitoringStations........................... 119 Index: IX_MonitoringStations_Longitude on table dbo.MonitoringStations ...................... 121 Index: IX_MonitoringStations_HUC on table dbo.MonitoringStations ................................. 123

Relationships .................................................................................................................................. 125 Relationship: [FK_MonitoringStations_MonitoringPrograms] on [MonitoringStations] .... 126 Relationship: [FK_MonitoringStations_StateCodes] on [MonitoringStations].................... 127

Table: dbo.MonitoringTypes.............................................................................................................. 128 Indexes ............................................................................................................................................ 129

Index: PK__MonitoringTypes on table dbo.MonitoringTypes ............................................... 130 Index: IX_MonitoringTypes_TypeName on table dbo.MonitoringTypes .............................. 131

Table: dbo.Organizations................................................................................................................... 133 Indexes ............................................................................................................................................ 135

Index: PK_Organizations on table dbo.Organizations ........................................................... 136 Index: IX_Organizations_OrgName on table dbo.Organizations .......................................... 137

Table: dbo.OrgDescriptorList ............................................................................................................ 139 Indexes ............................................................................................................................................ 141

Index: PK_OrgDescriptorList on table dbo.OrgDescriptorList ............................................. 142 Relationships .................................................................................................................................. 143

Relationship: [FK_OrgDescriptorList_Web FormFieldTypes] on [OrgDescriptorList] ....... 144 Table: dbo.OrgDescriptors ................................................................................................................ 145

Indexes ............................................................................................................................................ 147 Index: PK_OrgDescriptors on table dbo.OrgDescriptors ...................................................... 148 Index: IX_OrgDescriptors_OrgID on table dbo.OrgDescriptors............................................ 150 Index: IX_OrgDescriptors_DescriptorName on table dbo.OrgDescriptors.......................... 151

Relationships .................................................................................................................................. 153

Page 4: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 4 of 325

Relationship: [FK_OrgDescriptors_Organi zations] on [OrgDescriptors] ........................... 154 Relationship: [FK_OrgDescriptors_OrgDescriptorList] on [OrgDescriptors] ..................... 155

Table: dbo.OrgDescriptorVocab........................................................................................................ 156 Indexes ............................................................................................................................................ 158

Index: PK_OrgDescriptorVocab on table dbo.OrgDescriptorVocab .................................... 159 Relationships .................................................................................................................................. 161

Relationship: [FK_OrgDescriptorVocab_OrgDescriptorList] on [OrgDescriptorVocab].... 162 Table: dbo.OrgUpdaters..................................................................................................................... 163

Indexes ............................................................................................................................................ 165 Index: PK_OrgUpdaters on table dbo.OrgUpdaters ............................................................... 166 Index: IX_OrgUpdaters_OrgID on table dbo.OrgUpdaters..................................................... 167 Index: IX_OrgUpdaters_UserID on table dbo.OrgUpdaters ................................................... 168

Relationships .................................................................................................................................. 169 Relationship: [FK_OrgUpdaters_DatabaseUsers] on [OrgUpdaters] ................................... 170 Relationship: [FK_OrgUpdaters_Organizations] on [OrgUpdaters] ..................................... 171

Table: dbo.Parameter_Groups .......................................................................................................... 172 Indexes ............................................................................................................................................ 174

Index: PK_Storet_Param_Groups on table dbo.Parameter_Groups .................................... 175 Table: dbo.Parameters ....................................................................................................................... 177

Indexes ............................................................................................................................................ 181 Index: PK_Parameters on table dbo.Parameters .................................................................... 182 Index: IX_Parameters_StoretCode on table dbo.Parameters ................................................ 183 Index: IX_Parameters_ParameterGroup on table dbo.Parameters ....................................... 184 Index: IX_Parameters_ParameterCategory on table dbo.Parameters .................................. 186 Index: IX_Parameters_ParameterName on table dbo.Parameters ........................................ 188 Index: IX_Parameters_SearchTags on table dbo.Parameters ............................................... 190 Index: IX_Parameters_ParameterDesc on table dbo.Parameters ......................................... 192

Relationships .................................................................................................................................. 194 Relationship: [FK_Parameters_Parameter_ Groups] on [Parameters] ................................ 195 Relationship: [FK_Parameters_Storet_Codes] on [Parameters] .......................................... 196

Table: dbo.StateCodes ....................................................................................................................... 197 Indexes ............................................................................................................................................ 199

Index: PK_StateCodes on table dbo.StateCodes ................................................................... 200 Index: IX_StateCodes_StateAbbrev iation on table dbo.StateCodes ................................... 201 Index: IX_StateCodes on table dbo.StateCodes ..................................................................... 203

Table: dbo.Storet_Codes ................................................................................................................... 204 Indexes ............................................................................................................................................ 205

Index: PK_USGS_Parameters on table dbo.Storet_Codes.................................................... 206 Table: dbo.WebAccessLog ................................................................................................................ 207

Indexes ............................................................................................................................................ 209 Index: PK_WebAccessLog on table dbo.WebAccessLog ..................................................... 210

Table: dbo.WebFormFieldTypes ....................................................................................................... 211 Indexes ............................................................................................................................................ 214

Index: PK_WebFormFieldTypes on table dbo.WebFormFieldTypes .................................... 215 Views ........................................................................................................................................................ 217

View: dbo.vwEmailLogin.................................................................................................................... 218 View: dbo.vwLoginInfo....................................................................................................................... 220 View: dbo.vwMonitoringDescriptorList ............................................................................................ 222 View: dbo.vwMonitoringDescriptorsSearch .................................................................................... 224 View: dbo.vwMonitoringDescriptorVocab........................................................................................ 226 View: dbo.vwMonitoringProgramDescriptors.................................................................................. 228 View: dbo.vwMonitoringProgramDescriptorsAll ............................................................................. 230 View: dbo.vwMonitoringPrograms.................................................................................................... 232 View: dbo.vwMonitoringStationParameters..................................................................................... 234 View: dbo.vwMonitoringStations ...................................................................................................... 237 View: dbo.vwMonitoringStationsMapping ....................................................................................... 240 View: dbo.vwMonitoringStationsParamsMapping .......................................................................... 243 View: dbo.vwOrganizationContacts.................................................................................................. 246 View: dbo.vwOrganizationDescriptorsSearch ................................................................................. 248 View: dbo.vwOrganizations ............................................................................................................... 250

Page 5: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 5 of 325

View: dbo.vwOrgDescriptorList ........................................................................................................ 252 View: dbo.vwOrgDescriptors............................................................................................................. 254 View: dbo.vwOrgDescriptorsAll ........................................................................................................ 256 View: dbo.vwOrgDescriptorVocab .................................................................................................... 258 View: dbo.vwOrgUpdaters ................................................................................................................. 260 View: dbo.vwParameters.................................................................................................................... 262 View: dbo.vwParameterSearch.......................................................................................................... 264 View: dbo.vwProgramContacts ......................................................................................................... 266 View: dbo.vwProgramDetailsURL ..................................................................................................... 269 View: dbo.vwStates ............................................................................................................................ 271 View: dbo.vwStatesCounties ............................................................................................................. 273 View: dbo.vwStoret_Param_Groups ................................................................................................. 275

Stored Procedures .................................................................................................................................. 277 Stored Procedure: dbo.procAddUpdateDescript orList ................................................................. 278 Stored Procedure: dbo.procAddUpdateOrganization..................................................................... 282 Stored Procedure: dbo.procAddUpdateOrgDescriptor .................................................................. 286 Stored Procedure: dbo.procAddUpdateParameter ......................................................................... 290 Stored Procedure: dbo.procAddUpdateProgram ............................................................................ 294 Stored Procedure: dbo.procAddUpdateProgramDescriptor.......................................................... 298 Stored Procedure: dbo.procAddUpdateStation............................................................................... 302 Stored Procedure: dbo.procAddUpdateStationParameters........................................................... 306 Stored Procedure: dbo.procAddUser ............................................................................................... 310 Stored Procedure: dbo.procEmailLogin........................................................................................... 314 Stored Procedure: dbo.procLogin .................................................................................................... 316

Functions ................................................................................................................................................. 319 Function: dbo.fnSplitString ............................................................................................................... 320

Server Info .................................................................................................................................................... 322 About............................................................................................................................................................. 325

Page 6: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 6 of 325

Database: NPS_WaterQuality

Database: NPS_WaterQuality Properties

Name: NPS_WaterQuality Owner: sa Compatibility Level: 80 Recovery Model: Full recovery model Status: Database is available for query Full Text Search Enabled: Primary File: D:\SQL_GCE\MSSQL\Data\NPS_WaterQuality_Data.MDF Version: 539 Database size, MB: 206.50 MB Allocated Space, KB: 133920 KB Data Space in Use and Reserved for Use, KB: 89880 KB Index Space Usage, KB: 42680 KB Allocated and Unused Space, KB: 1360 KB

Tables

Name Owner Data Size KB

Index Size KBCols Rows Description

CountyCodes dbo 128 240 3 3231 Lookup table for counties by federal state code

DatabaseRoles dbo 16 8 2 3 Lookup table of database user roles for determination of access rights

DatabaseUsers dbo 16 8 17 20 Contact information for registered database users

Logins dbo 16 8 4 20 Web portal login information for registered database users

MonitoringDescriptorList dbo 16 8 7 17 Table defining metadata descriptor

fields for monitoring programs, with web form display information

MonitoringDescriptorVocab dbo 16 8 2 4 Controlled vocabularly terms for fields in MonitoringDescriptorList

MonitoringProgramDescriptors dbo 88 160 3 293 Table of metadata descriptors assigned to monitoring programs

MonitoringProgramParameters dbo 64 8 8 0 Junction table linking measurement parameters to monitoring programs

MonitoringPrograms dbo 64 56 9 41 Main table describing monitoring programs

MonitoringStationParameters dbo 26048 23464 8 286042 Junction table associating measured parameters with monitoring stations

MonitoringStations dbo 3264 12832 16 16182 Main table describing monitoring

stations (sites), linked to monitoring programs

MonitoringTypes dbo 32 8 3 8 Lookup table of monitoring activity types

Organizations dbo 32 24 9 21 Main table describing organizations

OrgDescriptorList dbo 16 8 7 8 Table defining metadata descriptor fields for organizations, with web form

Page 7: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 7 of 325

display information

OrgDescriptors dbo 48 16 3 93 Table of metadata descriptors assigned to organizations

OrgDescriptorVocab dbo 16 8 2 4 Controlled vocabularly terms for fields in OrgDescriptorList

OrgUpdaters dbo 48 8 2 29 Junction table listing ids of database

users authorized to update content for specified organizations

Parameter_Groups dbo 16 8 4 12 Lookup table of parameter groups

Parameters dbo 2240 2576 11 10780 Main table of measurement parameters,

linked to parameter groups and STORET codes

StateCodes dbo 48 8 3 55 Lookup table of state codes and abbreviations

Storet_Codes dbo 16 1736 3 15871 Lookup table of US EPA STORET parameter codes

WebAccessLog dbo 16 48 5 273 Table for logging portal web access (login events)

WebFormFieldTypes dbo 16 8 1 5 Lookup table of web form field types

Views

Name Owner Schema bound Encrypted Description

vwEmailLogin dbo

vwLoginInfo dbo

vwMonitoringDescriptorList dbo

vwMonitoringDescriptorsSearch dbo

vwMonitoringDescriptorVocab dbo

vwMonitoringProgramDescriptors dbo

vwMonitoringProgramDescriptorsAll dbo

vwMonitoringPrograms dbo

vwMonitoringStationParameters dbo

vwMonitoringStations dbo

vwMonitoringStationsMapping dbo

vwMonitoringStationsParamsMapping dbo

vwOrganizationContacts dbo

Page 8: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 8 of 325

vwOrganizationDescriptorsSearch dbo

vwOrganizations dbo

vwOrgDescriptorList dbo

vwOrgDescriptors dbo

vwOrgDescriptorsAll dbo

vwOrgDescriptorVocab dbo

vwOrgUpdaters dbo

vwParameters dbo

vwParameterSearch dbo

vwProgramContacts dbo

vwProgramDetailsURL dbo

vwStates dbo

vwStatesCounties dbo

vwStoret_Param_Groups dbo

Stored procedures

Name Owner Description

procAddUpdateDescriptorList dbo Stored procedure for adding and updating metadata descriptor fields in OrgDescriptorList and MonitoringDescriptorList

procAddUpdateOrganization dbo Stored procedure for adding and updating organization information

procAddUpdateOrgDescriptor dbo Stored procedure for adding and updating metadata descriptors for organizations

procAddUpdateParameter dbo Stored procedure for adding and updating measurement parameters

procAddUpdateProgram dbo Stored procedure for adding and updating monitoring program information

procAddUpdateProgramDescriptor dbo Stored procedure for adding and updating monitoring program metadata descriptors

procAddUpdateStation dbo Stored procedure for adding and updating monitoring station information

procAddUpdateStationParameters dbo Stored procedure for adding and updating parameters measured at monitoring stations

procAddUser dbo Stored procedure for adding a database user

Page 9: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 9 of 325

procEmailLogin dbo Stored procedure for retrieving login information based on a users email address for password recovery

procLogin dbo Stored procedure for authenticating users based on username and password

Functions

Name Owner Type Description

fnSplitString dbo SQL table-valued-function

Table-valued function that splits a comma-delimited string into records to support list-based queries

Database: NPS_WaterQuality Database Options

Settings: Auto Close: Settings: Auto Shrink: Settings: Auto Create Statistics: Settings: Auto Update Statistics: Settings: Use Quoted Identifiers: Settings: Torn Page Detection: Settings: Recursive Triggers: Settings: ANSI NULL default: Access: Read Only: Access: Single User: Access: Members of db_owner, dbcreator or sysadmin: Truncate Log On Checkpoint: Select Into/Bulkcopy: Cursor Close On Commit: Cursors in a Batch are with Local Scope:

See Also

Server overview

Page 10: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 10 of 325

Tables

Page 11: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 11 of 325

Table: dbo.CountyCodes

Table: dbo.CountyCodes Properties

Owner: dbo Located On: PRIMARY Data Size KB: 240 Index Size KB: 128 Rows: 3231 Description: Lookup table for counties by federal state code

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

StateCode char 2 State alphanumeric code

CountyCode char 3 County alphanumeric code

CountyName varchar 50 Country name

Indexes

Index Primary Unique Description

PK_CountyCodes

IX_CountyCodes_StateCode

IX_CountyCodes_CountyCode

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.USGS_Sites FK_USGS_Sites_CountyCodes PK_CountyCodes

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.StateCodes FK_CountyCodes_StateCodes PK_StateCodes

Objects that [dbo].[CountyCodes] depends on

Object Name Owner Object Type Dep Level

StateCodes dbo Table 1

Objects that depend on [dbo].[CountyCodes] Object Name Owner Object Type Dep Level

Page 12: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 12 of 325

USGS_Sites dbo Table 1

USGS_Stations dbo Table 2

vwUSGS_Sites_Main dbo View 3

USGS_Sites_Monitoring dbo Table 3

USGS_Station_Parameters dbo Table 3

vwUSGS_Groundwater_Stations dbo View 4

vwUSGS_Monitoring dbo View 4

vwUSGS_Station_Parameters dbo View 4

vwUSGS_Streamflow_Stations dbo View 4

vwUSGS_Undetermined_Stations dbo View 4

vwUSGS_Waterquality_Stations dbo View 4

vwUSGS_Groundwater_Stations_Parameters dbo View 5

vwUSGS_Streamflow_Stations_Parameters dbo View 5

vwUSGS_Waterquality_Stations_Parameters dbo View 5

Extended Properties

Name Value

MS_Orientation 0

SQL

CREATE TABLE [CountyCodes] ( [StateCode] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [CountyCode] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [CountyName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_CountyCodes] PRIMARY KEY CLUSTERED ( [StateCode], [CountyCode] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_CountyCodes_StateCodes] FOREIGN KEY ( [StateCode] ) REFERENCES [StateCodes] ( [StateCode] ) ) ON [PRIMARY] GO

Page 13: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 13 of 325

See Also

List of tables

Page 14: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 14 of 325

Indexes

Page 15: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 15 of 325

Index: PK_CountyCodes on table dbo.CountyCodes

Index: PK_CountyCodes on table dbo.CountyCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 128 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StateCode 0

CountyCode 0

Index: PK_CountyCodes on table dbo.CountyCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 5 Density: 0 Rows in the table: 3231 Rows sampled for statistics data: 3231 Distribution steps: 55

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_CountyCodes] ON [dbo].[CountyCodes]([StateCode], [CountyCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 16: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 16 of 325

Index: IX_CountyCodes_StateCode on table

dbo.CountyCodes

Index: IX_CountyCodes_StateCode on table dbo.CountyCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 56 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StateCode 0

Index: IX_CountyCodes_StateCode on table dbo.CountyCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 5 Density: 0 Rows in the table: 3231 Rows sampled for statistics data: 3231 Distribution steps: 55

SQL

CREATE INDEX [IX_CountyCodes_StateCode] ON [dbo].[CountyCodes]([StateCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 17: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 17 of 325

Page 18: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 18 of 325

Index: IX_CountyCodes_CountyCode on table

dbo.CountyCodes

Index: IX_CountyCodes_CountyCode on table dbo.CountyCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 48 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

CountyCode 0

Index: IX_CountyCodes_CountyCode on table dbo.CountyCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 5 Density: 3.952098E-04 Rows in the table: 3231 Rows sampled for statistics data: 3231 Distribution steps: 200

SQL

CREATE INDEX [IX_CountyCodes_CountyCode] ON [dbo].[CountyCodes]([CountyCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 19: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 19 of 325

Page 20: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 20 of 325

Relationships

Page 21: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 21 of 325

Relationship: [FK_CountyCodes_StateCodes] on

[CountyCodes]

Relationship: [FK_CountyCodes_StateCodes] on [CountyCodes] Properties

Primary Table Owner: dbo Primary Table: StateCodes Primary Key or Unique Constraint: PK_StateCodes Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

StateCode StateCode char

SQL

ALTER TABLE [dbo].[CountyCodes] ADD CONSTRAINT [FK_CountyCodes_StateCodes] FOREIGN KEY ( [StateCode] ) REFERENCES [StateCodes] ( [StateCode] ) GO

See Also

Table [dbo.StateCodes] Table [dbo.CountyCodes]

Page 22: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 22 of 325

Table: dbo.DatabaseRoles

Table: dbo.DatabaseRoles Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 3 Description: Lookup table of database user roles for determination of access

rights

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

Role varchar 50 Database role

RoleDescription varchar 250 Role description

Indexes

Index Primary Unique Description

PK_DatabaseRoles

SQL

CREATE TABLE [DatabaseRoles] ( [Role] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [RoleDescription] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_DatabaseRoles] PRIMARY KEY CLUSTERED ( [Role] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 23: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 23 of 325

Indexes

Page 24: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 24 of 325

Index: PK_DatabaseRoles on table

dbo.DatabaseRoles

Index: PK_DatabaseRoles on table dbo.DatabaseRoles Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

Role 0

Index: PK_DatabaseRoles on table dbo.DatabaseRoles Statistics

Updated: Mar 28 2009 1:00AM Average key length: 8.666667 Density: 0.3333333 Rows in the table: 3 Rows sampled for statistics data: 3 Distribution steps: 3

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_DatabaseRoles] ON [dbo].[DatabaseRoles]([Role]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 25: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 25 of 325

Table: dbo.DatabaseUsers

Table: dbo.DatabaseUsers Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 20 Description: Contact information for registered database users

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

UserID varchar 50 User id (key)

NamePrefix varchar 5 Name prefix

GivenName varchar 50 Given (first) name

MiddleName varchar 50 Middle name

SurName varchar 50 Surname (last name)

NameSuffix varchar 5 Name suffix

Organization varchar 250 Organizational affiliation

Address1 varchar 250 Mailing address line 1

Address2 varchar 250 Mailing address line 2

Address3 varchar 250 Mailing address line 3

City varchar 100 City name

State char 2 State Abbreviation

PostalCode varchar 10 Zip code (+4)

Email varchar 100 Email address

Phone1 varchar 50 Phone number

Phone2 varchar 50 Alternate phone number

WebsiteUrl varchar 250 Web URL

Indexes

Page 26: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 26 of 325

Index Primary Unique Description

PK_DatabaseUsers

SQL

CREATE TABLE [DatabaseUsers] ( [UserID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [NamePrefix] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [GivenName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [MiddleName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [SurName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [NameSuffix] [varchar] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Organization] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Address1] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Address2] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Address3] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [City] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [State] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [PostalCode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Email] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Phone1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Phone2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [WebsiteUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , CONSTRAINT [PK_DatabaseUsers] PRIMARY KEY CLUSTERED ( [UserID] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 27: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 27 of 325

Indexes

Page 28: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 28 of 325

Index: PK_DatabaseUsers on table

dbo.DatabaseUsers

Index: PK_DatabaseUsers on table dbo.DatabaseUsers Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

UserID 0

Index: PK_DatabaseUsers on table dbo.DatabaseUsers Statistics

Updated: Mar 28 2009 1:00AM Average key length: 8.4 Density: 0.05 Rows in the table: 20 Rows sampled for statistics data: 20 Distribution steps: 20

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_DatabaseUsers] ON [dbo].[DatabaseUsers]([UserID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 29: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 29 of 325

Table: dbo.Logins

Table: dbo.Logins Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 20 Description: Web portal login information for registered database users

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

UserID varchar 50 User id

Password varchar 250 Password

Role varchar 50 ('User') Database role

DateExpires datetime 8 Expiration date of password

Indexes

Index Primary Unique Description

PK_Logins

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.DatabaseRoles FK_Logins_DatabaseRoles PK_DatabaseRoles

dbo.DatabaseUsers FK_Logins_DatabaseUsers PK_DatabaseUsers

SQL

CREATE TABLE [Logins] ( [UserID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Password] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Role] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_Logins_Role] DEFAULT ('User'), [DateExpires] [datetime] NULL , CONSTRAINT [PK_Logins] PRIMARY KEY CLUSTERED ( [UserID] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_Logins_DatabaseRoles] FOREIGN KEY ( [Role] ) REFERENCES [DatabaseRoles] ( [Role]

Page 30: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 30 of 325

) ON UPDATE CASCADE , CONSTRAINT [FK_Logins_DatabaseUsers] FOREIGN KEY ( [UserID] ) REFERENCES [DatabaseUsers] ( [UserID] ) ON DELETE CASCADE ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 31: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 31 of 325

Indexes

Page 32: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 32 of 325

Index: PK_Logins on table dbo.Logins

Index: PK_Logins on table dbo.Logins Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

UserID 0

Index: PK_Logins on table dbo.Logins Statistics

Updated: Mar 28 2009 1:00AM Average key length: 8.4 Density: 0.05 Rows in the table: 20 Rows sampled for statistics data: 20 Distribution steps: 20

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_Logins] ON [dbo].[Logins]([UserID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 33: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 33 of 325

Relationships

Page 34: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 34 of 325

Relationship: [FK_Logins_DatabaseRoles] on

[Logins]

Relationship: [FK_Logins_DatabaseRoles] on [Logins] Properties

Primary Table Owner: dbo Primary Table: DatabaseRoles Primary Key or Unique Constraint: PK_DatabaseRoles Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

Role Role varchar

SQL

ALTER TABLE [dbo].[Logins] ADD CONSTRAINT [FK_Logins_DatabaseRoles] FOREIGN KEY ( [Role] ) REFERENCES [DatabaseRoles] ( [Role] ) ON UPDATE CASCADE GO

See Also

Table [dbo.DatabaseRoles] Table [dbo.Logins]

Page 35: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 35 of 325

Relationship: [FK_Logins_DatabaseUsers] on

[Logins]

Relationship: [FK_Logins_DatabaseUsers] on [Logins] Properties

Primary Table Owner: dbo Primary Table: DatabaseUsers Primary Key or Unique Constraint: PK_DatabaseUsers Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

UserID UserID varchar

SQL

ALTER TABLE [dbo].[Logins] ADD CONSTRAINT [FK_Logins_DatabaseUsers] FOREIGN KEY ( [UserID] ) REFERENCES [DatabaseUsers] ( [UserID] ) ON DELETE CASCADE ON UPDATE CASCADE GO

See Also

Table [dbo.DatabaseUsers] Table [dbo.Logins]

Page 36: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 36 of 325

Table: dbo.MonitoringDescriptorList

Table: dbo.MonitoringDescriptorList Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 17 Description: Table defining metadata descriptor fields for monitoring programs, with web form

display information Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

DescriptorName varchar 50 Descriptor field name (key)

WebformInfo varchar 1000 Information to display on web forms

FieldType varchar 50 ('text') Web form field type

FieldSize int 4 (200) Web form field size

DisplayOnWeb bit 1 (1) Flag for web display (0 = no, 1 = yes)

WebSort tinyint 1 (255) Order to display on web forms

IsSearchable bit 1 (1) Flag indicating field is searchable

Indexes

Index Primary Unique Description

PK_MonitoringDescriptorList

Referenced Tables

Table Foreign Key Primary Key or Unique

Constraint

dbo.WebFormFieldTypes FK_MonitoringDescriptorList_WebFormFieldTypes PK_WebFormFieldTypes

SQL

CREATE TABLE [MonitoringDescriptorList] ( [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [WebformInfo] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [FieldType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_MonitoringDescriptorList_FieldType] DEFAULT ('text'), [FieldSize] [int] NOT NULL CONSTRAINT [DF_MonitoringDescriptorList_FieldSize] DEFAULT (200), [DisplayOnWeb] [bit] NOT NULL CONSTRAINT [DF_MonitoringDescriptorList_DisplayOnWeb] DEFAULT (1),

Page 37: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 37 of 325

[WebSort] [tinyint] NOT NULL CONSTRAINT [DF_MonitoringDescriptorList_WebSort] DEFAULT (255), [IsSearchable] [bit] NOT NULL CONSTRAINT [DF_MonitoringDescriptorList_IsSearchable] DEFAULT (1), CONSTRAINT [PK_MonitoringDescriptorList] PRIMARY KEY CLUSTERED ( [DescriptorName] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_MonitoringDescriptorList_WebFormFieldTypes] FOREIGN KEY ( [FieldType] ) REFERENCES [WebFormFieldTypes] ( [FieldType] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 38: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 38 of 325

Indexes

Page 39: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 39 of 325

Index: PK_MonitoringDescriptorList on table

dbo.MonitoringDescriptorList

Index: PK_MonitoringDescriptorList on table dbo.MonitoringDescriptorList Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

Index: PK_MonitoringDescriptorList on table dbo.MonitoringDescriptorList Statistics

Updated: Mar 28 2009 1:00AM Average key length: 19.6875 Density: 0.0625 Rows in the table: 16 Rows sampled for statistics data: 16 Distribution steps: 16

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringDescriptorList] ON [dbo].[MonitoringDescriptorList]([DescriptorName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 40: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 40 of 325

Page 41: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 41 of 325

Relationships

Page 42: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 42 of 325

Relationship: [FK_MonitoringDescriptorList_WebFormFieldTypes] on

[MonitoringDescriptorList]

Relationship: [FK_MonitoringDescriptorList_WebFormFieldTypes] on [MonitoringDescriptorList]

Properties

Primary Table Owner: dbo Primary Table: WebFormFieldTypes Primary Key or Unique Constraint: PK_WebFormFieldTypes Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

FieldType FieldType varchar

SQL

ALTER TABLE [dbo].[MonitoringDescriptorList] ADD CONSTRAINT [FK_MonitoringDescriptorList_WebFormFieldTypes] FOREIGN KEY ( [FieldType] ) REFERENCES [WebFormFieldTypes] ( [FieldType] ) ON UPDATE CASCADE GO

See Also

Table [dbo.WebFormFieldTypes] Table [dbo.MonitoringDescriptorList]

Page 43: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 43 of 325

Table: dbo.MonitoringDescriptorVocab

Table: dbo.MonitoringDescriptorVocab Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 4 Description: Controlled vocabularly terms for fields in MonitoringDescriptorList

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

DescriptorName varchar 50 Descriptor name

DescriptorValue varchar 500 Allowed value from controlled vocabulary

Indexes

Index Primary Unique Description

PK_MonitoringDescriptorVocab

Referenced Tables

Table Foreign Key Primary Key or Unique

Constraint

dbo.MonitoringDescriptorList FK_MonitoringDescriptorVocab_MonitoringDescriptorList PK_MonitoringDescriptorList

SQL

CREATE TABLE [MonitoringDescriptorVocab] ( [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [DescriptorValue] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_MonitoringDescriptorVocab] PRIMARY KEY CLUSTERED ( [DescriptorName], [DescriptorValue] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_MonitoringDescriptorVocab_MonitoringDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [MonitoringDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

Page 44: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 44 of 325

See Also

List of tables

Page 45: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 45 of 325

Indexes

Page 46: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 46 of 325

Index: PK_MonitoringDescriptorVocab on table

dbo.MonitoringDescriptorVocab

Index: PK_MonitoringDescriptorVocab on table dbo.MonitoringDescriptorVocab Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

DescriptorValue 0

Index: PK_MonitoringDescriptorVocab on table dbo.MonitoringDescriptorVocab Statistics

Updated: Mar 28 2009 1:00AM Average key length: 19.5 Density: 0 Rows in the table: 4 Rows sampled for statistics data: 4 Distribution steps: 2

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringDescriptorVocab] ON [dbo].[MonitoringDescriptorVocab]([DescriptorName], [DescriptorValue]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

Page 47: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 47 of 325

List of indexes

Page 48: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 48 of 325

Relationships

Page 49: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 49 of 325

Relationship: [FK_MonitoringDescriptorVocab_MonitoringDescriptor List]

on [MonitoringDescriptorVocab]

Relationship: [FK_MonitoringDescriptorVocab_MonitoringDescriptor List] on [MonitoringDescriptorVocab]

Properties

Primary Table Owner: dbo Primary Table: MonitoringDescriptorList Primary Key or Unique Constraint: PK_MonitoringDescriptorList Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

DescriptorName DescriptorName varchar

SQL

ALTER TABLE [dbo].[MonitoringDescriptorVocab] ADD CONSTRAINT [FK_MonitoringDescriptorVocab_MonitoringDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [MonitoringDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringDescriptorList] Table [dbo.MonitoringDescriptorVocab]

Page 50: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 50 of 325

Table: dbo.MonitoringProgramDescriptors

Table: dbo.MonitoringProgramDescriptors Properties

Owner: dbo Located On: PRIMARY Data Size KB: 160 Index Size KB: 88 Rows: 293 Description: Table of metadata descriptors assigned to monitoring programs

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

ProgramID int 4 Program id

DescriptorName varchar 50 Descriptor field name

DescriptorValue varchar 7900 Descriptor field value

Indexes

Index Primary Unique Description

PK_MonitoringProgramDescriptors

IX_MonitoringProgramDescriptors_ProgramID

IX_MonitoringProgramDescriptors_DescriptorName

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringDescriptorList FK_MonitoringProgramDescriptors_MonitoringDescriptorList PK_MonitoringDescriptorList

dbo.MonitoringPrograms FK_MonitoringProgramDescriptors_MonitoringPrograms PK_MonitoringPrograms

Objects that [dbo].[MonitoringProgramDescriptors] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

MonitoringPrograms dbo Table 2

Page 51: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 51 of 325

Objects that depend on [dbo].[MonitoringProgramDescriptors]

Object Name Owner Object Type Dep Level

vwMonitoringDescriptorsSearch dbo View 1

vwProgramContacts dbo View 1

SQL

CREATE TABLE [MonitoringProgramDescriptors] ( [ProgramID] [int] NOT NULL , [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [DescriptorValue] [varchar] (7900) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_MonitoringProgramDescriptors] PRIMARY KEY CLUSTERED ( [ProgramID], [DescriptorName] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_MonitoringProgramDescriptors_MonitoringDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [MonitoringDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringProgramDescriptors_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 52: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 52 of 325

Indexes

Page 53: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 53 of 325

Index: PK_MonitoringProgramDescriptors on table

dbo.MonitoringProgramDescriptors

Index: PK_MonitoringProgramDescriptors on table dbo.MonitoringProgramDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 88 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

DescriptorName 0

Index: PK_MonitoringProgramDescriptors on table dbo.MonitoringProgramDescriptors Statistics

Updated: Mar 28 2009 1:00AM Average key length: 23.76792 Density: 2.445961E-02 Rows in the table: 293 Rows sampled for statistics data: 293 Distribution steps: 35

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringProgramDescriptors] ON [dbo].[MonitoringProgramDescriptors]([ProgramID], [DescriptorName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

Page 54: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 54 of 325

List of indexes

Page 55: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 55 of 325

Index: IX_MonitoringProgramDescriptors_ProgramID on

table dbo.MonitoringProgramDescriptors

Index: IX_MonitoringProgramDescriptors_ProgramID on table dbo.MonitoringProgramDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 32 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

Index: IX_MonitoringProgramDescriptors_ProgramID on table dbo.MonitoringProgramDescriptors Statistics

Updated: Mar 28 2009 1:00AM Average key length: 23.76792 Density: 2.445961E-02 Rows in the table: 293 Rows sampled for statistics data: 293 Distribution steps: 35

SQL

CREATE INDEX [IX_MonitoringProgramDescriptors_ProgramID] ON [dbo].[MonitoringProgramDescriptors]([ProgramID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 56: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 56 of 325

Page 57: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 57 of 325

Index: IX_MonitoringProgramDescriptors_DescriptorName

on table dbo.MonitoringProgramDescriptors

Index: IX_MonitoringProgramDescriptors_DescriptorName on table dbo.MonitoringProgramDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 32 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

Index: IX_MonitoringProgramDescriptors_DescriptorName on table dbo.MonitoringProgramDescriptors Statistics

Updated: Mar 28 2009 1:00AM Average key length: 23.76792 Density: 0 Rows in the table: 293 Rows sampled for statistics data: 293 Distribution steps: 14

SQL

CREATE INDEX [IX_MonitoringProgramDescriptors_DescriptorName] ON [dbo].[MonitoringProgramDescriptors]([DescriptorName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 58: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 58 of 325

Page 59: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 59 of 325

Relationships

Page 60: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 60 of 325

Relationship:[FK_MonitoringProgramDescriptors_MonitoringDescrip

torList] on [MonitoringProgramDescriptors]

Relationship: [FK_MonitoringProgramDescriptors_MonitoringDescrip torList] on [MonitoringProgramDescriptors]

Properties

Primary Table Owner: dbo Primary Table: MonitoringDescriptorList Primary Key or Unique Constraint: PK_MonitoringDescriptorList Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

DescriptorName DescriptorName varchar

SQL

ALTER TABLE [dbo].[MonitoringProgramDescriptors] ADD CONSTRAINT [FK_MonitoringProgramDescriptors_MonitoringDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [MonitoringDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringDescriptorList] Table [dbo.MonitoringProgramDescriptors]

Page 61: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 61 of 325

Relationship:[FK_MonitoringProgramDescriptors_MonitoringProgram s]

on [MonitoringProgramDescriptors]

Relationship: [FK_MonitoringProgramDescriptors_MonitoringProgram s] on [MonitoringProgramDescriptors]

Properties

Primary Table Owner: dbo Primary Table: MonitoringPrograms Primary Key or Unique Constraint: PK_MonitoringPrograms Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ProgramID ProgramID int

SQL

ALTER TABLE [dbo].[MonitoringProgramDescriptors] ADD CONSTRAINT [FK_MonitoringProgramDescriptors_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringPrograms] Table [dbo.MonitoringProgramDescriptors]

Page 62: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 62 of 325

Table: dbo.MonitoringProgramParameters

Table: dbo.MonitoringProgramParameters Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 64 Rows: 0 Description: Junction table linking measurement parameters to monitoring programs

Columns

Name Data Type LengthNULL Default IsIdentityIsGUID Description

ProgramID int 4 Monitoring program ID

TypeCode varchar 20 Monitoring program type code

ParameterID int 4 Measured parameter ID

ParamLocalName varchar 150 Local name or alias for parameter

DateStart datetime 8 Date monitoring for the parameter

began

DateEnd datetime 8 Date monitoring for the parameter

ended

DateUpdated datetime 8 (getdate()) Date information was last updated

Probabilistic bit 1 (0) Flag indicating probabilistic sampling

design

Indexes

Index Primary Unique Description

PK_MonitoringProgramParameters

IX_MonitoringProgramParameters_ProgramID

IX_MonitoringProgramParameters_TypeCode

IX_MonitoringProgramParameters_ParameterID

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringPrograms FK_MonitoringProgramParameters_MonitoringPrograms PK_MonitoringPrograms

dbo.MonitoringTypes FK_MonitoringProgramParameters_MonitoringTypes PK__MonitoringTypes

Page 63: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 63 of 325

dbo.Parameters FK_MonitoringProgramParameters_Parameters PK_Parameters

Objects that [dbo].[MonitoringProgramParameters] depends on

Object Name Owner Object Type Dep Level

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

Storet_Codes dbo Table 1

MonitoringPrograms dbo Table 2

Parameters dbo Table 2

SQL

CREATE TABLE [MonitoringProgramParameters] ( [ProgramID] [int] NOT NULL , [TypeCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterID] [int] NOT NULL , [ParamLocalName] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateStart] [datetime] NULL , [DateEnd] [datetime] NULL , [DateUpdated] [datetime] NOT NULL CONSTRAINT [DF_MonitoringProgramParameters_DateUpdated] DEFAULT (getdate()), [Probabilistic] [bit] NULL CONSTRAINT [DF_MonitoringProgramParameters_Probailistic] DEFAULT (0), CONSTRAINT [PK_MonitoringProgramParameters] PRIMARY KEY CLUSTERED ( [ProgramID], [TypeCode], [ParameterID] ) ON [PRIMARY] , CONSTRAINT [FK_MonitoringProgramParameters_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON DELETE CASCADE ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringProgramParameters_MonitoringTypes] FOREIGN KEY ( [TypeCode] ) REFERENCES [MonitoringTypes] ( [TypeCode] ) ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringProgramParameters_Parameters] FOREIGN KEY ( [ParameterID] ) REFERENCES [Parameters] ( [ParameterID] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

Page 64: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 64 of 325

See Also

List of tables

Page 65: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 65 of 325

Indexes

Page 66: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 66 of 325

Index: PK_MonitoringProgramParameters on table

dbo.MonitoringProgramParameters

Index: PK_MonitoringProgramParameters on table dbo.MonitoringProgramParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 64 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

TypeCode 0

ParameterID 0

Index: PK_MonitoringProgramParameters on table dbo.MonitoringProgramParameters Statistics

Updated: Average key length: Density: Rows in the table: Rows sampled for statistics data: Distribution steps:

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringProgramParameters] ON [dbo].[MonitoringProgramParameters]([ProgramID], [TypeCode], [ParameterID]) ON [PRIMARY] GO

See Also

Page 67: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 67 of 325

List of indexes

Page 68: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 68 of 325

Index: IX_MonitoringProgramParameters_ProgramID on

table dbo.MonitoringProgramParameters

Index: IX_MonitoringProgramParameters_ProgramID on table dbo.MonitoringProgramParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

Index: IX_MonitoringProgramParameters_ProgramID on table dbo.MonitoringProgramParameters Statistics

Updated: Average key length: Density: Rows in the table: Rows sampled for statistics data: Distribution steps:

SQL

CREATE INDEX [IX_MonitoringProgramParameters_ProgramID] ON [dbo].[MonitoringProgramParameters]([ProgramID]) ON [PRIMARY] GO

See Also

List of indexes

Page 69: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 69 of 325

Page 70: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 70 of 325

Index: IX_MonitoringProgramParameters_TypeCode on

table dbo.MonitoringProgramParameters

Index: IX_MonitoringProgramParameters_TypeCode on table dbo.MonitoringProgramParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

TypeCode 0

Index: IX_MonitoringProgramParameters_TypeCode on table dbo.MonitoringProgramParameters Statistics

Updated: Average key length: Density: Rows in the table: Rows sampled for statistics data: Distribution steps:

SQL

CREATE INDEX [IX_MonitoringProgramParameters_TypeCode] ON [dbo].[MonitoringProgramParameters]([TypeCode]) ON [PRIMARY] GO

See Also

List of indexes

Page 71: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 71 of 325

Page 72: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 72 of 325

Index: IX_MonitoringProgramParameters_ParameterID on

table dbo.MonitoringProgramParameters

Index: IX_MonitoringProgramParameters_ParameterID on table dbo.MonitoringProgramParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterID 0

Index: IX_MonitoringProgramParameters_ParameterID on table dbo.MonitoringProgramParameters Statistics

Updated: Average key length: Density: Rows in the table: Rows sampled for statistics data: Distribution steps:

SQL

CREATE INDEX [IX_MonitoringProgramParameters_ParameterID] ON [dbo].[MonitoringProgramParameters]([ParameterID]) ON [PRIMARY] GO

See Also

List of indexes

Page 73: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 73 of 325

Page 74: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 74 of 325

Relationships

Page 75: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 75 of 325

Relationship:[FK_MonitoringProgramParameters_MonitoringPrograms ] on

[MonitoringProgramParameters]

Relationship: [FK_MonitoringProgramParameters_MonitoringPrograms ] on [MonitoringProgramParameters]

Properties

Primary Table Owner: dbo Primary Table: MonitoringPrograms Primary Key or Unique Constraint: PK_MonitoringPrograms Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ProgramID ProgramID int

SQL

ALTER TABLE [dbo].[MonitoringProgramParameters] ADD CONSTRAINT [FK_MonitoringProgramParameters_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON DELETE CASCADE ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringPrograms] Table [dbo.MonitoringProgramParameters]

Page 76: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 76 of 325

Relationship: [FK_MonitoringProgramParameters_MonitoringTypes] on

[MonitoringProgramParameters]

Relationship: [FK_MonitoringProgramParameters_MonitoringTypes] on [MonitoringProgramParameters]

Properties

Primary Table Owner: dbo Primary Table: MonitoringTypes Primary Key or Unique Constraint: PK__MonitoringTypes Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

TypeCode TypeCode varchar

SQL

ALTER TABLE [dbo].[MonitoringProgramParameters] ADD CONSTRAINT [FK_MonitoringProgramParameters_MonitoringTypes] FOREIGN KEY ( [TypeCode] ) REFERENCES [MonitoringTypes] ( [TypeCode] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringTypes] Table [dbo.MonitoringProgramParameters]

Page 77: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 77 of 325

Relationship: [FK_MonitoringProgramParameters_Parameters] on

[MonitoringProgramParameters]

Relationship: [FK_MonitoringProgramParameters_Parameters] on [MonitoringProgramParameters] Properties

Primary Table Owner: dbo Primary Table: Parameters Primary Key or Unique Constraint: PK_Parameters Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ParameterID ParameterID int

SQL

ALTER TABLE [dbo].[MonitoringProgramParameters] ADD CONSTRAINT [FK_MonitoringProgramParameters_Parameters] FOREIGN KEY ( [ParameterID] ) REFERENCES [Parameters] ( [ParameterID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Parameters] Table [dbo.MonitoringProgramParameters]

Page 78: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 78 of 325

Table: dbo.MonitoringPrograms

Table: dbo.MonitoringPrograms Properties

Owner: dbo Located On: PRIMARY Data Size KB: 56 Index Size KB: 64 Rows: 41 Description: Main table describing monitoring programs

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

ProgramID int 4 Program id (artificial key)

OrgID int 4 Project id (foreign key)

ProgramName varchar 250 Program name

Acronym varchar 20 Program acronym/abbreviation

Description varchar 4000 Program description

WebsiteUrl varchar 250 Web site URL

DateStart datetime 8 Date program started

DateEnd datetime 8 Date program ended

DateUpdated datetime 8 (getdate()) Date record last updated

Identity column

Name Seed Increment Not for replication

ProgramID 1 1

Indexes

Index Primary Unique Description

PK_MonitoringPrograms

IX_MonitoringPrograms_ProjectID

IX_MonitoringPrograms_OrgID

IX_MonitoringPrograms_ProgramName

Page 79: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 79 of 325

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.Organizations FK_MonitoringPrograms_Organizations PK_Organizations

SQL

CREATE TABLE [MonitoringPrograms] ( [ProgramID] [int] IDENTITY (1, 1) NOT NULL , [OrgID] [int] NOT NULL , [ProgramName] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Acronym] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Description] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [WebsiteUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateStart] [datetime] NULL , [DateEnd] [datetime] NULL , [DateUpdated] [datetime] NULL CONSTRAINT [DF_MonitoringPrograms_DateUpdated] DEFAULT (getdate()), CONSTRAINT [PK_MonitoringPrograms] PRIMARY KEY CLUSTERED ( [ProgramID] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_MonitoringPrograms_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] ( [OrgID] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 80: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 80 of 325

Indexes

Page 81: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 81 of 325

Index: PK_MonitoringPrograms on table

dbo.MonitoringPrograms

Index: PK_MonitoringPrograms on table dbo.MonitoringPrograms Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 64 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

Index: PK_MonitoringPrograms on table dbo.MonitoringPrograms Statistics

Updated: Mar 30 2009 9:38PM Average key length: 4 Density: 2.439024E-02 Rows in the table: 41 Rows sampled for statistics data: 41 Distribution steps: 5

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringPrograms] ON [dbo].[MonitoringPrograms]([ProgramID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 82: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 82 of 325

Page 83: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 83 of 325

Index: IX_MonitoringPrograms_Pro jectID on table

dbo.MonitoringPrograms

Index: IX_MonitoringPrograms_Pro jectID on table dbo.MonitoringPrograms Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

Index: IX_MonitoringPrograms_Pro jectID on table dbo.MonitoringPrograms Statistics

Updated: Mar 30 2009 9:38PM Average key length: 8 Density: 2.439024E-02 Rows in the table: 41 Rows sampled for statistics data: 41 Distribution steps: 17

SQL

CREATE INDEX [IX_MonitoringPrograms_ProjectID] ON [dbo].[MonitoringPrograms]([OrgID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 84: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 84 of 325

Page 85: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 85 of 325

Index: IX_MonitoringPrograms_OrgID on table

dbo.MonitoringPrograms

Index: IX_MonitoringPrograms_OrgID on table dbo.MonitoringPrograms Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

Index: IX_MonitoringPrograms_OrgID on table dbo.MonitoringPrograms Statistics

Updated: Mar 30 2009 9:38PM Average key length: 8 Density: 2.439024E-02 Rows in the table: 41 Rows sampled for statistics data: 41 Distribution steps: 17

SQL

CREATE INDEX [IX_MonitoringPrograms_OrgID] ON [dbo].[MonitoringPrograms]([OrgID]) ON [PRIMARY] GO

See Also

List of indexes

Page 86: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 86 of 325

Page 87: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 87 of 325

Index: IX_MonitoringPrograms_ProgramName on

table dbo.MonitoringPrograms

Index: IX_MonitoringPrograms_ProgramName on table dbo.MonitoringPrograms Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramName 0

Index: IX_MonitoringPrograms_ProgramName on table dbo.MonitoringPrograms Statistics

Updated: Mar 30 2009 9:38PM Average key length: 64.60976 Density: 0 Rows in the table: 41 Rows sampled for statistics data: 41 Distribution steps: 40

SQL

CREATE INDEX [IX_MonitoringPrograms_ProgramName] ON [dbo].[MonitoringPrograms]([ProgramName]) ON [PRIMARY] GO

See Also

List of indexes

Page 88: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 88 of 325

Page 89: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 89 of 325

Relationships

Page 90: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 90 of 325

Relationship: [FK_MonitoringPrograms_Organizations] on

[MonitoringPrograms]

Relationship: [FK_MonitoringPrograms_Organizations] on [MonitoringPrograms] Properties

Primary Table Owner: dbo Primary Table: Organizations Primary Key or Unique Constraint: PK_Organizations Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

OrgID OrgID int

SQL

ALTER TABLE [dbo].[MonitoringPrograms] ADD CONSTRAINT [FK_MonitoringPrograms_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] ( [OrgID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Organizations] Table [dbo.MonitoringPrograms]

Page 91: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 91 of 325

Table: dbo.MonitoringStationParameters

Table: dbo.MonitoringStationParameters Properties

Owner: dbo Located On: PRIMARY Data Size KB: 23464 Index Size KB: 26048 Rows: 286042 Description: Junction table associating measured parameters with monitoring stations

Columns

Name Data Type LengthNULL Default IsIdentityIsGUID Description

StationID int 4 Station id

TypeCode varchar 20 Monitoring program type (from

controlled vocabulary)

ParameterID int 4 Parameter id

ParamLocalName varchar 150 Parameter name used by the

monitoring program

DateStart datetime 8 Date of first observation

DateEnd datetime 8 Date of last observation

DateUpdated datetime 8 (getdate()) Date record was last updated

Probabilistic bit 1 (0) Probabilistic monitoring design flag

Indexes

Index Primary Unique Description

PK_MonitoringStationParameters

IX_MonitoringStationParameters_StationID

IX_MonitoringStationParameters_ParameterID

IX_MonitoringStationParameters_TypeCode

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringStations FK_MonitoringStationParameters_MonitoringStations PK_MonitoringStations

dbo.MonitoringTypes FK_MonitoringStationParameters_MonitoringTypes PK__MonitoringTypes

Page 92: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 92 of 325

dbo.Parameters FK_MonitoringStationParameters_Parameters PK_Parameters

SQL

CREATE TABLE [MonitoringStationParameters] ( [StationID] [int] NOT NULL , [TypeCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterID] [int] NOT NULL , [ParamLocalName] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateStart] [datetime] NULL , [DateEnd] [datetime] NULL , [DateUpdated] [datetime] NOT NULL CONSTRAINT [DF_MonitoringStationParameters_DateUpdated] DEFAULT (getdate()), [Probabilistic] [bit] NOT NULL CONSTRAINT [DF_MonitoringStationParameters_Probabilistic] DEFAULT(0), CONSTRAINT [PK_MonitoringStationParameters] PRIMARY KEY CLUSTERED ( [StationID], [TypeCode], [ParameterID] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_MonitoringStationParameters_MonitoringStations] FOREIGN KEY ( [StationID] ) REFERENCES [MonitoringStations] ( [StationID] ) ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringStationParameters_MonitoringTypes] FOREIGN KEY ( [TypeCode] ) REFERENCES [MonitoringTypes] ( [TypeCode] ) ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringStationParameters_Parameters] FOREIGN KEY ( [ParameterID] ) REFERENCES [Parameters] ( [ParameterID] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 93: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 93 of 325

Indexes

Page 94: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 94 of 325

Index: PK_MonitoringStationParameters on table

dbo.MonitoringStationParameters

Index: PK_MonitoringStationParameters on table dbo.MonitoringStationParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 26048 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StationID 0

TypeCode 0

ParameterID 0

Index: PK_MonitoringStationParameters on table dbo.MonitoringStationParameters Statistics

Updated: Mar 30 2009 1:31PM Average key length: 19.66512 Density: 8.257006E-03 Rows in the table: 284562 Rows sampled for statistics data: 53484 Distribution steps: 197

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringStationParameters] ON [dbo].[MonitoringStationParameters]([StationID], [TypeCode], [ParameterID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

Page 95: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 95 of 325

See Also

List of indexes

Page 96: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 96 of 325

Index: IX_MonitoringStationParameters_StationID on

table dbo.MonitoringStationParameters

Index: IX_MonitoringStationParameters_StationID on table dbo.MonitoringStationParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 6256 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StationID 0

Index: IX_MonitoringStationParameters_StationID on table dbo.MonitoringStationParameters Statistics

Updated: Mar 30 2009 1:31PM Average key length: 19.66512 Density: 8.257006E-03 Rows in the table: 284562 Rows sampled for statistics data: 53484 Distribution steps: 197

SQL

CREATE INDEX [IX_MonitoringStationParameters_StationID] ON [dbo].[MonitoringStationParameters]([StationID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 97: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 97 of 325

Page 98: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 98 of 325

Index: IX_MonitoringStationParameters_ParameterID on

table dbo.MonitoringStationParameters

Index: IX_MonitoringStationParameters_ParameterID on table dbo.MonitoringStationParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 5624 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterID 0

Index: IX_MonitoringStationParameters_ParameterID on table dbo.MonitoringStationParameters Statistics

Updated: Mar 30 2009 9:31PM Average key length: 19.66512 Density: 1.142415E-02 Rows in the table: 284562 Rows sampled for statistics data: 53484 Distribution steps: 200

SQL

CREATE INDEX [IX_MonitoringStationParameters_ParameterID] ON [dbo].[MonitoringStationParameters]([ParameterID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 99: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 99 of 325

Page 100: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 100 of 325

Index: IX_MonitoringStationParameters_TypeCode on

table dbo.MonitoringStationParameters

Index: IX_MonitoringStationParameters_TypeCode on table dbo.MonitoringStationParameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 5624 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

TypeCode 0

Index: IX_MonitoringStationParameters_TypeCode on table dbo.MonitoringStationParameters Statistics

Updated: Mar 30 2009 1:31PM Average key length: 19.64268 Density: 0 Rows in the table: 284562 Rows sampled for statistics data: 284562 Distribution steps: 6

SQL

CREATE INDEX [IX_MonitoringStationParameters_TypeCode] ON [dbo].[MonitoringStationParameters]([TypeCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 101: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 101 of 325

Page 102: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 102 of 325

Relationships

Page 103: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 103 of 325

Relationship: [FK_MonitoringStationParameters_MonitoringStations ] on

[MonitoringStationParameters]

Relationship: [FK_MonitoringStationParameters_MonitoringStations ] on [MonitoringStationParameters]

Properties

Primary Table Owner: dbo Primary Table: MonitoringStations Primary Key or Unique Constraint: PK_MonitoringStations Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

StationID StationID int

SQL

ALTER TABLE [dbo].[MonitoringStationParameters] ADD CONSTRAINT [FK_MonitoringStationParameters_MonitoringStations] FOREIGN KEY ( [StationID] ) REFERENCES [MonitoringStations] ( [StationID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringStations] Table [dbo.MonitoringStationParameters]

Page 104: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 104 of 325

Relationship: [FK_MonitoringStationParameters_MonitoringTypes] on

[MonitoringStationParameters]

Relationship: [FK_MonitoringStationParameters_MonitoringTypes] on [MonitoringStationParameters]

Properties

Primary Table Owner: dbo Primary Table: MonitoringTypes Primary Key or Unique Constraint: PK__MonitoringTypes Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

TypeCode TypeCode varchar

SQL

ALTER TABLE [dbo].[MonitoringStationParameters] ADD CONSTRAINT [FK_MonitoringStationParameters_MonitoringTypes] FOREIGN KEY ( [TypeCode] ) REFERENCES [MonitoringTypes] ( [TypeCode] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringTypes] Table [dbo.MonitoringStationParameters]

Page 105: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 105 of 325

Relationship: [FK_MonitoringStationParameters_Parameters] on

[MonitoringStationParameters]

Relationship: [FK_MonitoringStationParameters_Parameters] on [MonitoringStationParameters] Properties

Primary Table Owner: dbo Primary Table: Parameters Primary Key or Unique Constraint: PK_Parameters Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ParameterID ParameterID int

SQL

ALTER TABLE [dbo].[MonitoringStationParameters] ADD CONSTRAINT [FK_MonitoringStationParameters_Parameters] FOREIGN KEY ( [ParameterID] ) REFERENCES [Parameters] ( [ParameterID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Parameters] Table [dbo.MonitoringStationParameters]

Page 106: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 106 of 325

Table: dbo.MonitoringStations

Table: dbo.MonitoringStations Properties

Owner: dbo Located On: PRIMARY Data Size KB: 12832 Index Size KB: 3264 Rows: 16182 Description: Main table describing monitoring stations (sites), linked to monitoring

programs Columns

Name Data Type LengthNULL Default IsIdentityIsGUID Description

StationID int 4 Station id (artificial key)

ProgramID int 4 Monitoring program id (foreign key)

SiteCode varchar 50 Station code used by the sponsoring

program

SiteName varchar 200 Station name

Description varchar 2000 Station long description

State char 2 State the station is located in

County varchar 50 County the station is located in

Location varchar 250 Location description

Latitude real 4 Geographic latitude

Longitude real 4 Geographic longitude

HUC char 8 Hydrologic Unit Code

DateStart datetime 8 Date the station was established

DateEnd datetime 8 Date the station was decommissioned

DateUpdated datetime 8 (getdate()) Date the station record was updated

WebsiteUrl varchar 250 Url for site description web page

DataUrl varchar 250 Url for accessing station data

Identity column

Page 107: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 107 of 325

Name Seed Increment Not for replication

StationID 1 1

Indexes

Index Primary Unique Description

PK_MonitoringStations

IX_MonitoringStations_ProgramID

IX_MonitoringStations_SiteCode

IX_MonitoringStations_SiteName

IX_MonitoringStations_State

IX_MonitoringStations_Latitude

IX_MonitoringStations_Longitude

IX_MonitoringStations_HUC

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringPrograms FK_MonitoringStations_MonitoringPrograms PK_MonitoringPrograms

dbo.StateCodes FK_MonitoringStations_StateCodes IX_StateCodes_StateAbbreviation

SQL

CREATE TABLE [MonitoringStations] ( [StationID] [int] IDENTITY (1, 1) NOT NULL , [ProgramID] [int] NOT NULL , [SiteCode] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [SiteName] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Description] [varchar] (2000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [State] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [County] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Location] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Latitude] [real] NOT NULL , [Longitude] [real] NOT NULL , [HUC] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateStart] [datetime] NULL , [DateEnd] [datetime] NULL , [DateUpdated] [datetime] NULL CONSTRAINT [DF_MonitoringStations_DateUpdated] DEFAULT (getdate()), [WebsiteUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DataUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , CONSTRAINT [PK_MonitoringStations] PRIMARY KEY CLUSTERED ( [StationID] ) WITH FILLFACTOR = 90 ON [PRIMARY] ,

Page 108: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 108 of 325

CONSTRAINT [FK_MonitoringStations_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON UPDATE CASCADE , CONSTRAINT [FK_MonitoringStations_StateCodes] FOREIGN KEY ( [State] ) REFERENCES [StateCodes] ( [StateAbbreviation] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 109: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 109 of 325

Indexes

Page 110: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 110 of 325

Index: PK_MonitoringStations on table

dbo.MonitoringStations

Index: PK_MonitoringStations on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 3264 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StationID 0

Index: PK_MonitoringStations on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 4 Density: 6.179706E-05 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 3

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_MonitoringStations] ON [dbo].[MonitoringStations]([StationID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 111: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 111 of 325

Index: IX_MonitoringStations_Pro gramID on table

dbo.MonitoringStations

Index: IX_MonitoringStations_Pro gramID on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 216 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ProgramID 0

Index: IX_MonitoringStations_Pro gramID on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 8 Density: 6.179706E-04 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 18

SQL

CREATE INDEX [IX_MonitoringStations_ProgramID] ON [dbo].[MonitoringStations]([ProgramID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 112: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 112 of 325

Page 113: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 113 of 325

Index: IX_MonitoringStations_SiteCode on table

dbo.MonitoringStations

Index: IX_MonitoringStations_SiteCode on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 520 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

SiteCode 0

Index: IX_MonitoringStations_SiteCode on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 18.09022 Density: 8.098993E-05 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 200

SQL

CREATE INDEX [IX_MonitoringStations_SiteCode] ON [dbo].[MonitoringStations]([SiteCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 114: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 114 of 325

Page 115: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 115 of 325

Index: IX_MonitoringStations_SiteName on table

dbo.MonitoringStations

Index: IX_MonitoringStations_SiteName on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 520 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

SiteName 0

Index: IX_MonitoringStations_SiteName on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 21.39074 Density: 8.043963E-05 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 139

SQL

CREATE INDEX [IX_MonitoringStations_SiteName] ON [dbo].[MonitoringStations]([SiteName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 116: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 116 of 325

Page 117: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 117 of 325

Index: IX_MonitoringStations_State on table

dbo.MonitoringStations

Index: IX_MonitoringStations_State on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 232 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

State 0

Index: IX_MonitoringStations_State on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 6 Density: 0 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 4

SQL

CREATE INDEX [IX_MonitoringStations_State] ON [dbo].[MonitoringStations]([State]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 118: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 118 of 325

Page 119: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 119 of 325

Index: IX_MonitoringStations_Latitude on table

dbo.MonitoringStations

Index: IX_MonitoringStations_Latitude on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 216 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

Latitude 0

Index: IX_MonitoringStations_Latitude on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 8 Density: 1.05615E-04 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 192

SQL

CREATE INDEX [IX_MonitoringStations_Latitude] ON [dbo].[MonitoringStations]([Latitude]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 120: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 120 of 325

Page 121: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 121 of 325

Index: IX_MonitoringStations_Longitude on table

dbo.MonitoringStations

Index: IX_MonitoringStations_Longitude on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 216 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

Longitude 0

Index: IX_MonitoringStations_Longitude on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 8 Density: 1.167966E-04 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 194

SQL

CREATE INDEX [IX_MonitoringStations_Longitude] ON [dbo].[MonitoringStations]([Longitude]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 122: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 122 of 325

Page 123: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 123 of 325

Index: IX_MonitoringStations_HUC on table

dbo.MonitoringStations

Index: IX_MonitoringStations_HUC on table dbo.MonitoringStations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 336 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

HUC 0

Index: IX_MonitoringStations_HUC on table dbo.MonitoringStations Statistics

Updated: Mar 31 2009 12:54AM Average key length: 11.23174 Density: 0 Rows in the table: 16182 Rows sampled for statistics data: 16182 Distribution steps: 54

SQL

CREATE INDEX [IX_MonitoringStations_HUC] ON [dbo].[MonitoringStations]([HUC]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 124: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 124 of 325

Page 125: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 125 of 325

Relationships

Page 126: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 126 of 325

Relationship:[FK_MonitoringStations_MonitoringPrograms] on

[MonitoringStations]

Relationship: [FK_MonitoringStations_MonitoringPrograms] on [MonitoringStations] Properties

Primary Table Owner: dbo Primary Table: MonitoringPrograms Primary Key or Unique Constraint: PK_MonitoringPrograms Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ProgramID ProgramID int

SQL

ALTER TABLE [dbo].[MonitoringStations] ADD CONSTRAINT [FK_MonitoringStations_MonitoringPrograms] FOREIGN KEY ( [ProgramID] ) REFERENCES [MonitoringPrograms] ( [ProgramID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.MonitoringPrograms] Table [dbo.MonitoringStations]

Page 127: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 127 of 325

Relationship: [FK_MonitoringStations_StateCodes]

on [MonitoringStations]

Relationship: [FK_MonitoringStations_StateCodes] on [MonitoringStations] Properties

Primary Table Owner: dbo Primary Table: StateCodes Primary Key or Unique Constraint: IX_StateCodes_StateAbbreviation Delete Cascade: Update Cascade: Description:

SQL

ALTER TABLE [dbo].[MonitoringStations] ADD CONSTRAINT [FK_MonitoringStations_StateCodes] FOREIGN KEY ( [State] ) REFERENCES [StateCodes] ( [StateAbbreviation] ) ON UPDATE CASCADE GO

See Also

Table [dbo.StateCodes] Table [dbo.MonitoringStations]

Page 128: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 128 of 325

Table: dbo.MonitoringTypes

Table: dbo.MonitoringTypes Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 32 Rows: 8 Description: Lookup table of monitoring activity types

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

TypeCode varchar 20 Monitoring type code (key)

TypeName varchar 50 Monitoring type name

Description varchar 500 Monitoring type description

Indexes

Index Primary Unique Description

PK__MonitoringTypes

IX_MonitoringTypes_TypeName

SQL

CREATE TABLE [MonitoringTypes] ( [TypeCode] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [TypeName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Description] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , CONSTRAINT [PK__MonitoringTypes] PRIMARY KEY CLUSTERED ( [TypeCode] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 129: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 129 of 325

Indexes

Page 130: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 130 of 325

Index: PK__MonitoringTypes on table

dbo.MonitoringTypes

Index: PK__MonitoringTypes on table dbo.MonitoringTypes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 32 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

TypeCode 0

Index: PK__MonitoringTypes on table dbo.MonitoringTypes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 9.375 Density: 0.125 Rows in the table: 8 Rows sampled for statistics data: 8 Distribution steps: 8

SQL

CREATE UNIQUE CLUSTERED INDEX [PK__MonitoringTypes] ON [dbo].[MonitoringTypes]([TypeCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 131: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 131 of 325

Index: IX_MonitoringTypes_TypeName on table

dbo.MonitoringTypes

Index: IX_MonitoringTypes_TypeName on table dbo.MonitoringTypes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

TypeName 0

Index: IX_MonitoringTypes_TypeName on table dbo.MonitoringTypes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 28.75 Density: 0 Rows in the table: 8 Rows sampled for statistics data: 8 Distribution steps: 8

SQL

CREATE INDEX [IX_MonitoringTypes_TypeName] ON [dbo].[MonitoringTypes]([TypeName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 132: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 132 of 325

Page 133: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 133 of 325

Table: dbo.Organizations

Table: dbo.Organizations Properties

Owner: dbo Located On: PRIMARY Data Size KB: 24 Index Size KB: 32 Rows: 21 Description: Main table describing organizations

Columns

Name Data Type LengthNULLDefaultIsIdentityIsGUID Description

OrgID int 4 Organization id (key)

OrgName varchar 250 Organization name

Acronym varchar 20 Organizatino

Acronym/abbreviation

Description varchar 4000 Organization description

WebsiteUrl varchar 250 URL of the organization web site

LogoUrl varchar 250 URL of the organization logo

image

DateStart datetime 8 Starting date of the organization

DateEnd datetime 8 Ending date of the organization

DateUpdated datetime 8 Date of most recent record update

Identity column

Name Seed Increment Not for replication

OrgID 1 1

Indexes

Index Primary Unique Description

PK_Organizations

IX_Organizations_OrgName

SQL

CREATE TABLE [Organizations] ( [OrgID] [int] IDENTITY (1, 1) NOT NULL ,

Page 134: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 134 of 325

[OrgName] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Acronym] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Description] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [WebsiteUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [LogoUrl] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateStart] [datetime] NULL , [DateEnd] [datetime] NULL , [DateUpdated] [datetime] NOT NULL , CONSTRAINT [PK_Organizations] PRIMARY KEY CLUSTERED ( [OrgID] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 135: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 135 of 325

Indexes

Page 136: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 136 of 325

Index: PK_Organizations on table

dbo.Organizations

Index: PK_Organizations on table dbo.Organizations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 32 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

Index: PK_Organizations on table dbo.Organizations Statistics

Updated: Mar 30 2009 9:38PM Average key length: 4 Density: 4.761905E-02 Rows in the table: 21 Rows sampled for statistics data: 21 Distribution steps: 2

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_Organizations] ON [dbo].[Organizations]([OrgID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 137: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 137 of 325

Index: IX_Organizations_OrgName on table

dbo.Organizations

Index: IX_Organizations_OrgName on table dbo.Organizations Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgName 0

Index: IX_Organizations_OrgName on table dbo.Organizations Statistics

Updated: Mar 30 2009 9:38PM Average key length: 75.85714 Density: 0 Rows in the table: 21 Rows sampled for statistics data: 21 Distribution steps: 21

SQL

CREATE INDEX [IX_Organizations_OrgName] ON [dbo].[Organizations]([OrgName]) ON [PRIMARY] GO

See Also

List of indexes

Page 138: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 138 of 325

Page 139: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 139 of 325

Table: dbo.OrgDescriptorList

Table: dbo.OrgDescriptorList Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 8 Description: Table defining metadata descriptor fields for organizations, with web form

display information

Columns

Name Data Type Length NULLDefaultIsIdentityIsGUID Description

DescriptorName varchar 50 Descriptor name (key)

WebformInfo varchar 1000 Information to display on web forms

FieldType varchar 50 Type of web form field

FieldSize int 4 Web form width for field

DisplayOnWeb bit 1 Flag field to enable/disable web display

WebSort tinyint 1 Order for field display on the web

IsSearchable bit 1 (1) Flag indicating field is searchable

Indexes

Index Primary Unique Description

PK_OrgDescriptorList

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.WebFormFieldTypes FK_OrgDescriptorList_WebFormFieldTypes PK_WebFormFieldTypes

SQL

CREATE TABLE [OrgDescriptorList] ( [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [WebformInfo] [varchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [FieldType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [FieldSize] [int] NOT NULL , [DisplayOnWeb] [bit] NOT NULL , [WebSort] [tinyint] NOT NULL , [IsSearchable] [bit] NOT NULL CONSTRAINT [DF_OrgDescriptorList_IsSearchable] DEFAULT (1),

Page 140: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 140 of 325

CONSTRAINT [PK_OrgDescriptorList] PRIMARY KEY CLUSTERED ( [DescriptorName] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_OrgDescriptorList_WebFormFieldTypes] FOREIGN KEY ( [FieldType] ) REFERENCES [WebFormFieldTypes] ( [FieldType] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 141: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 141 of 325

Indexes

Page 142: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 142 of 325

Index: PK_OrgDescriptorList on table

dbo.OrgDescriptorList

Index: PK_OrgDescriptorList on table dbo.OrgDescriptorList Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

Index: PK_OrgDescriptorList on table dbo.OrgDescriptorList Statistics

Updated: Mar 30 2009 12:08PM Average key length: 14.375 Density: 0.125 Rows in the table: 8 Rows sampled for statistics data: 8 Distribution steps: 8

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_OrgDescriptorList] ON [dbo].[OrgDescriptorList]([DescriptorName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 143: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 143 of 325

Relationships

Page 144: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 144 of 325

Relationship: [FK_OrgDescriptorList_Web

FormFieldTypes] on [OrgDescriptorList]

Relationship: [FK_OrgDescriptorList_Web FormFieldTypes] on [OrgDescriptorList] Properties

Primary Table Owner: dbo Primary Table: WebFormFieldTypes Primary Key or Unique Constraint: PK_WebFormFieldTypes Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

FieldType FieldType varchar

SQL

ALTER TABLE [dbo].[OrgDescriptorList] ADD CONSTRAINT [FK_OrgDescriptorList_WebFormFieldTypes] FOREIGN KEY ( [FieldType] ) REFERENCES [WebFormFieldTypes] ( [FieldType] ) ON UPDATE CASCADE GO

See Also

Table [dbo.WebFormFieldTypes] Table [dbo.OrgDescriptorList]

Page 145: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 145 of 325

Table: dbo.OrgDescriptors

Table: dbo.OrgDescriptors Properties

Owner: dbo Located On: PRIMARY Data Size KB: 16 Index Size KB: 48 Rows: 93 Description: Table of metadata descriptors assigned to organizations

Columns

Name Data Type LengthNULLDefaultIsIdentityIsGUID Description

OrgID int 4 Organization id (key)

DescriptorName varchar 50 Descriptor field name

DescriptorValue varchar 7900 Descriptor field value (text

contents)

Indexes

Index Primary Unique Description

PK_OrgDescriptors

IX_OrgDescriptors_OrgID

IX_OrgDescriptors_DescriptorName

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.Organizations FK_OrgDescriptors_Organizations PK_Organizations

dbo.OrgDescriptorList FK_OrgDescriptors_OrgDescriptorList PK_OrgDescriptorList

SQL

CREATE TABLE [OrgDescriptors] ( [OrgID] [int] NOT NULL , [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [DescriptorValue] [varchar] (7900) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_OrgDescriptors] PRIMARY KEY CLUSTERED ( [OrgID], [DescriptorName] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_OrgDescriptors_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] (

Page 146: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 146 of 325

[OrgID] ) ON UPDATE CASCADE , CONSTRAINT [FK_OrgDescriptors_OrgDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [OrgDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 147: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 147 of 325

Indexes

Page 148: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 148 of 325

Index: PK_OrgDescriptors on table

dbo.OrgDescriptors

Index: PK_OrgDescriptors on table dbo.OrgDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 48 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

DescriptorName 0

Index: PK_OrgDescriptors on table dbo.OrgDescriptors Statistics

Updated: Mar 30 2009 12:08PM Average key length: 19.06452 Density: 4.301075E-02 Rows in the table: 93 Rows sampled for statistics data: 93 Distribution steps: 19

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_OrgDescriptors] ON [dbo].[OrgDescriptors]([OrgID], [DescriptorName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 149: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 149 of 325

Page 150: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 150 of 325

Index: IX_OrgDescriptors_OrgID on table

dbo.OrgDescriptors

Index: IX_OrgDescriptors_OrgID on table dbo.OrgDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

Index: IX_OrgDescriptors_OrgID on table dbo.OrgDescriptors Statistics

Updated: Mar 30 2009 12:08PM Average key length: 19.06452 Density: 4.301075E-02 Rows in the table: 93 Rows sampled for statistics data: 93 Distribution steps: 19

SQL

CREATE INDEX [IX_OrgDescriptors_OrgID] ON [dbo].[OrgDescriptors]([OrgID]) ON [PRIMARY]GO

See Also

List of indexes

Page 151: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 151 of 325

Index: IX_OrgDescriptors_DescriptorName on table

dbo.OrgDescriptors

Index: IX_OrgDescriptors_DescriptorName on table dbo.OrgDescriptors Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

Index: IX_OrgDescriptors_DescriptorName on table dbo.OrgDescriptors Statistics

Updated: Mar 30 2009 12:08PM Average key length: 19.06452 Density: 0 Rows in the table: 93 Rows sampled for statistics data: 93 Distribution steps: 7

SQL

CREATE INDEX [IX_OrgDescriptors_DescriptorName] ON [dbo].[OrgDescriptors]([DescriptorName]) ON [PRIMARY] GO

See Also

List of indexes

Page 152: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 152 of 325

Page 153: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 153 of 325

Relationships

Page 154: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 154 of 325

Relationship: [FK_OrgDescriptors_Organi zations]

on [OrgDescriptors]

Relationship: [FK_OrgDescriptors_Organi zations] on [OrgDescriptors] Properties

Primary Table Owner: dbo Primary Table: Organizations Primary Key or Unique Constraint: PK_Organizations Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

OrgID OrgID int

SQL

ALTER TABLE [dbo].[OrgDescriptors] ADD CONSTRAINT [FK_OrgDescriptors_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] ( [OrgID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Organizations] Table [dbo.OrgDescriptors]

Page 155: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 155 of 325

Relationship: [FK_OrgDescriptors_OrgDescriptorList] on

[OrgDescriptors]

Relationship: [FK_OrgDescriptors_OrgDescriptorList] on [OrgDescriptors] Properties

Primary Table Owner: dbo Primary Table: OrgDescriptorList Primary Key or Unique Constraint: PK_OrgDescriptorList Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

DescriptorName DescriptorName varchar

SQL

ALTER TABLE [dbo].[OrgDescriptors] ADD CONSTRAINT [FK_OrgDescriptors_OrgDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [OrgDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE GO

See Also

Table [dbo.OrgDescriptorList] Table [dbo.OrgDescriptors]

Page 156: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 156 of 325

Table: dbo.OrgDescriptorVocab

Table: dbo.OrgDescriptorVocab Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 4 Description: Controlled vocabularly terms for fields in OrgDescriptorList

Columns

Name Data Type LengthNULLDefaultIsIdentityIsGUID Description

DescriptorName varchar 50 Descriptor field name

DescriptorValue varchar 500 Descriptor field value (text

contents)

Indexes

Index Primary Unique Description

PK_OrgDescriptorVocab

Referenced Tables

Table Foreign Key Primary Key or Unique

Constraint

dbo.OrgDescriptorList FK_OrgDescriptorVocab_OrgDescriptorList PK_OrgDescriptorList

Objects that [dbo].[OrgDescriptorVocab] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

Objects that depend on [dbo].[OrgDescriptorVocab]

Object Name Owner Object Type Dep Level

vwOrgDescriptorVocab dbo View 1

SQL

CREATE TABLE [OrgDescriptorVocab] ( [DescriptorName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [DescriptorValue] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_OrgDescriptorVocab] PRIMARY KEY CLUSTERED ( [DescriptorName],

Page 157: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 157 of 325

[DescriptorValue] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_OrgDescriptorVocab_OrgDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [OrgDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 158: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 158 of 325

Indexes

Page 159: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 159 of 325

Index: PK_OrgDescriptorVocab on table

dbo.OrgDescriptorVocab

Index: PK_OrgDescriptorVocab on table dbo.OrgDescriptorVocab Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

DescriptorName 0

DescriptorValue 0

Index: PK_OrgDescriptorVocab on table dbo.OrgDescriptorVocab Statistics

Updated: Mar 30 2009 12:08PM Average key length: 15 Density: 0 Rows in the table: 4 Rows sampled for statistics data: 4 Distribution steps: 1

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_OrgDescriptorVocab] ON [dbo].[OrgDescriptorVocab]([DescriptorName], [DescriptorValue]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

Page 160: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 160 of 325

List of indexes

Page 161: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 161 of 325

Relationships

Page 162: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 162 of 325

Relationship:[FK_OrgDescriptorVocab_OrgDescriptorList] on

[OrgDescriptorVocab]

Relationship: [FK_OrgDescriptorVocab_OrgDescriptorList] on [OrgDescriptorVocab] Properties

Primary Table Owner: dbo Primary Table: OrgDescriptorList Primary Key or Unique Constraint: PK_OrgDescriptorList Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

DescriptorName DescriptorName varchar

SQL

ALTER TABLE [dbo].[OrgDescriptorVocab] ADD CONSTRAINT [FK_OrgDescriptorVocab_OrgDescriptorList] FOREIGN KEY ( [DescriptorName] ) REFERENCES [OrgDescriptorList] ( [DescriptorName] ) ON UPDATE CASCADE GO

See Also

Table [dbo.OrgDescriptorList] Table [dbo.OrgDescriptorVocab]

Page 163: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 163 of 325

Table: dbo.OrgUpdaters

Table: dbo.OrgUpdaters Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 48 Rows: 29 Description: Junction table listing ids of database users authorized to update content for

specified organizations

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

OrgID int 4 Organization id

UserID varchar 50 User id (authorized user foreign key)

Indexes

Index Primary Unique Description

PK_OrgUpdaters

IX_OrgUpdaters_OrgID

IX_OrgUpdaters_UserID

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.DatabaseUsers FK_OrgUpdaters_DatabaseUsers PK_DatabaseUsers

dbo.Organizations FK_OrgUpdaters_Organizations PK_Organizations

SQL

CREATE TABLE [OrgUpdaters] ( [OrgID] [int] NOT NULL , [UserID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_OrgUpdaters] PRIMARY KEY CLUSTERED ( [OrgID], [UserID] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_OrgUpdaters_DatabaseUsers] FOREIGN KEY ( [UserID] ) REFERENCES [DatabaseUsers] ( [UserID] ) ON DELETE CASCADE ON UPDATE CASCADE ,

Page 164: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 164 of 325

CONSTRAINT [FK_OrgUpdaters_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] ( [OrgID] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

See Also

List of tables

Page 165: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 165 of 325

Indexes

Page 166: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 166 of 325

Index: PK_OrgUpdaters on table dbo.OrgUpdaters

Index: PK_OrgUpdaters on table dbo.OrgUpdaters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 48 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

UserID 0

Index: PK_OrgUpdaters on table dbo.OrgUpdaters Statistics

Updated: Mar 30 2009 12:08PM Average key length: 12.41379 Density: 3.448276E-02 Rows in the table: 29 Rows sampled for statistics data: 29 Distribution steps: 4

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_OrgUpdaters] ON [dbo].[OrgUpdaters]([OrgID], [UserID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 167: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 167 of 325

Index: IX_OrgUpdaters_OrgID on table

dbo.OrgUpdaters

Index: IX_OrgUpdaters_OrgID on table dbo.OrgUpdaters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

OrgID 0

Index: IX_OrgUpdaters_OrgID on table dbo.OrgUpdaters Statistics

Updated: Mar 30 2009 12:08PM Average key length: 12.41379 Density: 3.448276E-02 Rows in the table: 29 Rows sampled for statistics data: 29 Distribution steps: 4

SQL

CREATE INDEX [IX_OrgUpdaters_OrgID] ON [dbo].[OrgUpdaters]([OrgID]) ON [PRIMARY] GO

See Also

List of indexes

Page 168: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 168 of 325

Index: IX_OrgUpdaters_UserID on table

dbo.OrgUpdaters

Index: IX_OrgUpdaters_UserID on table dbo.OrgUpdaters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

UserID 0

Index: IX_OrgUpdaters_UserID on table dbo.OrgUpdaters Statistics

Updated: Mar 30 2009 12:08PM Average key length: 12.41379 Density: 0 Rows in the table: 29 Rows sampled for statistics data: 29 Distribution steps: 4

SQL

CREATE INDEX [IX_OrgUpdaters_UserID] ON [dbo].[OrgUpdaters]([UserID]) ON [PRIMARY]GO

See Also

List of indexes

Page 169: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 169 of 325

Relationships

Page 170: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 170 of 325

Relationship: [FK_OrgUpdaters_DatabaseUsers]

on [OrgUpdaters]

Relationship: [FK_OrgUpdaters_DatabaseUsers] on [OrgUpdaters] Properties

Primary Table Owner: dbo Primary Table: DatabaseUsers Primary Key or Unique Constraint: PK_DatabaseUsers Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

UserID UserID varchar

SQL

ALTER TABLE [dbo].[OrgUpdaters] ADD CONSTRAINT [FK_OrgUpdaters_DatabaseUsers] FOREIGN KEY ( [UserID] ) REFERENCES [DatabaseUsers] ( [UserID] ) ON DELETE CASCADE ON UPDATE CASCADE GO

See Also

Table [dbo.DatabaseUsers] Table [dbo.OrgUpdaters]

Page 171: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 171 of 325

Relationship: [FK_OrgUpdaters_Organizations]

on [OrgUpdaters]

Relationship: [FK_OrgUpdaters_Organizations] on [OrgUpdaters] Properties

Primary Table Owner: dbo Primary Table: Organizations Primary Key or Unique Constraint: PK_Organizations Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

OrgID OrgID int

SQL

ALTER TABLE [dbo].[OrgUpdaters] ADD CONSTRAINT [FK_OrgUpdaters_Organizations] FOREIGN KEY ( [OrgID] ) REFERENCES [Organizations] ( [OrgID] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Organizations] Table [dbo.OrgUpdaters]

Page 172: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 172 of 325

Table: dbo.Parameter_Groups

Table: dbo.Parameter_Groups Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 12 Description: Lookup table of parameter groups

Columns

Name Data Type LengthNULLDefaultIsIdentityIsGUID Description

ParameterGroup varchar 50 Group name (key)

WebDisplayName varchar 200 Name for web display

NPS_Database bit 1 (1) Flag for inclusion in NPS

database

StoretParameterGroup bit 1 Flag indicating group drawn

from Storet

Indexes

Index Primary Unique Description

PK_Storet_Param_Groups

SQL

CREATE TABLE [Parameter_Groups] ( [ParameterGroup] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [WebDisplayName] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [NPS_Database] [bit] NOT NULL CONSTRAINT [DF_Storet_Param_Groups_NPS_Database] DEFAULT (1), [StoretParameterGroup] [bit] NOT NULL , CONSTRAINT [PK_Storet_Param_Groups] PRIMARY KEY CLUSTERED ( [ParameterGroup] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 173: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 173 of 325

Page 174: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 174 of 325

Indexes

Page 175: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 175 of 325

Index: PK_Storet_Param_Groups on table

dbo.Parameter_Groups

Index: PK_Storet_Param_Groups on table dbo.Parameter_Groups Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterGroup 0

Index: PK_Storet_Param_Groups on table dbo.Parameter_Groups Statistics

Updated: Mar 28 2009 1:00AM Average key length: 14.09091 Density: 9.090909E-02 Rows in the table: 11 Rows sampled for statistics data: 11 Distribution steps: 11

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_Storet_Param_Groups] ON [dbo].[Parameter_Groups]([ParameterGroup]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 176: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 176 of 325

Page 177: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 177 of 325

Table: dbo.Parameters

Table: dbo.Parameters Properties

Owner: dbo Located On: PRIMARY Data Size KB: 2576 Index Size KB: 2240 Rows: 10780 Description: Main table of measurement parameters, linked to parameter groups and

STORET codes Columns

Name Data Type LengthNULLDefaultIsIdentityIsGUID Description

ParameterID int 4 Artificial key

StoretCode char 5 US EPA Storet Code

ParameterGroup varchar 50 Parameter group

ParameterCategory varchar 100 General cateogry of parameter

ParameterName varchar 250 Name of parameter

ParameterDesc varchar 500 Full description of parameter, with

medium, units, methods

SampleMedium varchar 250 Medium from which parameter

measured, if applicable

ParameterUnits varchar 250 Units of measure, if applicable

ParameterMethods varchar 500 Measurement methodology, if

applicable

SearchTags varchar 500 Optional list of search tags for the

parameter

Updater varchar 50 ID of person last updating the record

Identity column

Name Seed Increment Not for replication

ParameterID 0 1

Indexes

Index Primary Unique Description

PK_Parameters

IX_Parameters_StoretCode

Page 178: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 178 of 325

IX_Parameters_ParameterGroup

IX_Parameters_ParameterCategory

IX_Parameters_ParameterName

IX_Parameters_SearchTags

IX_Parameters_ParameterDesc

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringProgramParameters FK_MonitoringProgramParameters_Parameters PK_Parameters

dbo.MonitoringStationParameters FK_MonitoringStationParameters_Parameters PK_Parameters

Referenced Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.Parameter_Groups FK_Parameters_Parameter_Groups PK_Storet_Param_Groups

dbo.Storet_Codes FK_Parameters_Storet_Codes PK_USGS_Parameters

Objects that [dbo].[Parameters] depends on

Object Name Owner Object Type Dep Level

Parameter_Groups dbo Table 1

Storet_Codes dbo Table 1

Objects that depend on [dbo].[Parameters]

Object Name Owner Object Type Dep Level

vwParameterSearch dbo View 1

MonitoringProgramParameters dbo Table 1

MonitoringStationParameters dbo Table 1

procAddUpdateParameter dbo Procedure 1

vwMonitoringStationParameters dbo View 2

vwMonitoringStations dbo View 2

vwMonitoringStationsMapping dbo View 2

Page 179: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 179 of 325

vwMonitoringStationsParamsMapping dbo View 2

procAddUpdateStationParameters dbo Procedure 2

Extended Properties

Name Value

MS_DefaultView 2

MS_Filter

MS_OrderBy Parameters.ParameterID

MS_OrderByOn

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE TABLE [Parameters] ( [ParameterID] [int] IDENTITY (0, 1) NOT NULL , [StoretCode] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [ParameterGroup] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterCategory] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterName] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterDesc] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [SampleMedium] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [ParameterUnits] [varchar] (250) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [ParameterMethods] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [SearchTags] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [Updater] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_Parameters] PRIMARY KEY CLUSTERED ( [ParameterID] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [FK_Parameters_Parameter_Groups] FOREIGN KEY ( [ParameterGroup] ) REFERENCES [Parameter_Groups] ( [ParameterGroup] ) ON UPDATE CASCADE , CONSTRAINT [FK_Parameters_Storet_Codes] FOREIGN KEY ( [StoretCode] ) REFERENCES [Storet_Codes] ( [StoretCode] ) ON UPDATE CASCADE ) ON [PRIMARY] GO

Page 180: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 180 of 325

See Also

List of tables

Page 181: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 181 of 325

Indexes

Page 182: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 182 of 325

Index: PK_Parameters on table dbo.Parameters

Index: PK_Parameters on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 2240 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterID 0

Index: PK_Parameters on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 4 Density: 9.276438E-05 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 3

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_Parameters] ON [dbo].[Parameters]([ParameterID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 183: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 183 of 325

Index: IX_Parameters_StoretCode on table

dbo.Parameters

Index: IX_Parameters_StoretCode on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 200 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StoretCode 0

Index: IX_Parameters_StoretCode on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 8.986086 Density: 9.276438E-05 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 200

SQL

CREATE INDEX [IX_Parameters_StoretCode] ON [dbo].[Parameters]([StoretCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 184: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 184 of 325

Index: IX_Parameters_ParameterGroup on table

dbo.Parameters

Index: IX_Parameters_ParameterGroup on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 280 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterGroup 0

Index: IX_Parameters_ParameterGroup on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 15.20325 Density: 0 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 10

SQL

CREATE INDEX [IX_Parameters_ParameterGroup] ON [dbo].[Parameters]([ParameterGroup]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 185: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 185 of 325

Page 186: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 186 of 325

Index: IX_Parameters_ParameterCategory on table

dbo.Parameters

Index: IX_Parameters_ParameterCategory on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 272 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterCategory 0

Index: IX_Parameters_ParameterCategory on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 14.41401 Density: 3.605025E-04 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 200

SQL

CREATE INDEX [IX_Parameters_ParameterCategory] ON [dbo].[Parameters]([ParameterCategory]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 187: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 187 of 325

Page 188: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 188 of 325

Index: IX_Parameters_ParameterName on table

dbo.Parameters

Index: IX_Parameters_ParameterName on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 352 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterName 0

Index: IX_Parameters_ParameterName on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 21.09926 Density: 3.21009E-04 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 114

SQL

CREATE INDEX [IX_Parameters_ParameterName] ON [dbo].[Parameters]([ParameterName]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 189: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 189 of 325

Page 190: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 190 of 325

Index: IX_Parameters_SearchTags on table

dbo.Parameters

Index: IX_Parameters_SearchTags on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 128 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

SearchTags 0

Index: IX_Parameters_SearchTags on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 4.001391 Density: 0 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 3

SQL

CREATE INDEX [IX_Parameters_SearchTags] ON [dbo].[Parameters]([SearchTags]) ON [PRIMARY] GO

See Also

List of indexes

Page 191: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 191 of 325

Page 192: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 192 of 325

Index: IX_Parameters_ParameterDesc on table

dbo.Parameters

Index: IX_Parameters_ParameterDesc on table dbo.Parameters Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 992 Fill Factor: 0 Don't Recompute Statistics: Description:

Index Columns

Name Descending

ParameterDesc 0

Index: IX_Parameters_ParameterDesc on table dbo.Parameters Statistics

Updated: Apr 2 2009 11:12AM Average key length: 82.45603 Density: 9.536566E-05 Rows in the table: 10780 Rows sampled for statistics data: 10780 Distribution steps: 59

SQL

CREATE INDEX [IX_Parameters_ParameterDesc] ON [dbo].[Parameters]([ParameterDesc]) ON [PRIMARY] GO

See Also

List of indexes

Page 193: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 193 of 325

Page 194: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 194 of 325

Relationships

Page 195: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 195 of 325

Relationship: [FK_Parameters_Parameter_

Groups] on [Parameters]

Relationship: [FK_Parameters_Parameter_ Groups] on [Parameters] Properties

Primary Table Owner: dbo Primary Table: Parameter_Groups Primary Key or Unique Constraint: PK_Storet_Param_Groups Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

ParameterGroup ParameterGroup varchar

SQL

ALTER TABLE [dbo].[Parameters] ADD CONSTRAINT [FK_Parameters_Parameter_Groups] FOREIGN KEY ( [ParameterGroup] ) REFERENCES [Parameter_Groups] ( [ParameterGroup] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Parameter_Groups] Table [dbo.Parameters]

Page 196: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 196 of 325

Relationship: [FK_Parameters_Storet_Codes] on

[Parameters]

Relationship: [FK_Parameters_Storet_Codes] on [Parameters] Properties

Primary Table Owner: dbo Primary Table: Storet_Codes Primary Key or Unique Constraint: PK_USGS_Parameters Delete Cascade: Update Cascade: Description:

Relationship Columns

Column Reference Column Type

StoretCode StoretCode char

SQL

ALTER TABLE [dbo].[Parameters] ADD CONSTRAINT [FK_Parameters_Storet_Codes] FOREIGN KEY ( [StoretCode] ) REFERENCES [Storet_Codes] ( [StoretCode] ) ON UPDATE CASCADE GO

See Also

Table [dbo.Storet_Codes] Table [dbo.Parameters]

Page 197: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 197 of 325

Table: dbo.StateCodes

Table: dbo.StateCodes Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 48 Rows: 55 Description: Lookup table of state codes and abbreviations

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

StateCode char 2 State alphanumeric code

StateAbbreviation char 2 State name abbreviation

StateName varchar 50 State name (full text)

Indexes

Index Primary Unique Description

PK_StateCodes

IX_StateCodes_StateAbbreviation

IX_StateCodes

SQL

CREATE TABLE [StateCodes] ( [StateCode] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [StateAbbreviation] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [StateName] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_StateCodes] PRIMARY KEY CLUSTERED ( [StateCode] ) WITH FILLFACTOR = 90 ON [PRIMARY] , CONSTRAINT [IX_StateCodes] UNIQUE NONCLUSTERED ( [StateAbbreviation] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

Page 198: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 198 of 325

List of tables

Page 199: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 199 of 325

Indexes

Page 200: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 200 of 325

Index: PK_StateCodes on table dbo.StateCodes

Index: PK_StateCodes on table dbo.StateCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 48 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StateCode 0

Index: PK_StateCodes on table dbo.StateCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 2 Density: 1.818182E-02 Rows in the table: 55 Rows sampled for statistics data: 55 Distribution steps: 55

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_StateCodes] ON [dbo].[StateCodes]([StateCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 201: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 201 of 325

Index: IX_StateCodes_StateAbbrev iation on table

dbo.StateCodes

Index: IX_StateCodes_StateAbbrev iation on table dbo.StateCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StateAbbreviation 0

Index: IX_StateCodes_StateAbbrev iation on table dbo.StateCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 4 Density: 0 Rows in the table: 55 Rows sampled for statistics data: 55 Distribution steps: 55

SQL

CREATE UNIQUE INDEX [IX_StateCodes_StateAbbreviation] ON [dbo].[StateCodes]([StateAbbreviation]) WITH IGNORE_DUP_KEY , FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 202: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 202 of 325

Page 203: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 203 of 325

Index: IX_StateCodes on table dbo.StateCodes

Index: IX_StateCodes on table dbo.StateCodes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StateAbbreviation 0

Index: IX_StateCodes on table dbo.StateCodes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 4 Density: 0 Rows in the table: 55 Rows sampled for statistics data: 55 Distribution steps: 55

SQL

CREATE UNIQUE INDEX [IX_StateCodes] ON [dbo].[StateCodes]([StateAbbreviation]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 204: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 204 of 325

Table: dbo.Storet_Codes

Table: dbo.Storet_Codes Properties

Owner: dbo Located On: PRIMARY Data Size KB: 1736 Index Size KB: 16 Rows: 15871 Description: Lookup table of US EPA STORET parameter codes

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

StoretCode char 5 U.S. EPA Storet Code

ParameterGroup varchar 50 Parameter grouping

ParameterDesc varchar 200 Parameter description

Indexes

Index Primary Unique Description

PK_USGS_Parameters

SQL

CREATE TABLE [Storet_Codes] ( [StoretCode] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterGroup] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [ParameterDesc] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_USGS_Parameters] PRIMARY KEY CLUSTERED ( [StoretCode] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 205: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 205 of 325

Indexes

Page 206: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 206 of 325

Index: PK_USGS_Parameters on table

dbo.Storet_Codes

Index: PK_USGS_Parameters on table dbo.Storet_Codes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

StoretCode 0

Index: PK_USGS_Parameters on table dbo.Storet_Codes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 5 Density: 6.3008E-05 Rows in the table: 15871 Rows sampled for statistics data: 15871 Distribution steps: 200

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_USGS_Parameters] ON [dbo].[Storet_Codes]([StoretCode]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 207: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 207 of 325

Table: dbo.WebAccessLog

Table: dbo.WebAccessLog Properties

Owner: dbo Located On: PRIMARY Data Size KB: 48 Index Size KB: 16 Rows: 273 Description: Table for logging portal web access (login events)

Columns

Name Data Type LengthNULL Default IsIdentityIsGUID Description

LoginID int 4 Login id (artificial key)

UserID varchar 50 User id for login

IP varchar 50 IP address for the login session

WebBrowser varchar 500 Web browser string from the HTTP

header

DateLogin datetime 8 (getdate()) Date of login

Identity column

Name Seed Increment Not for replication

LoginID 1 1

Indexes

Index Primary Unique Description

PK_WebAccessLog

Extended Properties

Name Value

MS_DefaultView 2

MS_Filter

MS_OrderBy

MS_OrderByOn

MS_Orientation 0

Page 208: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 208 of 325

MS_TableMaxRecords 100000

SQL

CREATE TABLE [WebAccessLog] ( [LoginID] [int] IDENTITY (1, 1) NOT NULL , [UserID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [IP] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [WebBrowser] [varchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [DateLogin] [datetime] NOT NULL CONSTRAINT [DF_WebAccessLog_DateLogin] DEFAULT (getdate()), CONSTRAINT [PK_WebAccessLog] PRIMARY KEY CLUSTERED ( [LoginID] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 209: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 209 of 325

Indexes

Page 210: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 210 of 325

Index: PK_WebAccessLog on table

dbo.WebAccessLog

Index: PK_WebAccessLog on table dbo.WebAccessLog Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

LoginID 0

Index: PK_WebAccessLog on table dbo.WebAccessLog Statistics

Updated: Mar 28 2009 1:00AM Average key length: 4 Density: 3.937008E-03 Rows in the table: 254 Rows sampled for statistics data: 254 Distribution steps: 4

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_WebAccessLog] ON [dbo].[WebAccessLog]([LoginID]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 211: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 211 of 325

Table: dbo.WebFormFieldTypes

Table: dbo.WebFormFieldTypes Properties

Owner: dbo Located On: PRIMARY Data Size KB: 8 Index Size KB: 16 Rows: 5 Description: Lookup table of web form field types

Columns

Name Data Type Length NULL Default IsIdentity IsGUID Description

FieldType varchar 50 Web form field type (key)

Indexes

Index Primary Unique Description

PK_WebFormFieldTypes

Referencing Tables

Table Foreign Key Primary Key or Unique Constraint

dbo.MonitoringDescriptorList FK_MonitoringDescriptorList_WebFormFieldTypes PK_WebFormFieldTypes

dbo.OrgDescriptorList FK_OrgDescriptorList_WebFormFieldTypes PK_WebFormFieldTypes

Objects that depend on [dbo].[WebFormFieldTypes]

Object Name Owner Object Type Dep Level

MonitoringDescriptorList dbo Table 1

OrgDescriptorList dbo Table 1

vwMonitoringDescriptorList dbo View 2

vwMonitoringProgramDescriptors dbo View 2

vwMonitoringProgramDescriptorsAll dbo View 2

vwOrgDescriptorList dbo View 2

vwOrgDescriptors dbo View 2

vwOrgDescriptorsAll dbo View 2

Page 212: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 212 of 325

MonitoringDescriptorVocab dbo Table 2

MonitoringProgramDescriptors dbo Table 2

OrgDescriptors dbo Table 2

OrgDescriptorVocab dbo Table 2

procAddUpdateDescriptorList dbo Procedure 2

procAddUpdateOrgDescriptor dbo Procedure 2

procAddUpdateProgramDescriptor dbo Procedure 2

vwMonitoringDescriptorsSearch dbo View 3

vwMonitoringDescriptorVocab dbo View 3

vwOrganizationContacts dbo View 3

vwOrganizationDescriptorsSearch dbo View 3

vwOrgDescriptorVocab dbo View 3

vwProgramContacts dbo View 3

Extended Properties

Name Value

MS_Orientation 0

SQL

CREATE TABLE [WebFormFieldTypes] ( [FieldType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , CONSTRAINT [PK_WebFormFieldTypes] PRIMARY KEY CLUSTERED ( [FieldType] ) WITH FILLFACTOR = 90 ON [PRIMARY] ) ON [PRIMARY] GO

See Also

List of tables

Page 213: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 213 of 325

Page 214: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 214 of 325

Indexes

Page 215: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 215 of 325

Index: PK_WebFormFieldTypes on table

dbo.WebFormFieldTypes

Index: PK_WebFormFieldTypes on table dbo.WebFormFieldTypes Properties

Clustered Index: Primary Key Index: Unique Index: Ignore Duplicates: Pad Index: Allow Row Locks: Allow Page Locks: Is computed column in index: Located On: PRIMARY Size KB: 16 Fill Factor: 90 Don't Recompute Statistics: Description:

Index Columns

Name Descending

FieldType 0

Index: PK_WebFormFieldTypes on table dbo.WebFormFieldTypes Statistics

Updated: Mar 28 2009 1:00AM Average key length: 6.6 Density: 0.2 Rows in the table: 5 Rows sampled for statistics data: 5 Distribution steps: 5

SQL

CREATE UNIQUE CLUSTERED INDEX [PK_WebFormFieldTypes] ON [dbo].[WebFormFieldTypes]([FieldType]) WITH FILLFACTOR = 90 ON [PRIMARY] GO

See Also

List of indexes

Page 216: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 216 of 325

Page 217: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 217 of 325

Views

Page 218: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 218 of 325

View: dbo.vwEmailLogin

View: dbo.vwEmailLogin Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

Email varchar 100 Email address

UserID varchar 50 User id

Password varchar 250 Password

DateExpires datetime 8 Expiration date of password (null for none)

Name varchar 164

Objects that [dbo].[vwEmailLogin] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Logins dbo Table 2

Objects that depend on [dbo].[vwEmailLogin]

Object Name Owner Object Type Dep Level

procEmailLogin dbo Procedure 1

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End

Page 219: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 219 of 325

Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Logins" Begin Extent = Top = 6 Left = 38 Bottom = 256 Right = 190 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "DatabaseUsers" Begin Extent = Top = 6 Left = 228 Bottom = 267 Right = 533 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights =

220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType =

1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwEmailLogin AS SELECT dbo.DatabaseUsers.Email, dbo.Logins.UserID, dbo.Logins.Password, dbo.Logins.DateExpires, ISNULL(dbo.DatabaseUsers.NamePrefix + ' ', '') + dbo.DatabaseUsers.GivenName + ISNULL(' ' + dbo.DatabaseUsers.MiddleName + ' ', ' ') + dbo.DatabaseUsers.SurName + ISNULL(' ' + dbo.DatabaseUsers.NameSuffix, '') AS NameFROM dbo.Logins INNER JOIN dbo.DatabaseUsers ON dbo.Logins.UserID = dbo.DatabaseUsers.UserID

See Also

List of views

Page 220: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 220 of 325

View: dbo.vwLoginInfo

View: dbo.vwLoginInfo Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

UserID varchar 50 User id (key)

Password varchar 250 Password

Role varchar 50

FullName varchar 164

Name varchar 101

DateExpires datetime 8 Expiration date of password (null for none)

Objects that [dbo].[vwLoginInfo] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Logins dbo Table 2

Objects that depend on [dbo].[vwLoginInfo]

Object Name Owner Object Type Dep Level

procLogin dbo Procedure 1

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End

Page 221: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 221 of 325

Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "DatabaseUsers" Begin Extent = Top = 6 Left = 38 Bottom = 387 Right = 306 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "Logins" Begin Extent = Top = 33 Left = 507 Bottom = 148 Right = 659 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin

DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwLoginInfo AS SELECT dbo.DatabaseUsers.UserID, dbo.Logins.Password, dbo.Logins.Role, ISNULL(dbo.DatabaseUsers.NamePrefix + ' ', '') + dbo.DatabaseUsers.GivenName + ISNULL(' ' + dbo.DatabaseUsers.MiddleName + ' ', ' ') + dbo.DatabaseUsers.SurName + ISNULL(' ' + dbo.DatabaseUsers.NameSuffix, '') AS FullName, dbo.DatabaseUsers.GivenName + ' ' + dbo.DatabaseUsers.SurName AS Name, dbo.Logins.DateExpires FROM dbo.DatabaseUsers INNER JOIN dbo.Logins ON dbo.DatabaseUsers.UserID = dbo.Logins.UserID

See Also

List of views

Page 222: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 222 of 325

View: dbo.vwMonitoringDescriptorList

View: dbo.vwMonitoringDescriptorList Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

DescriptorName varchar 50 Descriptor field name (key)

WebformInfo varchar 1000 Information to display on web forms

FieldType varchar 50 Web form field type

FieldSize int 4 Web form field size

DisplayOnWeb bit 1 Flag for web display (0 = no, 1 = yes)

WebSort tinyint 1 Order to display on web forms

Objects that [dbo].[vwMonitoringDescriptorList] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1 [56] 4 [18] 2))" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 9 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringDescriptorList" Begin Extent = Top =

Page 223: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 223 of 325

6 Left = 38 Bottom = 343 Right = 395 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = PaneHidden = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane =

Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy =

1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringDescriptorList AS SELECT DescriptorName, WebformInfo, FieldType, FieldSize, DisplayOnWeb, WebSort FROM dbo.MonitoringDescriptorList

See Also

List of views

Page 224: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 224 of 325

View: dbo.vwMonitoringDescriptorsSearch

View: dbo.vwMonitoringDescriptorsSearch Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

ProgramID int 4

DescriptorName varchar 50

DescriptorValue varchar 7900

Objects that [dbo].[vwMonitoringDescriptorsSearch] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

MonitoringPrograms dbo Table 2

MonitoringProgramDescriptors dbo Table 3

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[18] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = End End Begin SQLPane = End Begin DataPane =

Page 225: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 225 of 325

PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410

GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringDescriptorsSearch AS SELECT dbo.MonitoringPrograms.ProgramID, 'Name' AS DescriptorName, dbo.MonitoringPrograms.ProgramName AS DescriptorValue FROM dbo.MonitoringPrograms UNION ALL SELECT dbo.MonitoringPrograms.ProgramID, 'Description' AS DescriptorName, dbo.MonitoringPrograms.Description AS DescriptorValue FROM dbo.MonitoringPrograms WHERE (dbo.MonitoringPrograms.Description IS NOT NULL) UNION ALL SELECT dbo.MonitoringPrograms.ProgramID, 'Acronym' AS DescriptorName, dbo.MonitoringPrograms.Acronym AS DescriptorValue FROM dbo.MonitoringPrograms WHERE (dbo.MonitoringPrograms.Acronym IS NOT NULL) UNION ALL SELECT dbo.MonitoringProgramDescriptors.ProgramID, dbo.MonitoringProgramDescriptors.DescriptorName, dbo.MonitoringProgramDescriptors.DescriptorValue FROM dbo.MonitoringProgramDescriptors INNER JOIN dbo.MonitoringDescriptorList ON dbo.MonitoringProgramDescriptors.DescriptorName = dbo.MonitoringDescriptorList.DescriptorName WHERE (dbo.MonitoringDescriptorList.IsSearchable = 1)

See Also

List of views

Page 226: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 226 of 325

View: dbo.vwMonitoringDescriptorVocab

View: dbo.vwMonitoringDescriptorVocab Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

DescriptorName varchar 50 Descriptor field name (key)

DescriptorValue varchar 500 Allowed value

Objects that [dbo].[vwMonitoringDescriptorVocab] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

MonitoringDescriptorVocab dbo Table 3

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1 [56] 4 [18] 2))" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 9 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringDescriptorList" Begin Extent = Top = 6 Left = 38 Bottom = 230 Right = 280 End DisplayFlags = 280 TopColumn = 0 End

Begin Table = "MonitoringDescriptorVocab" Begin Extent = Top = 6 Left = 233 Bottom = 91 Right = 390 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = PaneHidden = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin

ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy =

1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

Page 227: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 227 of 325

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringDescriptorVocab AS SELECT dbo.MonitoringDescriptorList.DescriptorName, ISNULL(dbo.MonitoringDescriptorVocab.DescriptorValue, 'undefined') AS DescriptorValue FROM dbo.MonitoringDescriptorList LEFT OUTER JOIN dbo.MonitoringDescriptorVocab ON dbo.MonitoringDescriptorList.DescriptorName = dbo.MonitoringDescriptorVocab.DescriptorName WHERE (dbo.MonitoringDescriptorList.DisplayOnWeb = 1) AND (dbo.MonitoringDescriptorList.FieldType IN ('list', 'checkbox'))

See Also

List of views

Page 228: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 228 of 325

View: dbo.vwMonitoringProgramDescriptors

View: dbo.vwMonitoringProgramDescriptors Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

ProgramID int 4 Program id

DescriptorName varchar 50 Descriptor field name

DescriptorValue varchar 2000 Descriptor field value

WebformInfo varchar 1000 Information to display on web forms

FieldType varchar 50 Web form field type

FieldSize int 4 Web form field size

WebSort tinyint 1 Order to display on web forms

DisplayOnWeb bit 1 Flag for web display (0 = no, 1 = yes)

Objects that [dbo].[vwMonitoringProgramDescriptors] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1 [56] 4 [18] 2))" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End

Page 229: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 229 of 325

Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin

PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 9 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0

End Begin Tables = Begin Table = "MonitoringProgramDescriptors" Begin Extent = Top = 6 Left = 38 Bottom = 106 Right = 195 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringDescriptorList" Begin Extent = Top = 6 Left = 233 Bottom = 250 Right = 390 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = PaneHidden = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin

ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter

= 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringProgramDescriptors AS SELECT dbo.MonitoringProgramDescriptors.ProgramID, dbo.MonitoringProgramDescriptors.DescriptorName, dbo.MonitoringProgramDescriptors.DescriptorValue, dbo.MonitoringDescriptorList.WebformInfo, dbo.MonitoringDescriptorList.FieldType, dbo.MonitoringDescriptorList.FieldSize, dbo.MonitoringDescriptorList.WebSort, dbo.MonitoringDescriptorList.DisplayOnWeb FROM dbo.MonitoringProgramDescriptors INNER JOIN dbo.MonitoringDescriptorList ON dbo.MonitoringProgramDescriptors.DescriptorName = dbo.MonitoringDescriptorList.DescriptorName

See Also

List of views

Page 230: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 230 of 325

View: dbo.vwMonitoringProgramDescriptorsAll

View: dbo.vwMonitoringProgramDescriptorsAll Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

ProgramID int 4

DescriptorName varchar 50

DescriptorValue varchar 2000 Descriptor field value

WebformInfo varchar 1000

FieldType varchar 50

FieldSize int 4

DisplayOnWeb bit 1

WebSort tinyint 1

Objects that [dbo].[vwMonitoringProgramDescriptorsAll] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration =

"(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration = 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes

= 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7

NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12

Page 231: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 231 of 325

NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14

NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table =

"P2" Begin Extent = Top = 6 Left = 38 Bottom = 106 Right = 195 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "SQ" Begin Extent = Top = 6 Left = 233 Bottom = 121 Right = 390 End DisplayFlags = 280 TopColumn = 0 End End End

Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11

Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350

Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringDescriptorsAll AS SELECT SQ.ProgramID, SQ.DescriptorName, P2.DescriptorValue, SQ.WebformInfo, SQ.FieldType, SQ.FieldSize, SQ.DisplayOnWeb, SQ.WebSort FROM dbo.MonitoringProgramDescriptors P2 RIGHT OUTER JOIN (SELECT CJ.ProgramID, CJ.DescriptorName, D2.WebformInfo, D2.FieldType, D2.FieldSize, D2.DisplayOnWeb, D2.WebSort FROM (SELECT P.ProgramID, D .DescriptorName FROM dbo.MonitoringProgramDescriptors P CROSS JOIN dbo.MonitoringDescriptorList D GROUP BY P.ProgramID, D .DescriptorName) CJ INNER JOIN dbo.MonitoringDescriptorList D2 ON CJ.DescriptorName = D2.DescriptorName) SQ ON P2.ProgramID = SQ.ProgramID AND P2.DescriptorName = SQ.DescriptorName

See Also

List of views

Page 232: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 232 of 325

View: dbo.vwMonitoringPrograms

View: dbo.vwMonitoringPrograms Properties

Owner: dbo Schema bound: Encrypted: Description:

Columns

Name Data Type Length NULL IsGUID Description

ProgramID int 4 Program id (artificial key)

OrgID int 4 Project id (foreign key)

OrgName varchar 250 Organization name

ProgramName varchar 250 Program name

Acronym varchar 20 � � Program acronym/abbreviation

Description varchar 4000 � � Program description

WebsiteUrl varchar 250 � �

DateStart datetime 8 � �

DateEnd datetime 8 � �

DateUpdated datetime 8 � �

Objects that [dbo].[vwMonitoringPrograms] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

MonitoringPrograms dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End

Page 233: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 233 of 325

Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[37] 4[38] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringPrograms" Begin Extent = Top = 6 Left = 38 Bottom = 316 Right = 296 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "Organizations" Begin Extent = Top = 6 Left = 334 Bottom = 121

Right = 486 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End

RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170

SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringPrograms AS SELECT dbo.MonitoringPrograms.ProgramID, dbo.MonitoringPrograms.OrgID, dbo.Organizations.OrgName, dbo.MonitoringPrograms.ProgramName, dbo.MonitoringPrograms.Acronym, dbo.MonitoringPrograms.Description, dbo.MonitoringPrograms.WebsiteUrl, dbo.MonitoringPrograms.DateStart, dbo.MonitoringPrograms.DateEnd, dbo.MonitoringPrograms.DateUpdated FROM dbo.MonitoringPrograms INNER JOIN dbo.Organizations ON dbo.MonitoringPrograms.OrgID = dbo.Organizations.OrgID

See Also

List of views

Page 234: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 234 of 325

View: dbo.vwMonitoringStationParameters

View: dbo.vwMonitoringStationParameters Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type LengthNULLIsGUID Description

ProgramID int 4 � � Monitoring program id (foreign key)

SiteCode varchar 50 � � Station code used by the sponsoring program

SiteName varchar 200 � � Station name

TypeCode varchar 20 � � Monitoring program type (from controlled vocabulary)

StationID int 4 � � Station id

ParameterID int 4 � � Parameter id

ParameterName varchar 250 � � Name of parameter

ParamLocalName varchar 150 � � Parameter name used by the monitoring program (if

different)

SearchTags varchar 1000 � � Optional list of search tags for the parameter

State char 2 � � State the station is located in

Location varchar 250 � � Location description

Latitude real 4 � � Geographic latitude

Longitude real 4 � � Geographic longitude

HUC char 8 � � Hydrologic Unit Code

DateStart datetime 8 � � Date the station was established

DateEnd datetime 8 � � Date the station was decommissioned

DateUpdated datetime 8 � � Date record was last updated

WebsiteUrl varchar 250 � � Url for site description web page

Page 235: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 235 of 325

DataUrl varchar 250 � � Url for accessing station data

Objects that [dbo].[vwMonitoringStationParameters] depends on

Object Name Owner Object Type Dep Level

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

StateCodes dbo Table 1

Storet_Codes dbo Table 1

MonitoringPrograms dbo Table 2

Parameters dbo Table 2

MonitoringStations dbo Table 3

MonitoringStationParameters dbo Table 4

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[51] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringStationParameters" Begin Extent = Top = 6 Left = 38 Bottom = 278 Right = 200 End DisplayFlags = 280 TopColumn =

0 End Begin Table = "MonitoringStations" Begin Extent = Top = 100 Left = 297 Bottom = 411 Right = 449 End DisplayFlags = 280 TopColumn = 0 End Begin Table

= "Parameters" Begin Extent = Top = 0 Left = 492 Bottom = 219 Right = 668 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin

DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 3450 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

Page 236: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 236 of 325

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwMonitoringStationParameters AS SELECT dbo.MonitoringStations.ProgramID, dbo.MonitoringStations.SiteCode, dbo.MonitoringStations.SiteName, dbo.MonitoringStationParameters.TypeCode, dbo.MonitoringStationParameters.StationID, dbo.MonitoringStationParameters.ParameterID, dbo.Parameters.ParameterName, dbo.MonitoringStationParameters.ParamLocalName, dbo.Parameters.SearchTags AS SearchTags, dbo.MonitoringStations.State, dbo.MonitoringStations.Location, dbo.MonitoringStations.Latitude, dbo.MonitoringStations.Longitude, dbo.MonitoringStations.HUC, dbo.MonitoringStations.DateStart, dbo.MonitoringStations.DateEnd, dbo.MonitoringStations.DateUpdated, dbo.MonitoringStations.WebsiteUrl, dbo.MonitoringStations.DataUrl FROM dbo.MonitoringStationParameters INNER JOIN dbo.MonitoringStations ON dbo.MonitoringStationParameters.StationID = dbo.MonitoringStations.StationID INNER JOIN dbo.Parameters ON dbo.MonitoringStationParameters.ParameterID = dbo.Parameters.ParameterID

See Also

List of views

Page 237: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 237 of 325

View: dbo.vwMonitoringStations

View: dbo.vwMonitoringStations Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

StationID int 4 � � Station id (artificial key)

ProgramID int 4 � � Monitoring program id (foreign key)

SiteCode varchar 50 � � Station code used by the sponsoring program

SiteName varchar 200 � � Station name

TypeCode varchar 20 � �

TypeName varchar 50 � �

Description varchar 2000 � � Station type description

State char 2 � � State the station is located in

StateName varchar 50 � �

County varchar 50 � � County the station is located in

Location varchar 250 � � Location description

Latitude real 4 � � Geographic latitude

Longitude real 4 � � Geographic longitude

DateStart datetime 8 � � Date the station was established

DateEnd datetime 8 � � Date the station was decommissioned

DateUpdated datetime 8 � � Date the station record was updated

Probabilistic bit 1 � � Flag for probabilistic sampling location

WebsiteUrl varchar 250 � �

Page 238: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 238 of 325

Objects that [dbo].[vwMonitoringStations] depends on

Object Name Owner Object Type Dep Level

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

StateCodes dbo Table 1

Storet_Codes dbo Table 1

MonitoringPrograms dbo Table 2

Parameters dbo Table 2

MonitoringStations dbo Table 3

MonitoringStationParameters dbo Table 4

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration =

"(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration = 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes

= 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7

NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12

NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14

NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table =

"MonitoringStations" Begin Extent = Top = 6 Left = 38 Bottom = 391 Right = 275 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "StateCodes" Begin Extent = Top = 168 Left = 673 Bottom = 268 Right = 841 End DisplayFlags = 280

TopColumn = 0 End Begin Table = "SQ" Begin Extent = Top = 6 Left = 313 Bottom = 121 Right = 465 End DisplayFlags = 280 TopColumn = 0 End End End Begin

SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11

Column = 1440 Alias = 1860 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350

Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

Page 239: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 239 of 325

MS_Filter

MS_OrderBy vwMonitoringStations.TypeCode

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwMonitoringStations AS SELECT dbo.MonitoringStations.StationID, dbo.MonitoringStations.ProgramID, dbo.MonitoringStations.SiteCode, dbo.MonitoringStations.SiteName, SQ.TypeCode, SQ.TypeName, dbo.MonitoringStations.Description, dbo.MonitoringStations.State, dbo.StateCodes.StateName, dbo.MonitoringStations.County, dbo.MonitoringStations.Location, dbo.MonitoringStations.Latitude, dbo.MonitoringStations.Longitude, dbo.MonitoringStations.DateStart, dbo.MonitoringStations.DateEnd, dbo.MonitoringStations.DateUpdated, SQ.Probabilistic, dbo.MonitoringStations.WebsiteUrl FROM dbo.MonitoringStations INNER JOIN dbo.StateCodes ON dbo.MonitoringStations.State = dbo.StateCodes.StateAbbreviation LEFT OUTER JOIN (SELECT MS.StationID, MS.TypeCode, MS.Probabilistic, MT.TypeName FROM (SELECT StationID, TypeCode, Probabilistic FROM dbo.MonitoringStationParameters GROUP BY StationID, TypeCode, Probabilistic) MS INNER JOIN dbo.MonitoringTypes MT ON MS.TypeCode = MT.TypeCode) SQ ON dbo.MonitoringStations.StationID = SQ.StationID

See Also

List of views

Page 240: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 240 of 325

View: dbo.vwMonitoringStationsMapping

View: dbo.vwMonitoringStationsMapping Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Organization id (key)

ProgramID int 4 � � Program id (artificial key)

StationID int 4 � � Station id (artificial key)

Organization varchar 50 � � Organizatino Acronym/abbreviation

SiteCode varchar 50 � � Station code used by the sponsoring program

SiteName varchar 200 � � Station name

TypeCode varchar 20 � �

TypeName varchar 50 � � Monitoring type name

Latitude real 4 � � Geographic latitude

Longitude real 4 � � Geographic longitude

HUC char 8 � � Hydrologic Unit Code

DateStart datetime 8 � � Date the station was established

DateEnd datetime 8 � � Date the station was decommissioned

WebsiteUrl varchar 250 � �

Objects that [dbo].[vwMonitoringStationsMapping] depends on

Object Name Owner Object Type Dep Level

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

Page 241: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 241 of 325

StateCodes dbo Table 1

Storet_Codes dbo Table 1

MonitoringPrograms dbo Table 2

Parameters dbo Table 2

MonitoringStations dbo Table 3

MonitoringStationParameters dbo Table 4

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[39] 4[28] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Organizations" Begin Extent = Top = 6 Left = 38 Bottom = 289 Right = 190 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringPrograms" Begin Extent = Top = 6 Left = 228 Bottom = 293

Right = 380 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringStations" Begin Extent = Top = 6 Left = 418 Bottom = 278 Right = 570 End DisplayFlags = 280 TopColumn = 2 End Begin Table = "SQ" Begin Extent =

Top = 6 Left = 608 Bottom = 91 Right = 760 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringTypes" Begin Extent = Top = 6 Left = 798 Bottom =

106 Right = 950 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = ""

End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue

= 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filt

MS_DiagramPane2 er = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 2

MS_Filter

MS_OrderBy

Page 242: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 242 of 325

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwMonitoringStationsMapping AS SELECT dbo.Organizations.OrgID, dbo.MonitoringPrograms.ProgramID, dbo.MonitoringStations.StationID, dbo.Organizations.Acronym AS Organization, dbo.MonitoringStations.SiteCode, dbo.MonitoringStations.SiteName, SQ.TypeCode, dbo.MonitoringTypes.TypeName, dbo.MonitoringStations.Latitude, dbo.MonitoringStations.Longitude, dbo.MonitoringStations.HUC, dbo.MonitoringStations.DateStart, dbo.MonitoringStations.DateEnd, COALESCE (dbo.MonitoringStations.WebsiteUrl, dbo.MonitoringPrograms.WebsiteUrl, dbo.Organizations.WebsiteUrl) AS WebsiteUrl FROM dbo.Organizations INNER JOIN dbo.MonitoringPrograms ON dbo.Organizations.OrgID = dbo.MonitoringPrograms.OrgID INNER JOIN dbo.MonitoringStations ON dbo.MonitoringPrograms.ProgramID = dbo.MonitoringStations.ProgramID INNER JOIN (SELECT StationID, TypeCode FROM dbo.MonitoringStationParameters GROUP BY StationID, TypeCode) SQ ON dbo.MonitoringStations.StationID = SQ.StationID INNER JOIN dbo.MonitoringTypes ON SQ.TypeCode COLLATE SQL_Latin1_General_CP1_CI_AS = dbo.MonitoringTypes.TypeCode

See Also

List of views

Page 243: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 243 of 325

View: dbo.vwMonitoringStationsParamsMapping

View: dbo.vwMonitoringStationsParamsMapping Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Organization id (key)

ProgramID int 4 � � Program id (artificial key)

StationID int 4 � � Station id (artificial key)

Organization varchar 20 � � Organizatino Acronym/abbreviation

SiteCode varchar 50 � � Station code used by the sponsoring program

SiteName varchar 200 � � Station name

TypeCode varchar 20 � �

TypeName varchar 50 � � Monitoring type name

Latitude real 4 � � Geographic latitude

Longitude real 4 � � Geographic longitude

ParameterGroup varchar 50 � � Parameter group

ParameterCategory varchar 100 � � General cateogry of parameter

ParameterName varchar 250 � � Name of parameter

SearchTags varchar 1000 � � Optional list of search tags for the parameter

DateStart datetime 8 � � Date the station was established

DateEnd datetime 8 � � Date the station was decommissioned

WebsiteUrl varchar 250 � �

Objects that [dbo].[vwMonitoringStationsParamsMapping] depends on

Object Name Owner Object Type Dep Level

Page 244: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 244 of 325

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

StateCodes dbo Table 1

Storet_Codes dbo Table 1

MonitoringPrograms dbo Table 2

Parameters dbo Table 2

MonitoringStations dbo Table 3

MonitoringStationParameters dbo Table 4

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4 Configuration =

"(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration = 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes

= 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7

NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12

NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14

NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table =

"Organizations" Begin Extent = Top = 6 Left = 38 Bottom = 121 Right = 190 End DisplayFlags = 280 TopColumn = 4 End Begin Table = "MonitoringPrograms" Begin

Extent = Top = 6 Left = 228 Bottom = 121 Right = 472 End DisplayFlags = 280 TopColumn = 4 End Begin Table = "MonitoringStations" Begin Extent = Top = 12 Left = 527 Bottom = 324 Right = 825 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringStationParameters" Begin Extent = Top = 6 Left = 863 Bottom = 334 Right = 1025 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "Parameters" Begin Extent = Top = 6 Left = 1063 Bottom = 332 Right =

1239 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "MonitoringTypes" Begin Extent = Top = 126 Left = 38 Bottom = 226 Right = 190 End DisplayFlags =

280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220

MS_DiagramPane2

End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

Page 245: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 245 of 325

MS_DiagramPaneCount 2

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 300000

SQL

CREATE VIEW dbo.vwMonitoringStationsParamsMapping AS SELECT dbo.Organizations.OrgID, dbo.MonitoringPrograms.ProgramID, dbo.MonitoringStations.StationID, dbo.Organizations.Acronym AS Organization, dbo.MonitoringStations.SiteCode, dbo.MonitoringStations.SiteName, dbo.MonitoringStationParameters.TypeCode, dbo.MonitoringTypes.TypeName, dbo.MonitoringStations.Latitude, dbo.MonitoringStations.Longitude, dbo.Parameters.ParameterGroup, dbo.Parameters.ParameterCategory, dbo.Parameters.ParameterName, dbo.Parameters.SearchTags, dbo.MonitoringStationParameters.DateStart, dbo.MonitoringStationParameters.DateEnd, COALESCE (dbo.MonitoringStations.WebsiteUrl, dbo.MonitoringPrograms.WebsiteUrl, dbo.Organizations.WebsiteUrl) AS WebsiteUrl FROM dbo.Organizations INNER JOIN dbo.MonitoringPrograms ON dbo.Organizations.OrgID = dbo.MonitoringPrograms.OrgID INNER JOIN dbo.MonitoringStations ON dbo.MonitoringPrograms.ProgramID = dbo.MonitoringStations.ProgramID INNER JOIN dbo.MonitoringStationParameters ON dbo.MonitoringStations.StationID = dbo.MonitoringStationParameters.StationID INNER JOIN dbo.Parameters ON dbo.MonitoringStationParameters.ParameterID = dbo.Parameters.ParameterID INNER JOIN dbo.MonitoringTypes ON dbo.MonitoringStationParameters.TypeCode = dbo.MonitoringTypes.TypeCode

See Also

List of views

Page 246: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 246 of 325

View: dbo.vwOrganizationContacts

View: dbo.vwOrganizationContacts Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Organization id (key)

Organization varchar 250 � � Organization name

WebsiteUrl varchar 250 � � URL of the organization web site

Contact varchar 8000 � �

Objects that [dbo].[vwOrganizationContacts] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

OrgDescriptors dbo Table 3

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin

Page 247: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 247 of 325

PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Organizations" Begin Extent = Top = 6 Left = 38 Bottom = 284 Right = 190 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "D" Begin Extent = Top = 6 Left = 228 Bottom = 91 Right = 380 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "D1" Begin Extent = Top = 6 Left = 418 Bottom = 91 Right = 570 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "D2" Begin Extent = Top = 6 Left = 608 Bottom = 91 Right = 760 End

DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwOrganizationContacts AS SELECT dbo.Organizations.OrgID, dbo.Organizations.OrgName AS Organization, dbo.Organizations.WebsiteUrl, COALESCE (D.ContactName + ' <' + D1.ContactEmail + '>', D.ContactName, 'email: ' + D1.ContactEmail, 'website: ' + D2.ContactUrl, '(none listed)') AS Contact FROM dbo.Organizations LEFT OUTER JOIN (SELECT OrgID, DescriptorValue AS ContactName FROM dbo.OrgDescriptors WHERE DescriptorName = 'Contact Name') D ON dbo.Organizations.OrgID = D.OrgID LEFT OUTER JOIN (SELECT OrgID, DescriptorValue AS ContactEmail FROM dbo.OrgDescriptors WHERE DescriptorName = 'Contact Email') D1 ON dbo.Organizations.OrgID = D1.OrgID LEFT OUTER JOIN (SELECT OrgID, DescriptorValue AS ContactUrl FROM dbo.OrgDescriptors WHERE DescriptorName = 'Contact Web Url') D2 ON dbo.Organizations.OrgID = D2.OrgID

See Also

List of views

Page 248: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 248 of 325

View: dbo.vwOrganizationDescriptorsSearch

View: dbo.vwOrganizationDescriptorsSearch Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Organization id (key)

DescriptorName varchar 50 � �

DescriptorValue varchar 7900 � �

Objects that [dbo].[vwOrganizationDescriptorsSearch] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

OrgDescriptors dbo Table 3

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[51] 4[3] 2) )" End

Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[26] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = End End Begin SQLPane = End Begin DataPane =

PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410

Page 249: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 249 of 325

GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwOrganization_Descriptors AS SELECT dbo.Organizations.OrgID, 'Name' AS DescriptorName, dbo.Organizations.OrgName AS DescriptorValue FROM dbo.Organizations UNION ALL SELECT dbo.Organizations.OrgID, 'Description' AS DescriptorName, dbo.Organizations.Description AS DescriptorValue FROM dbo.Organizations WHERE (dbo.Organizations.Description IS NOT NULL) UNION ALL SELECT dbo.Organizations.OrgID, 'Acronym' AS DescriptorName, dbo.Organizations.Acronym AS DescriptorValue FROM dbo.Organizations WHERE (dbo.Organizations.Acronym IS NOT NULL) UNION ALL SELECT dbo.OrgDescriptors.OrgID, dbo.OrgDescriptors.DescriptorName, dbo.OrgDescriptors.DescriptorValue FROM dbo.OrgDescriptors INNER JOIN dbo.OrgDescriptorList ON dbo.OrgDescriptors.DescriptorName = dbo.OrgDescriptorList.DescriptorName WHERE (dbo.OrgDescriptorList.IsSearchable = 1)

See Also

List of views

Page 250: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 250 of 325

View: dbo.vwOrganizations

View: dbo.vwOrganizations Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Organization id (key)

OrgName varchar 250 � � Organization name

Acronym varchar 20 � � Organizatino Acronym/abbreviation

Description varchar 4000 � �

WebsiteUrl varchar 250 � �

LogoUrl varchar 250 � �

DateStart datetime 8 � �

DateEnd datetime 8 � �

DateUpdated datetime 8 � �

Objects that [dbo].[vwOrganizations] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End

Page 251: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 251 of 325

Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Organizations" Begin Extent = Top = 6 Left =

38 Bottom = 252 Right = 190 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11

Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350

Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwOrganizations AS SELECT OrgID, OrgName, Acronym, Description, WebsiteUrl, LogoUrl, DateStart, DateEnd, DateUpdatedFROM dbo.Organizations

See Also

List of views

Page 252: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 252 of 325

View: dbo.vwOrgDescriptorList

View: dbo.vwOrgDescriptorList Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

DescriptorName varchar 50 � � Descriptor name (key)

WebformInfo varchar 1000 � � Information to display on web forms

FieldType varchar 50 � � Web form field type

FieldSize int 4 � � Web form field size

DisplayOnWeb bit 1 � � Flag for web form display (0 = no, 1 = yes)

WebSort tinyint 1 � � Sort order for web forms

Objects that [dbo].[vwOrgDescriptorList] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "OrgDescriptorList" Begin Extent = Top = 6 Left

Page 253: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 253 of 325

= 38 Bottom = 121 Right = 195 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin

ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720

Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwProjectDescriptorList AS SELECT DescriptorName, WebformInfo, FieldType, FieldSize, DisplayOnWeb, WebSort FROM dbo.OrgDescriptorList

See Also

List of views

Page 254: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 254 of 325

View: dbo.vwOrgDescriptors

View: dbo.vwOrgDescriptors Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � �

DescriptorName varchar 50 � � Name of the descriptor

DescriptorValue varchar 2000 � � Value of the descriptor

WebformInfo varchar 1000 � � Information to display on web forms

FieldType varchar 50 � � Web form field type

FieldSize int 4 � � Web form field size

WebSort tinyint 1 � � Sort order for web forms

DisplayOnWeb bit 1 � � Flag for web form display (0 = no, 1 = yes)

Objects that [dbo].[vwOrgDescriptors] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End

Page 255: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 255 of 325

Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin

PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "OrgDescriptors" Begin Extent = Top = 6 Left = 38 Bottom = 106 Right = 195 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "OrgDescriptorList" Begin Extent = Top = 6 Left = 233 Bottom = 121 Right = 390 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane =

End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column =

1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or =

1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwOrgDescriptors AS SELECT dbo.OrgDescriptors.OrgID, dbo.OrgDescriptors.DescriptorName, dbo.OrgDescriptors.DescriptorValue, dbo.OrgDescriptorList.WebformInfo, dbo.OrgDescriptorList.FieldType, dbo.OrgDescriptorList.FieldSize, dbo.OrgDescriptorList.WebSort, dbo.OrgDescriptorList.DisplayOnWeb FROM dbo.OrgDescriptors INNER JOIN dbo.OrgDescriptorList ON dbo.OrgDescriptors.DescriptorName = dbo.OrgDescriptorList.DescriptorName

See Also

List of views

Page 256: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 256 of 325

View: dbo.vwOrgDescriptorsAll

View: dbo.vwOrgDescriptorsAll Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � �

DescriptorName varchar 50 � �

DescriptorValue varchar 2000 � �

WebformInfo varchar 1000 � �

FieldType varchar 50 � �

FieldSize int 4 � �

DisplayOnWeb bit 1 � �

WebSort tinyint 1 � �

Objects that [dbo].[vwOrgDescriptorsAll] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End

Page 257: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 257 of 325

Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin

PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0

End Begin Tables = Begin Table = "P2" Begin Extent = Top = 6 Left = 38 Bottom = 106 Right = 195 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "SQ" Begin Extent = Top = 6 Left = 233 Bottom = 121 Right = 390 End DisplayFlags =

280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin

CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410

GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwOrgDescriptorsAll AS SELECT SQ.OrgID, SQ.DescriptorName, P2.DescriptorValue, SQ.WebformInfo, SQ.FieldType, SQ.FieldSize, SQ.DisplayOnWeb, SQ.WebSort FROM dbo.OrgDescriptors P2 RIGHT OUTER JOIN (SELECT CJ.OrgID, CJ.DescriptorName, D2.WebformInfo, D2.FieldType, D2.FieldSize, D2.DisplayOnWeb, D2.WebSort FROM (SELECT P.OrgID, D .DescriptorName FROM dbo.OrgDescriptors P CROSS JOIN dbo.OrgDescriptorList D GROUP BY P.OrgID, D .DescriptorName) CJ INNER JOIN dbo.OrgDescriptorList D2 ON CJ.DescriptorName = D2.DescriptorName) SQ ON P2.OrgID = SQ.OrgID AND P2.DescriptorName = SQ.DescriptorName

See Also

List of views

Page 258: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 258 of 325

View: dbo.vwOrgDescriptorVocab

View: dbo.vwOrgDescriptorVocab Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

DescriptorName varchar 50 � � Descriptor name (key)

DescriptorValue varchar 500 � � Allowed value

Objects that [dbo].[vwOrgDescriptorVocab] depends on

Object Name Owner Object Type Dep Level

WebFormFieldTypes dbo Table 1

OrgDescriptorList dbo Table 2

OrgDescriptorVocab dbo Table 3

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "OrgDescriptorList" Begin Extent = Top = 6 Left = 38 Bottom = 121 Right = 195 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "OrgDescriptorVocab" Begin Extent = Top = 6 Left = 233 Bottom = 91 Right = 390 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane

= End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column =

5220 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or =

1350 Or = 1350 End EndEnd

Page 259: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 259 of 325

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwOrgDescriptorVocab AS SELECT dbo.OrgDescriptorList.DescriptorName, ISNULL(dbo.OrgDescriptorVocab.DescriptorValue, 'undefined') AS DescriptorValue FROM dbo.OrgDescriptorList LEFT OUTER JOIN dbo.OrgDescriptorVocab ON dbo.OrgDescriptorList.DescriptorName = dbo.OrgDescriptorVocab.DescriptorName WHERE (dbo.OrgDescriptorList.DisplayOnWeb = 1) AND (dbo.OrgDescriptorList.FieldType IN ('list', 'checkbox'))

See Also

List of views

Page 260: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 260 of 325

View: dbo.vwOrgUpdaters

View: dbo.vwOrgUpdaters Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � �

UserID varchar 50 � �

Objects that [dbo].[vwOrgUpdaters] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

Logins dbo Table 2

OrgUpdaters dbo Table 2

Objects that depend on [dbo].[vwOrgUpdaters]

Object Name Owner Object Type Dep Level

procAddUpdateOrganization dbo Procedure 1

procAddUpdateOrgDescriptor dbo Procedure 1

procAddUpdateProgram dbo Procedure 1

procAddUpdateProgramDescriptor dbo Procedure 1

procAddUpdateStation dbo Procedure 1

procAddUpdateStationParameters dbo Procedure 1

Extended Properties

Name Value

Page 261: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 261 of 325

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = End End Begin SQLPane = End Begin DataPane =

PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410

GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

SQL

CREATE VIEW dbo.vwOrgUpdaters AS SELECT dbo.OrgUpdaters.OrgID, dbo.OrgUpdaters.UserID FROM dbo.OrgUpdaters UNION ALL SELECT dbo.Organizations.OrgID, dbo.Logins.UserID FROM dbo.Organizations CROSS JOIN dbo.Logins WHERE (dbo.Logins.Role IN ('Administrator', 'Super User'))

See Also

List of views

Page 262: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 262 of 325

View: dbo.vwParameters

View: dbo.vwParameters Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type LengthNULLIsGUID Description

ParameterID int 4 � � Artificial key

StoretCode char 5 � � US EPA Storet Code (must be unique and match master

list if provided)

ParameterGroup varchar 50 � � Parameter group

ParameterCategory varchar 100 � � General cateogry of parameter

ParameterName varchar 250 � � Name of parameter

ParameterDesc varchar 500 � � Full description of parameter, with medium, units,

methods

SampleMedium varchar 250 � � Medium from which parameter measured, if applicable

ParameterUnits varchar 250 � � Units of measure, if applicable

ParameterMethods varchar 1000 � � Measurement methodology, if applicable

Updater varchar 50 � � ID of person last updating the record

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1 [56] 4 [18] 2))" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin

Page 263: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 263 of 325

PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End ActivePaneConfig = 9 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Parameters" Begin Extent = Top = 6 Left = 38 Bottom = 272 Right = 251 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = PaneHidden = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin

ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy =

1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwParameters AS SELECT ParameterID, StoretCode, ParameterGroup, ParameterCategory, ParameterName, ParameterDesc, SampleMedium, ParameterUnits, ParameterMethods, Updater FROM dbo.Parameters

See Also

List of views

Page 264: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 264 of 325

View: dbo.vwParameterSearch

View: dbo.vwParameterSearch Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

ParameterID int 4 � � Artificial key

SearchGroup varchar 50 � � Parameter group

SearchCategory varchar 100 � � General cateogry of parameter

SearchName varchar 8000 � � Name of parameter

SearchDescription varchar 8000 � �

SearchNameTags varchar 8000 � �

SearchAll varchar 8000 � �

Objects that [dbo].[vwParameterSearch] depends on

Object Name Owner Object Type Dep Level

Parameter_Groups dbo Table 1

Storet_Codes dbo Table 1

Parameters dbo Table 2

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End

Page 265: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 265 of 325

Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Parameters" Begin Extent = Top = 6 Left = 38 Bottom = 412 Right = 546 End DisplayFlags = 280 TopColumn = 0 End End End

Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11

Column = 1785 Alias = 1485 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or =

1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwParameterSearch AS SELECT ParameterID, ParameterGroup AS SearchGroup, ParameterCategory AS SearchCategory, REPLACE(ParameterName, ' ,', '') AS SearchName, REPLACE(ParameterDesc, ' ,', '') AS SearchDescription, REPLACE(ParameterName, ' ,', '') + ISNULL(' ' + REPLACE(SearchTags, ' ,', ' '), '') AS SearchNameTags, ParameterGroup + ' ' + ParameterCategory + ' ' + REPLACE(ParameterName, ' ,', '') + ISNULL(' ' + REPLACE(ParameterDesc, ' ,', ''), '') + ISNULL(' ' + REPLACE(SearchTags, ' ,', ' '), '') AS SearchAll FROM dbo.Parameters WHERE (ParameterGroup <> 'Undefined')

See Also

List of views

Page 266: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 266 of 325

View: dbo.vwProgramContacts

View: dbo.vwProgramContacts Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

ProgramID int 4 � � Program id (artificial key)

OrgID int 4 � � Project id (foreign key)

ProgramName varchar 250 � � Program name

WebsiteUrl varchar 250 � � Web site URL

Contact varchar 8000 � �

Objects that [dbo].[vwProgramContacts] depends on

Object Name Owner Object Type Dep Level

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

MonitoringDescriptorList dbo Table 2

MonitoringPrograms dbo Table 2

MonitoringProgramDescriptors dbo Table 3

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End

Page 267: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 267 of 325

Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringPrograms" Begin Extent = Top = 6 Left = 38 Bottom = 276 Right = 190 End DisplayFlags = 280 TopColumn = 0 End

Begin Table = "D" Begin Extent = Top = 6 Left = 228 Bottom = 91 Right = 414 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "D1" Begin Extent = Top = 6

Left = 452 Bottom = 91 Right = 635 End DisplayFlags = 280 TopColumn = 0 End Begin Table = "D2" Begin Extent = Top = 6 Left = 673 Bottom = 91 Right = 845 End

DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwProgramContacts AS SELECT dbo.MonitoringPrograms.ProgramID, dbo.MonitoringPrograms.OrgID, dbo.MonitoringPrograms.ProgramName, dbo.MonitoringPrograms.WebsiteUrl, COALESCE (D.ProgramContactName + ' <' + D1.ProgramContactEmail + '>', D.ProgramContactName, 'email: ' + D1.ProgramContactEmail, 'website: ' + D2.ProgramContactUrl, '(none listed)') AS Contact FROM dbo.MonitoringPrograms LEFT OUTER JOIN (SELECT ProgramID, DescriptorValue AS ProgramContactName FROM dbo.MonitoringProgramDescriptors WHERE DescriptorName = 'Program Contact') D ON dbo.MonitoringPrograms.ProgramID = D.ProgramID LEFT OUTER JOIN (SELECT ProgramID, DescriptorValue AS ProgramContactEmail FROM dbo.MonitoringProgramDescriptors WHERE DescriptorName = 'Program Contact Email') D1 ON dbo.MonitoringPrograms.ProgramID = D1.ProgramID LEFT OUTER JOIN (SELECT ProgramID, DescriptorValue AS ProgramContactUrl FROM dbo.MonitoringProgramDescriptors WHERE DescriptorName = 'Program Contact Web Url') D2 ON dbo.MonitoringPrograms.ProgramID = D2.ProgramID

See Also

Page 268: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 268 of 325

List of views

Page 269: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 269 of 325

View: dbo.vwProgramDetailsURL

View: dbo.vwProgramDetailsURL Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

OrgID int 4 � � Project id (foreign key)

ProgramDetailsURL varchar 318 � �

ProgramName varchar 250 � � Program name

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "MonitoringPrograms" Begin Extent = Top = 6 Left = 38 Bottom = 121 Right = 190 End DisplayFlags = 280 TopColumn = 0 End

End End Begin SQLPane = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin

ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy =

1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

Page 270: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 270 of 325

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwProgramDetailsURL AS SELECT OrgID, '<a href="program_details.asp?id=' + CONVERT(varchar, ProgramID) + '">' + ProgramName + '</a>' AS ProgramDetailsURL, ProgramName FROM dbo.MonitoringPrograms

See Also

List of views

Page 271: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 271 of 325

View: dbo.vwStates

View: dbo.vwStates Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

StateAbbreviation char 2 � �

StateName varchar 50 � �

Objects that [dbo].[vwStates] depends on

Object Name Owner Object Type Dep Level

StateCodes dbo Table 1

Extended Properties

Name Value

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1 [56] 4 [18] 2))" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 9 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "StateCodes" Begin Extent = Top = 6 Left = 236

Bottom = 106 Right = 404 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = PaneHidden = End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin

ColumnWidths = 11 Column = 1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy =

1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Orientation 0

Page 272: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 272 of 325

SQL

CREATE VIEW dbo.vwStates AS SELECT StateAbbreviation, StateName FROM dbo.StateCodes

See Also

List of views

Page 273: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 273 of 325

View: dbo.vwStatesCounties

View: dbo.vwStatesCounties Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

StateCode char 2 � �

CountyCode char 3 � �

StateAbbreviation char 2 � �

StateName varchar 50 � �

CountyName varchar 50 � �

Objects that [dbo].[vwStatesCounties] depends on

Object Name Owner Object Type Dep Level

StateCodes dbo Table 1

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "CountyCodes" Begin Extent = Top = 6 Left = 38 Bottom = 106 Right = 190 End DisplayFlags = 280 TopColumn = 0 End Begin

Table = "StateCodes" Begin Extent = Top = 9 Left = 395 Bottom = 109 Right = 563 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane = End

Page 274: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 274 of 325

Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column = 1905 Alias =

900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or = 1350 Or = 1350

End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 10000

SQL

CREATE VIEW dbo.vwStatesCounties AS SELECT dbo.CountyCodes.StateCode, dbo.CountyCodes.CountyCode, dbo.StateCodes.StateAbbreviation, dbo.StateCodes.StateName, dbo.CountyCodes.CountyName FROM dbo.CountyCodes INNER JOIN dbo.StateCodes ON dbo.CountyCodes.StateCode = dbo.StateCodes.StateCode

See Also

List of views

Page 275: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 275 of 325

View: dbo.vwStoret_Param_Groups

View: dbo.vwStoret_Param_Groups Properties

Owner: dbo Schema bound: � Encrypted: � Description:

Columns

Name Data Type Length NULL IsGUID Description

StoretCode char 5 � � U.S. EPA Storet Code

ParameterGroup varchar 50 � � Parameter grouping

ParameterDesc varchar 200 � � Parameter description

Objects that [dbo].[vwStoret_Param_Groups] depends on

Object Name Owner Object Type Dep Level

Parameter_Groups dbo Table 1

Storet_Codes dbo Table 1

Extended Properties

Name Value

MS_DefaultView 2

MS_DiagramPane1

[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]Begin DesignProperties = Begin PaneConfigurations = Begin PaneConfiguration = 0 NumPanes = 4

Configuration = "(H (1[40] 4[20] 2[20] 3) )" End Begin PaneConfiguration = 1 NumPanes = 3 Configuration = "(H (1[50] 4[25] 3) )" End Begin PaneConfiguration

= 2 NumPanes = 3 Configuration = "(H (1[50] 2[25] 3) )" End Begin PaneConfiguration = 3 NumPanes = 3 Configuration = "(H (4 [30] 2 [40] 3))" End Begin PaneConfiguration = 4 NumPanes = 2 Configuration = "(H (1 [56] 3))" End Begin PaneConfiguration = 5 NumPanes = 2 Configuration = "(H (2 [66] 3))" End Begin PaneConfiguration = 6 NumPanes = 2 Configuration = "(H (4 [50] 3))" End Begin PaneConfiguration = 7 NumPanes = 1 Configuration = "(V (3))" End Begin PaneConfiguration = 8 NumPanes = 3 Configuration = "(H (1[56] 4[18] 2) )" End Begin PaneConfiguration = 9 NumPanes = 2 Configuration = "(H (1[75] 4) )" End

Begin PaneConfiguration = 10 NumPanes = 2 Configuration = "(H (1[66] 2) )" End Begin PaneConfiguration = 11 NumPanes = 2 Configuration = "(H (4 [60] 2))" End Begin PaneConfiguration = 12 NumPanes = 1 Configuration = "(H (1) )" End Begin

PaneConfiguration = 13 NumPanes = 1 Configuration = "(V (4))" End Begin PaneConfiguration = 14 NumPanes = 1 Configuration = "(V (2))" End

ActivePaneConfig = 8 End Begin DiagramPane = Begin Origin = Top = 0 Left = 0 End Begin Tables = Begin Table = "Parameter_Groups" Begin Extent = Top = 23 Left = 414 Bottom = 138 Right = 620 End DisplayFlags = 280 TopColumn = 0 End

Begin Table = "Storet_Codes" Begin Extent = Top = 6 Left = 38 Bottom = 201 Right = 198 End DisplayFlags = 280 TopColumn = 0 End End End Begin SQLPane =

End Begin DataPane = PaneHidden = Begin ParameterDefaults = "" End RowHeights = 220 End Begin CriteriaPane = Begin ColumnWidths = 11 Column =

Page 276: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 276 of 325

1440 Alias = 900 Table = 1170 Output = 720 Append = 1400 NewValue = 1170 SortType = 1350 SortOrder = 1410 GroupBy = 1350 Filter = 1350 Or = 1350 Or =

1350 Or = 1350 End EndEnd

MS_DiagramPaneCount 1

MS_Filter

MS_OrderBy

MS_OrderByOn �

MS_Orientation 0

MS_TableMaxRecords 100000

SQL

CREATE VIEW dbo.vwStoret_Param_Groups AS SELECT dbo.Storet_Codes.StoretCode, dbo.Parameter_Groups.ParameterGroup, dbo.Storet_Codes.ParameterDesc FROM dbo.Parameter_Groups INNER JOIN dbo.Storet_Codes ON dbo.Parameter_Groups.ParameterGroup = dbo.Storet_Codes.ParameterGroup WHERE (dbo.Parameter_Groups.NPS_Database = 1)

See Also

List of views

Page 277: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 277 of 325

Stored Procedures

Page 278: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 278 of 325

Stored Procedure: dbo.procAddUpdateDescript

orList

Stored Procedure: dbo.procAddUpdateDescript orList Properties

Owner: dbo Encrypted: �

Description:Stored procedure for adding and updating metadata descriptor fields in OrgDescriptorList and MonitoringDescriptorList

Stored Procedure: dbo.procAddUpdateDescript orList Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@Scope INPUT varchar 50

@DescriptorName INPUT varchar 50

@WebformInfo INPUT varchar 1000

@FieldType INPUT varchar 50

@FieldSize INPUT int 4

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateDescriptorList] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

WebFormFieldTypes dbo Table 1

Logins dbo Table 2

MonitoringDescriptorList dbo Table 2

OrgDescriptorList dbo Table 2

Permissions User/Role Select Insert Delete Update Execute DRI

Page 279: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 279 of 325

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateDescriptorList ( @Scope varchar(50), @DescriptorName varchar(50), @WebformInfo varchar(1000), @FieldType varchar(50), @FieldSize int, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF NOT EXISTS (SELECT UserID FROM dbo.Logins WHERE (UserID = @Updater) AND (Role = 'Administrator')) GOTO BadUser IF @Scope <> 'Organizations' AND @Scope <> 'MonitoringPrograms' GOTO BadScope IF NOT EXISTS (SELECT FieldType FROM dbo.WebFormFieldTypes WHERE (FieldType = @FieldType)) GOTO BadFieldType IF NULLIF(@DescriptorName,'') IS NULL SET @DescriptorName = NULL IF NULLIF(@WebformInfo,'') IS NULL SET @WebformInfo = NULL IF @DescriptorName IS NULL OR @WebformInfo IS NULL OR @FieldType IS NULL OR @FieldSize IS NULL GOTO MissingFields IF @Scope = 'Organizations' /* insert/update OrgDescriptorList */ BEGIN IF NOT EXISTS (SELECT DescriptorName FROM dbo.OrgDescriptorList WHERE (DescriptorName = @DescriptorName)) BEGIN INSERT INTO dbo.OrgDescriptorList (DescriptorName, WebformInfo, FieldType, FieldSize, DisplayOnWeb, WebSort) VALUES (@DescriptorName, @WebformInfo, @FieldType, @FieldSize, 1, 255) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully inserted descriptor field' AS ResultString END ELSE BEGIN UPDATE dbo.OrgDescriptorList

Page 280: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 280 of 325

SET WebformInfo = @WebformInfo, FieldType = @FieldType, FieldSize = @FieldSize WHERE (DescriptorName = @DescriptorName) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully updated descriptor field' AS ResultString END END ELSE /* insert/update MonitoringDescriptorList */ BEGIN IF NOT EXISTS (SELECT DescriptorName FROM dbo.MonitoringDescriptorList WHERE (DescriptorName = @DescriptorName)) BEGIN INSERT INTO dbo.MonitoringDescriptorList (DescriptorName, WebformInfo, FieldType, FieldSize, DisplayOnWeb, WebSort) VALUES (@DescriptorName, @WebformInfo, @FieldType, @FieldSize, 1, 255) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully inserted descriptor field' AS ResultString END ELSE BEGIN UPDATE dbo.MonitoringDescriptorList SET WebformInfo = @WebformInfo, FieldType = @FieldType, FieldSize = @FieldSize WHERE (DescriptorName = @DescriptorName) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully updated descriptor field' AS ResultString END END END RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'User is not authorized to update the descriptor list' AS ResultString RETURN BadFieldType: SELECT 0 AS ResultCode, 'Invalid field type' AS ResultString RETURN BadScope: SELECT 0 AS ResultCode, 'Invalid scope' AS ResultString RETURN MissingFields: SELECT 0 AS ResultCode, 'Required fields are missing' AS ResultString RETURN

Page 281: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 281 of 325

GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 282: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 282 of 325

Stored Procedure: dbo.procAddUpdateOrganization

Stored Procedure: dbo.procAddUpdateOrganization Properties

Owner: dbo Encrypted: � Description: Stored procedure for adding and updating organization information

Stored Procedure: dbo.procAddUpdateOrganization Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@OrgID INPUT int 4

@OrgName INPUT varchar 250

@Acronym INPUT varchar 20

@Description INPUT varchar 2000

@WebsiteUrl INPUT varchar 250

@LogoUrl INPUT varchar 250

@DateStart INPUT varchar 20

@DateEnd INPUT varchar 20

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateOrganization] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

Logins dbo Table 2

OrgUpdaters dbo Table 2

Page 283: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 283 of 325

vwOrgUpdaters dbo View 3

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateOrganization ( @OrgID int, @OrgName varchar(250), @Acronym varchar(20) = NULL, @Description varchar(2000) = NULL, @WebsiteUrl varchar(250) = NULL, @LogoUrl varchar(250) = NULL, @DateStart varchar(20) = NULL, @DateEnd varchar(20) = NULL, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF NOT EXISTS (SELECT UserID FROM dbo.DatabaseUsers WHERE (UserID = @Updater)) GOTO BadUser /* set empty string input to null */ IF @Acronym = '' SET @Acronym = NULL IF @Description = '' SET @Description = NULL IF @WebsiteUrl = '' SET @WebsiteUrl = NULL IF @LogoUrl = '' SET @LogoUrl = NULL DECLARE @DateStart2 datetime SET @DateStart2 = NULL IF ISDATE(@DateStart) = 1 SET @DateStart2 = CAST(@DateStart AS datetime) DECLARE @DateEnd2 datetime SET @DateEnd2 = NULL IF ISDATE(@DateEnd) = 1 SET @DateEnd2 = CAST(@DateEnd AS datetime) IF @OrgID = 0 /* add new organization */ BEGIN INSERT INTO dbo.Organizations (OrgName, Acronym, Description, WebsiteUrl, LogoUrl, DateStart, DateEnd, DateUpdated) VALUES (@OrgName, @Acronym, @Description, @WebsiteUrl, @LogoUrl, @DateStart2,

Page 284: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 284 of 325

@DateEnd2, GETDATE()) SELECT @OrgID = SCOPE_IDENTITY() SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler INSERT INTO dbo.OrgUpdaters (OrgID, UserID) VALUES (@OrgID, @Updater) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @OrgID AS ResultCode, 'Successfully inserted organization' AS ResultString END ELSE /* update existing */ BEGIN IF NOT EXISTS (SELECT OrgID FROM dbo.Organizations WHERE (OrgID = @OrgID)) GOTO IDError IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (OrgID = @OrgID) AND (UserID = @Updater)) GOTO BadUser UPDATE dbo.Organizations SET OrgName = @OrgName, Acronym = @Acronym, Description = @Description, WebsiteUrl = @WebsiteUrl, LogoUrl = @LogoUrl, DateStart = @DateStart2, DateEnd = @DateEnd2, DateUpdated = GETDATE() WHERE (OrgID = @OrgID) SELECT @OrgID AS ResultCode, 'Successfully updated organization' AS ResultString END END RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN IDError: SELECT 0 AS ResultCode, 'Invalid OrgID' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF

Page 285: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 285 of 325

GO

See Also

List of stored procedures

Page 286: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 286 of 325

Stored Procedure: dbo.procAddUpdateOrgDescriptor

Stored Procedure: dbo.procAddUpdateOrgDescriptor Properties

Owner: dbo Encrypted: �

Description:Stored procedure for adding and updating metadata descriptors for organizations

Stored Procedure: dbo.procAddUpdateOrgDescriptor Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@OrgID INPUT int 4

@DescriptorName INPUT varchar 50

@DescriptorValue INPUT varchar 7900

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateOrgDescriptor] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

Logins dbo Table 2

OrgDescriptorList dbo Table 2

OrgUpdaters dbo Table 2

vwOrgUpdaters dbo View 3

Permissions User/Role Select Insert Delete Update Execute DRI

Page 287: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 287 of 325

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateOrgDescriptor ( @OrgID int, @DescriptorName varchar(50), @DescriptorValue varchar(7900), @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF NOT EXISTS (SELECT OrgID FROM dbo.Organizations WHERE (OrgID = @OrgID)) GOTO IDError IF NOT EXISTS (SELECT DescriptorName FROM dbo.OrgDescriptorList WHERE (DescriptorName = @DescriptorName)) GOTO BadDesc IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (OrgID = @OrgID) AND (UserID = @Updater)) GOTO BadUser IF @DescriptorValue = '' SET @DescriptorValue = NULL /* check for existing record */ IF EXISTS (SELECT DescriptorName FROM dbo.OrgDescriptors WHERE (OrgID = @OrgID) AND (DescriptorName = @DescriptorName)) BEGIN IF @DescriptorValue IS NULL BEGIN /* delete prior entry - null field */ DELETE FROM dbo.OrgDescriptors WHERE (OrgID = @OrgID) AND (DescriptorName = @DescriptorName) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully deleted descriptor' AS ResultString END ELSE BEGIN /* update prior entry */ UPDATE dbo.OrgDescriptors SET DescriptorValue = @DescriptorValue WHERE (OrgID = @OrgID) AND (DescriptorName = @DescriptorName) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler

Page 288: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 288 of 325

SELECT 1 AS ResultCode, 'Successfully updated descriptor' AS ResultString END END ELSE BEGIN IF @DescriptorValue IS NOT NULL BEGIN /* insert new record */ INSERT INTO dbo.OrgDescriptors (OrgID, DescriptorName, DescriptorValue) VALUES (@OrgID, @DescriptorName, @DescriptorValue) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully inserted descriptor' AS ResultString END ELSE BEGIN SELECT 0 AS ResultCode, 'Failed to add null descriptor' AS ResultString END END END RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred adding or updating the descriptor' AS ResultString RETURN BadDesc: SELECT 0 AS ResultCode, 'Invalid descriptor field' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN IDError: SELECT 0 AS ResultCode, 'Invalid Organization ID' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 289: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 289 of 325

Page 290: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 290 of 325

Stored Procedure: dbo.procAddUpdateParameter

Stored Procedure: dbo.procAddUpdateParameter Properties

Owner: dbo Encrypted: � Description: Stored procedure for adding and updating measurement parameters

Stored Procedure: dbo.procAddUpdateParameter Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@ParameterID INPUT int 4

@StoretCode INPUT char 5

@ParameterGroup INPUT varchar 50

@ParameterCategory INPUT varchar 100

@ParameterName INPUT varchar 250

@ParameterDesc INPUT varchar 500

@SampleMedium INPUT varchar 250

@ParameterUnits INPUT varchar 250

@ParameterMethods INPUT varchar 500

@SearchTags INPUT varchar 500

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateParameter] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Parameter_Groups dbo Table 1

Page 291: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 291 of 325

Storet_Codes dbo Table 1

Logins dbo Table 2

Parameters dbo Table 2

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateParameter ( @ParameterID int, @StoretCode char(5) = NULL, @ParameterGroup varchar(50), @ParameterCategory varchar(100), @ParameterName varchar(250), @ParameterDesc varchar(500), @SampleMedium varchar(250) = NULL, @ParameterUnits varchar(250) = NULL, @ParameterMethods varchar(500) = NULL, @SearchTags varchar(500) = NULL, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @ParameterGroup IS NULL OR @ParameterCategory IS NULL OR @ParameterName IS NULL OR @ParameterDesc IS NULL OR @Updater IS NULL GOTO MissingInput IF NOT EXISTS (SELECT UserID FROM dbo.DatabaseUsers WHERE (UserID = @Updater)) GOTOBadUser IF NOT EXISTS (SELECT ParameterGroup FROM dbo.Parameter_Groups WHERE (ParameterGroup = @ParameterGroup)) GOTO BadGroup IF @StoretCode = ' ' SET @StoretCode = NULL IF @ParameterID = 0 /* insert new parameter */ BEGIN INSERT INTO dbo.Parameters (StoretCode, ParameterGroup, ParameterCategory,

Page 292: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 292 of 325

ParameterName, ParameterDesc, SampleMedium, ParameterUnits, ParameterMethods, SearchTags, Updater) VALUES (@StoretCode, @ParameterGroup, @ParameterCategory, @ParameterName, @ParameterDesc, @SampleMedium, @ParameterUnits, @ParameterMethods, @SearchTags, @Updater) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @ParameterID = SCOPE_IDENTITY() SELECT @ParameterID AS ResultCode, 'Successfully inserted parameter' AS ResultString END ELSE /* validate parameter, updater, then update parameter */ BEGIN IF NOT EXISTS (SELECT ParameterID FROM dbo.Parameters WHERE (ParameterID = @ParameterID)) GOTO BadParm DECLARE @LastUpdater varchar(50) SELECT @LastUpdater = Updater FROM dbo.Parameters WHERE (ParameterID = @ParameterID) DECLARE @Role varchar(50) SELECT @Role = Role FROM dbo.Logins WHERE (UserID = @Updater) IF @LastUpdater <> @Updater AND @Role <> 'Administrator' AND @Role <> 'SuperUser' GOTO BadUser UPDATE dbo.Parameters SET StoretCode = @StoretCode, ParameterGroup = @ParameterGroup, ParameterCategory = @ParameterCategory, ParameterName = @ParameterName, ParameterDesc = @ParameterDesc, SampleMedium = @SampleMedium, ParameterUnits = @ParameterUnits, ParameterMethods = @ParameterMethods, SearchTags = @SearchTags, Updater = @Updater WHERE (ParameterID = @ParameterID) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @ParameterID AS ResultCode, 'Successfully updated parameter' AS ResultString END END RETURN MissingInput: SELECT 0 AS ResultCode, 'Missing required fields' AS ResultString RETURN BadParm: SELECT 0 AS ResultCode, 'Invalid parameter' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN BadGroup: SELECT 0 AS ResultCode, 'Invalid parameter group' AS ResultString RETURN

Page 293: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 293 of 325

ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 294: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 294 of 325

Stored Procedure: dbo.procAddUpdateProgram

Stored Procedure: dbo.procAddUpdateProgram Properties

Owner: dbo Encrypted: � Description: Stored procedure for adding and updating monitoring program information

Stored Procedure: dbo.procAddUpdateProgram Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@ProgramID INPUT int 4

@OrgID INPUT int 4

@ProgramName INPUT varchar 250

@Acronym INPUT varchar 20

@Description INPUT varchar 2000

@WebsiteUrl INPUT varchar 250

@DateStart INPUT varchar 20

@DateEnd INPUT varchar 20

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateProgram] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

Logins dbo Table 2

MonitoringPrograms dbo Table 2

Page 295: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 295 of 325

OrgUpdaters dbo Table 2

vwOrgUpdaters dbo View 3

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateProgram ( @ProgramID int, @OrgID int, @ProgramName varchar(250), @Acronym varchar(20) = NULL, @Description varchar(2000) = NULL, @WebsiteUrl varchar(250) = NULL, @DateStart varchar(20) = NULL, @DateEnd varchar(20) = NULL, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (OrgID = @OrgID) AND (UserID = @Updater)) GOTO BadUser IF NOT EXISTS (SELECT OrgID FROM dbo.Organizations WHERE (OrgID = @OrgID)) GOTO BadOrg IF @Acronym = '' SET @Acronym = NULL IF @Description = '' SET @Description = NULL IF @WebsiteUrl = '' SET @WebsiteUrl = NULL DECLARE @DateStart2 datetime SET @DateStart2 = NULL IF ISDATE(@DateStart) = 1 SET @DateStart2 = CAST(@DateStart AS datetime) DECLARE @DateEnd2 datetime SET @DateEnd2 = NULL IF ISDATE(@DateEnd) = 1 SET @DateEnd2 = CAST(@DateEnd AS datetime) IF @ProgramID = 0 BEGIN

Page 296: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 296 of 325

INSERT INTO dbo.MonitoringPrograms (OrgID, ProgramName, Acronym, Description, WebsiteUrl, DateStart, DateEnd, DateUpdated) VALUES (@OrgID, @ProgramName, @Acronym, @Description, @WebsiteUrl, @DateStart2, @DateEnd2, GETDATE()) SELECT @ProgramID = SCOPE_IDENTITY() SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @ProgramID AS ResultCode, 'Successfully inserted program' AS ResultString END ELSE BEGIN IF NOT EXISTS (SELECT ProgramID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID)) GOTO IDError UPDATE dbo.MonitoringPrograms SET OrgID = @OrgID, ProgramName = @ProgramName, Acronym = @Acronym, Description = @Description, WebsiteUrl = @WebsiteUrl, DateStart = @DateStart2, DateEnd = @DateEnd2, DateUpdated = GETDATE() WHERE (ProgramID = @ProgramID) SELECT @ProgramID AS ResultCode, 'Successfully updated program' AS ResultString END END RETURN BadOrg: SELECT 0 AS ResultCode, 'Invalid Organization ID' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN IDError: SELECT 0 AS ResultCode, 'Invalid Program ID' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO

Page 297: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 297 of 325

SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 298: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 298 of 325

Stored Procedure:

dbo.procAddUpdateProgramDescriptor

Stored Procedure: dbo.procAddUpdateProgramDescriptor Properties

Owner: dbo Encrypted: �

Description:Stored procedure for adding and updating monitoring program metadata descriptors

Stored Procedure: dbo.procAddUpdateProgramDescriptor Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@ProgramID INPUT int 4

@DescriptorName INPUT varchar 50

@DescriptorValue INPUT varchar 7900

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateProgramDescriptor] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

WebFormFieldTypes dbo Table 1

Logins dbo Table 2

MonitoringDescriptorList dbo Table 2

OrgUpdaters dbo Table 2

vwOrgUpdaters dbo View 3

Permissions User/Role Select Insert Delete Update Execute DRI

Page 299: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 299 of 325

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateProgramDescriptor ( @ProgramID int, @DescriptorName varchar(50), @DescriptorValue varchar(7900), @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF NOT EXISTS (SELECT ProgramID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID)) GOTO IDError IF NOT EXISTS (SELECT DescriptorName FROM dbo.MonitoringDescriptorList WHERE (DescriptorName = @DescriptorName)) GOTO BadDesc /* look up project id */ DECLARE @OrgID int SELECT @OrgID = OrgID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID) IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (OrgID = @OrgID) AND (UserID = @Updater)) GOTO BadUser IF NULLIF(@DescriptorValue,'') IS NULL SET @DescriptorValue = NULL IF EXISTS (SELECT DescriptorName FROM dbo.MonitoringProgramDescriptors WHERE (ProgramID = @ProgramID) AND (DescriptorName = @DescriptorName)) BEGIN IF @DescriptorValue IS NULL BEGIN DELETE FROM dbo.MonitoringProgramDescriptors WHERE (ProgramID = @ProgramID) AND (DescriptorName = @DescriptorName) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully deleted descriptor' AS ResultString END ELSE BEGIN UPDATE dbo.MonitoringProgramDescriptors SET DescriptorValue = @DescriptorValue WHERE (ProgramID = @ProgramID) AND (DescriptorName = @DescriptorName)

Page 300: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 300 of 325

SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully updated descriptor' AS ResultString END END ELSE BEGIN IF @DescriptorValue IS NOT NULL BEGIN INSERT INTO dbo.MonitoringProgramDescriptors (ProgramID, DescriptorName, DescriptorValue) VALUES (@ProgramID, @DescriptorName, @DescriptorValue) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully inserted descriptor' AS ResultString END ELSE BEGIN SELECT 0 AS ResultCode, 'Failed to insert null descriptor' AS ResultString END END END RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred adding or updating the descriptor' AS ResultString RETURN BadDesc: SELECT 0 AS ResultCode, 'Invalid descriptor field' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN IDError: SELECT 0 AS ResultCode, 'Invalid ProgramID' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

Page 301: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 301 of 325

List of stored procedures

Page 302: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 302 of 325

Stored Procedure: dbo.procAddUpdateStation

Stored Procedure: dbo.procAddUpdateStation Properties

Owner: dbo Encrypted: � Description: Stored procedure for adding and updating monitoring station information

Stored Procedure: dbo.procAddUpdateStation Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@StationID INPUT int 4

@ProgramID INPUT int 4

@SiteCode INPUT varchar 50

@SiteName INPUT varchar 200

@Description INPUT varchar 2000

@State INPUT char 2

@County INPUT varchar 50

@Location INPUT varchar 250

@Latitude INPUT real 4

@Longitude INPUT real 4

@HUC INPUT char 8

@DateStart INPUT varchar 20

@DateEnd INPUT varchar 20

@WebsiteUrl INPUT varchar 250

@DateUrl INPUT varchar 250

@Updater INPUT varchar 50

Page 303: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 303 of 325

Objects that [dbo].[procAddUpdateStation] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Organizations dbo Table 1

StateCodes dbo Table 1

Logins dbo Table 2

MonitoringPrograms dbo Table 2

OrgUpdaters dbo Table 2

vwOrgUpdaters dbo View 3

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateStation ( @StationID int, @ProgramID int, @SiteCode varchar(50) = NULL, @SiteName varchar(200), @Description varchar(2000) = NULL, @State char(2) = NULL, @County varchar(50) = NULL, @Location varchar(250) = NULL, @Latitude real, @Longitude real, @HUC char(8) = NULL, @DateStart varchar(20) = NULL, @DateEnd varchar(20) = NULL, @WebsiteUrl varchar(250) = NULL, @DateUrl varchar(250) = NULL, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int

Page 304: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 304 of 325

SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @StationID IS NULL OR @ProgramID IS NULL OR @SiteName IS NULL OR @State IS NULL or @Latitude IS NULL OR @Longitude IS NULL OR @Updater IS NULL GOTO MissingInput IF NOT EXISTS (SELECT ProgramID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID)) GOTO BadProgram DECLARE @OrgID int SELECT @OrgID = OrgID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID) IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (UserID = @Updater) AND (OrgID = @OrgID)) GOTO BadUser IF @State IS NOT NULL BEGIN IF NOT EXISTS (SELECT StateAbbreviation FROM dbo.StateCodes WHERE (StateAbbreviation = @State)) GOTO BadState END /* set empty sting input to null */ IF @Description = '' SET @Description = NULL IF @State = '' OR @State = ' ' SET @State = NULL IF @County = '' SET @County = NULL IF @Location = '' SET @Location = NULL IF @HUC = '' SET @HUC = NULL DECLARE @DateStart2 datetime SET @DateStart2 = NULL IF ISDATE(@DateStart) = 1 SET @DateStart2 = CAST(@DateStart AS datetime) DECLARE @DateEnd2 datetime SET @DateEnd2 = NULL IF ISDATE(@DateEnd) = 1 SET @DateEnd2 = CAST(@DateEnd AS datetime) /* check for insert or update based on StationID */ IF @StationID = 0 BEGIN INSERT INTO dbo.MonitoringStations (ProgramID, SiteCode, SiteName, Description, State, County, Location, Latitude, Longitude, HUC, DateStart, DateEnd, DateUpdated, WebsiteUrl) VALUES (@ProgramID, @SiteCode, @SiteName, @Description, @State, @County, @Location, @Latitude, @Longitude, @HUC, @DateStart2, @DateEnd2, GETDATE(), @WebsiteUrl) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @StationID = SCOPE_IDENTITY() SELECT @StationID AS ResultCode, 'Successfully inserted station' AS ResultString END ELSE BEGIN IF NOT EXISTS (SELECT StationID FROM dbo.MonitoringStations WHERE (StationID = @StationID)) GOTO BadStation UPDATE dbo.MonitoringStations SET ProgramID = @ProgramID, SiteCode = @SiteCode, SiteName = @SiteName, Description = @Description, State = @State, County = @County, Location = @Location, Latitude = @Latitude, Longitude = @Longitude, HUC = @HUC,

Page 305: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 305 of 325

DateStart = @DateStart2, DateEnd = @DateEnd2, DateUpdated = GETDATE(), WebsiteUrl = @WebsiteUrl WHERE (StationID = @StationID) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT @StationID AS ResultCode, 'Successfully updated station' AS ResultString END END RETURN MissingInput: SELECT 0 AS ResultCode, 'Missing required fields' AS ResultString RETURN BadProgram: SELECT 0 AS ResultCode, 'Invalid monitoring program' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN BadState: SELECT 0 AS ResultCode, 'Invalid State abbreviation' AS ResultString RETURN BadStation: SELECT 0 AS ResultCode, 'Invalid StationID' AS ResultString IDError: SELECT 0 AS ResultCode, 'Invalid OrgID' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 306: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 306 of 325

Stored Procedure:

dbo.procAddUpdateStationParameters

Stored Procedure: dbo.procAddUpdateStationParameters Properties

Owner: dbo Encrypted: �

Description:Stored procedure for adding and updating parameters measured at monitoring stations

Stored Procedure: dbo.procAddUpdateStationParameters Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@StationID INPUT int 4

@TypeCode INPUT varchar 20

@ParameterID INPUT int 4

@ParamLocalName INPUT varchar 150

@DateStart INPUT varchar 20

@DateEnd INPUT varchar 20

@Probabilistic INPUT bit 1

@Delete INPUT bit 1

@Updater INPUT varchar 50

Objects that [dbo].[procAddUpdateStationParameters] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

MonitoringTypes dbo Table 1

Organizations dbo Table 1

Parameter_Groups dbo Table 1

Page 307: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 307 of 325

StateCodes dbo Table 1

Storet_Codes dbo Table 1

Logins dbo Table 2

MonitoringPrograms dbo Table 2

OrgUpdaters dbo Table 2

Parameters dbo Table 2

vwOrgUpdaters dbo View 3

MonitoringStations dbo Table 3

MonitoringStationParameters dbo Table 4

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUpdateStationParameters ( @StationID int, @TypeCode varchar(20), @ParameterID int, @ParamLocalName varchar(150) = NULL, @DateStart varchar(20) = NULL, @DateEnd varchar(20) = NULL, @Probabilistic bit = NULL, @Delete bit = NULL, @Updater varchar(50) ) AS SET NOCOUNT ON BEGIN DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @StationID IS NULL OR @TypeCode IS NULL OR @ParameterID IS NULL OR @Updater IS NULL GOTO MissingInput IF NOT EXISTS (SELECT StationID FROM dbo.MonitoringStations WHERE (StationID =

Page 308: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 308 of 325

@StationID)) GOTO BadStation IF NOT EXISTS (SELECT TypeCode FROM dbo.MonitoringTypes WHERE (TypeCode = @TypeCode)) GOTO BadType IF NOT EXISTS (SELECT ParameterID FROM dbo.Parameters WHERE (ParameterID = @ParameterID)) GOTO BadParm DECLARE @ProgramID int SELECT @ProgramID = ProgramID FROM dbo.MonitoringStations WHERE (StationID = @StationID) DECLARE @OrgID int SELECT @OrgID = OrgID FROM dbo.MonitoringPrograms WHERE (ProgramID = @ProgramID) IF NOT EXISTS (SELECT UserID FROM dbo.vwOrgUpdaters WHERE (OrgID = @OrgID) AND (UserID = @Updater)) GOTO BadUser IF @Delete IS NULL SET @Delete = 0 DECLARE @DateStart2 datetime SET @DateStart2 = NULL IF ISDATE(@DateStart) = 1 SET @DateStart2 = CAST(@DateStart AS datetime) DECLARE @DateEnd2 datetime SET @DateEnd2 = NULL IF ISDATE(@DateEnd) = 1 SET @DateEnd2 = CAST(@DateEnd AS datetime) IF EXISTS (SELECT ParameterID FROM dbo.MonitoringStationParameters WHERE (StationID = @StationID) AND (ParameterID = @ParameterID)) BEGIN IF @Delete = 0 BEGIN UPDATE dbo.MonitoringStationParameters SET ParamLocalName = @ParamLocalName, DateStart = @DateStart2, DateEnd = @DateEnd2, DateUpdated = GETDATE() WHERE (StationID = @StationID) AND (ParameterID = @ParameterID) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully updated station parameters' AS ResultString END ELSE BEGIN DELETE FROM dbo.MonitoringStationParameters WHERE (StationID = @StationID) AND (ParameterID = @ParameterID) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully deleted station parameters' AS ResultString END END ELSE BEGIN INSERT INTO dbo.MonitoringStationParameters (StationID, ParameterID, ParamLocalName, DateStart, DateEnd, DateUpdated) VALUES (@StationID, @ParameterID, @ParamLocalName, @DateStart2, @DateEnd2, GETDATE()) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully inserted station parameters' AS ResultString

Page 309: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 309 of 325

END END RETURN MissingInput: SELECT 0 AS ResultCode, 'Required fields are missing' AS ResultString RETURN BadType: SELECT 0 AS ResultCode, 'Invalid TypeCode' AS ResultString RETURN BadStation: SELECT 0 AS ResultCode, 'Invalid StationID' AS ResultString RETURN BadParm: SELECT 0 AS ResultCode, 'Invalid ParameterID' AS ResultString RETURN BadUser: SELECT 0 AS ResultCode, 'Invalid updater' AS ResultString RETURN IDError: SELECT 0 AS ResultCode, 'Invalid OrgID' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 310: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 310 of 325

Stored Procedure: dbo.procAddUser

Stored Procedure: dbo.procAddUser Properties

Owner: dbo Encrypted: � Description: Stored procedure for adding a database user

Stored Procedure: dbo.procAddUser Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@UserID INPUT varchar 50

@NamePrefix INPUT varchar 5

@GivenName INPUT varchar 50

@MiddleName INPUT varchar 50

@SurName INPUT varchar 10

@NameSuffix INPUT varchar 5

@Organization INPUT varchar 250

@Address1 INPUT varchar 250

@Address2 INPUT varchar 250

@Address3 INPUT varchar 250

@City INPUT varchar 100

@State INPUT char 2

@PostalCode INPUT varchar 10

@Email INPUT varchar 100

@Phone1 INPUT varchar 50

@Phone2 INPUT varchar 50

Page 311: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 311 of 325

@WebsiteUrl INPUT varchar 250

@Password INPUT varchar 250

@Role INPUT varchar 50

@DateExpires INPUT datetime 8

Objects that [dbo].[procAddUser] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Logins dbo Table 2

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procAddUser ( @UserID varchar(50), @NamePrefix varchar(5) = NULL, @GivenName varchar(50), @MiddleName varchar(50) = NULL, @SurName varchar(10), @NameSuffix varchar(5) = NULL, @Organization varchar(250) = NULL, @Address1 varchar(250) = NULL, @Address2 varchar(250) = NULL, @Address3 varchar(250) = NULL, @City varchar(100) = NULL, @State char(2) = NULL, @PostalCode varchar(10) = NULL, @Email varchar(100), @Phone1 varchar(50) = NULL, @Phone2 varchar(50) = NULL, @WebsiteUrl varchar(250) = NULL, @Password varchar(250), @Role varchar(50), @DateExpires datetime ) AS SET NOCOUNT ON BEGIN

Page 312: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 312 of 325

DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF EXISTS (SELECT UserID FROM dbo.DatabaseUsers WHERE (UserID = @UserID)) GOTO IDError IF NOT EXISTS (SELECT Role FROM dbo.DatabaseRoles WHERE (Role = @Role)) GOTO RoleError IF @UserID IS NULL OR @GivenName IS NULL OR @SurName IS NULL OR @Email IS NULL OR @Password IS NULL OR @Role IS NULL OR @DateExpires IS NULL GOTO MissingData INSERT INTO dbo.DatabaseUsers (UserID, NamePrefix, GivenName, MiddleName, SurName, NameSuffix, Organization, Address1, Address2, Address3, City, State, PostalCode, Email, Phone1, Phone2, WebsiteUrl) VALUES (@UserID, @NamePrefix, @GivenName, @MiddleName, @SurName, @NameSuffix, @Organization, @Address1, @Address2, @Address3, @City, @State, @PostalCode, @Email, @Phone1, @Phone2, @WebsiteUrl) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler INSERT INTO dbo.Logins (UserID, Password, Role, DateExpires) VALUES (@UserID, @Password, @Role, @DateExpires) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler SELECT 1 AS ResultCode, 'Successfully added user' AS ResultString END RETURN IDError: SELECT 0 AS ResultCode, 'An account for user ' + @UserID + ' already exists in the database' AS ResultString RETURN RoleError: SELECT 0 AS ResultCode, 'Invalid database role' AS ResultString RETURN MissingData: SELECT 0 AS ResultCode, 'Required fields are null' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred adding the user' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

Page 313: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 313 of 325

See Also

List of stored procedures

Page 314: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 314 of 325

Stored Procedure: dbo.procEmailLogin

Stored Procedure: dbo.procEmailLogin Properties

Owner: dbo Encrypted: �

Description:Stored procedure for retrieving login information based on a users email address for password recovery

Stored Procedure: dbo.procEmailLogin Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@email INPUT varchar 150

Objects that [dbo].[procEmailLogin] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Logins dbo Table 2

vwEmailLogin dbo View 3

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procEmailLogin ( @email varchar(150) ) AS SET NOCOUNT ON DECLARE @Err int SET @Err = 0

Page 315: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 315 of 325

SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @email = '' OR @email IS NULL GOTO MissingInput DECLARE @UserID varchar(50) DECLARE @Password varchar(150) DECLARE @Name varchar(200) DECLARE @DateExpires datetime SELECT TOP 1 @UserID = UserID, @Password = Password, @Name = Name, @DateExpires = DateExpires FROM dbo.vwEmailLogin WHERE (CAST(Email AS varbinary) = CAST(@email AS varbinary)) ORDER BY DateExpires DESC SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @UserID IS NULL BEGIN SELECT NULL AS UserID, NULL AS Password, NULL AS Name, NULL AS DateExpires END ELSE BEGIN SELECT @UserID AS UserID, @Password AS Password, @Name AS Name, CONVERT(varchar,@DateExpires,107) AS DateExpires END RETURN MissingInput: SELECT 0 AS ResultCode, 'Required fields are missing' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

See Also

List of stored procedures

Page 316: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 316 of 325

Stored Procedure: dbo.procLogin

Stored Procedure: dbo.procLogin Properties

Owner: dbo Encrypted: � Description: Stored procedure for authenticating users based on username and password

Stored Procedure: dbo.procLogin Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@UserID INPUT varchar 50

@Password INPUT varchar 250

@IP INPUT varchar 50

@WebBrowser INPUT varchar 500

Objects that [dbo].[procLogin] depends on

Object Name Owner Object Type Dep Level

DatabaseRoles dbo Table 1

DatabaseUsers dbo Table 1

Logins dbo Table 2

vwLoginInfo dbo View 3

Permissions

User/Role Select Insert Delete Update Execute DRI

nps_webuser GRANT

SQL

SET QUOTED_IDENTIFIER ON GO SET ANSI_NULLS ON GO CREATE PROCEDURE procLogin

Page 317: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 317 of 325

( @UserID varchar(50), @Password varchar(250), @IP varchar(50) = NULL, @WebBrowser varchar(500) = NULL ) AS SET NOCOUNT ON DECLARE @Err int SET @Err = 0 SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @UserID IS NULL OR @Password IS NULL GOTO MissingInput IF @IP = '' SET @IP = NULL IF @WebBrowser = '' SET @WebBrowser = NULL /* init name, role variables */ DECLARE @Name varchar(200) DECLARE @Role varchar(50) SELECT @Name = Name, @Role = Role FROM dbo.vwLoginInfo WHERE (CAST(UserID AS varbinary(50)) = CAST(@UserID AS varbinary(50))) AND (CAST(Password AS varbinary(250)) = CAST(@Password AS varbinary(250))) AND (DateExpires > GETDATE()) SELECT @Err = @@ERROR IF @Err <> 0 GOTO ErrorHandler IF @Role IS NULL BEGIN SELECT 0 AS ResultCode, NULL AS Name, NULL AS Role END ELSE BEGIN /* log access */ INSERT INTO WebAccessLog (UserID, IP, WebBrowser, DateLogin) VALUES (@UserID, @IP, @WebBrowser, GETDATE()) SELECT 1 AS ResultCode, @Name AS Name, @Role AS Role END RETURN MissingInput: SELECT 0 AS ResultCode, 'Required fields are missing' AS ResultString RETURN ErrorHandler: SELECT 0 AS ResultCode, 'An error occurred' AS ResultString RETURN GO SET QUOTED_IDENTIFIER OFF GO GO SET ANSI_NULLS OFF GO

Page 318: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 318 of 325

See Also

List of stored procedures

Page 319: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 319 of 325

Functions

Page 320: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 320 of 325

Function: dbo.fnSplitString

Function: dbo.fnSplitString Properties

Owner: dbo Type: SQL table-valued-function Encrypted: �

Description:Table-valued function that splits a comma-delimited string into records to support list-based queries

Function: dbo.fnSplitString Creation options

QUOTED_IDENTIFIER: � ANSI_NULLS: �

Parameters

Name Direction DataType Length Description

@List INPUT varchar 8000

Columns

Name Data Type Length NULL IsGUID Description

String varchar 50 � �

SQL

CREATE FUNCTION dbo.fnSplitString /* splits a comma-delimited text string to return a table with individual strings as records */ ( @List varchar(8000) ) RETURNS @ParsedList table ( String varchar(50) ) AS BEGIN /* init variables */ DECLARE @String varchar(50) DECLARE @Pos int /* get index of commas */ SET @List = LTRIM(RTRIM(@List))+ ' ,' SET @Pos = CHARINDEX(' ,', @List, 1) /* check for empty list */ IF REPLACE(@List, ' ,', '') <> '' BEGIN

Page 321: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 321 of 325

WHILE @Pos > 0 BEGIN SET @String = LTRIM(RTRIM(LEFT(@List, @Pos - 1))) IF @String <> '' BEGIN INSERT INTO @ParsedList (String) VALUES (@String) END SET @List = RIGHT(@List, LEN(@List) - @Pos) SET @Pos = CHARINDEX(' ,', @List, 1) END END RETURN END

See Also

List of functions

Page 322: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 322 of 325

Server Info

Server Info Properties

Network Name: GCE-DB2 Processor Count: 4 Physical Memory, MB: 4091 Clustered: � Login Mode: Mixed Language: SQL_Latin1_General_CP1_CI_AS

Version

Microsoft SQL Server 2000 - 8.00.2055 (Intel X86) Dec 16 2008 19:46:53 Copyright (c) 1988-2003 Microsoft Corporation Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

Databases

Database Owner System

NPS_WaterQuality sa �

Server Configuration

Name Value

Maximum recovery interval in minutes 0

Allow updates to system tables 0

Number of user connections allowed 0

Number of locks for all users 0

Number of open database objects 0

Default fill factor percentage 0

Allow triggers to be invoked within triggers 1

Allow remote access 1

default language 0

Cross DB Ownership Chaining 0

Maximum worker threads 255

Page 323: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 323 of 325

Network packet size 4096

show advanced options 1

Create DTC transaction for remote procedures 0

c2 audit mode 0

default full-text language 1033

two digit year cutoff 2049

Memory for index create sorts (kBytes) 0

Priority boost 0

remote login timeout 20

remote query timeout 600

cursor threshold -1

set working set size 0

user options 0

affinity mask 0

Maximum size of a text field in replication. 65536

Tape retention period in days 0

cost threshold for parallelism 5

maximum degree of parallelism 0

minimum memory per query (kBytes) 1024

maximum time to wait for query memory (s) -1

Minimum size of server memory (MB) 1023

Maximum size of server memory (MB) 2147483647

Maximum estimated cost allowed by query governor 0

User mode scheduler uses lightweight pooling 0

scan for startup stored procedures 0

Page 324: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 324 of 325

AWE enabled in the server 0

affinity64 mask 0

Page 325: National Park Service SE Coastal Water Quality Monitoring Metadata

National Park Service NPS_WaterQuality (version 1.0, 30-Mar-2009)

Page 325 of 325

About

About Documentation details

Customer: National Park Service Project: SE Coastal Water Quality Monitoring Metadata Project Created: 03/31/2009 Generator: DBScribe 1.2 for SQL Server