Skip to content
Hugo Oliveira edited this page May 13, 2021 · 9 revisions

Deployment Database

Overview

The original Deployment Database (DDB) is an MS-Access database that contains information about all deployments, instruments, personnel and sites for a specific location. Other specific-user databases can be used if a minimum interface requirements are met.

In the toolbox, the DDB/executeDDBQuery function acts as a wrapper around the DDB and returns query results as vectors of Matlab structs. This means that no conversion between Java-Matlab types is necessary.

MS-Access Schema

The complete MS-Access DDB schema is shown below:

https://raw.githubusercontent.com/wiki/aodn/imos-toolbox/images/ddb_schema.png

Interface requirements

If one is willing to build its own deployment database, there is a minimum list of requirements to respect to prevent the current version of the imos-toolbox from crashing. The table below provides a list of Fields with "Mandatory" status, i.e. they should always be present.

The following subsection details these requirements:

  • All of these tables and fields must be present
  • Table and field names must be identical (case sensitive)
  • Field types must be identical/compatible
  • A few fields may not be mandatory if they are removed from the default NetCDF template (GA -> global attribute in NetCDF\template\global_attributes.txt, VA -> variable attribute in NetCDF\template\variable_attributes.txt)
Table Name Field Name Data Type Description Mandatory NetCDF default template
FieldTrip FieldTripID Text Field Trip ID - use AIMS Log Req Number yes
FieldTrip FieldDescription Memo Descriptive text for field trip yes
FieldTrip DateStart Date/Time Start date for field trip yes
FieldTrip DateEnd Date/Time End date for field trip yes
DeploymentData DeploymentId Text Code-generated unique ID yes
DeploymentData EndFieldTrip Text Field Trip number yes
DeploymentData Site Text Use to link to sites data table (which contains lat and long) yes
DeploymentData InstrumentID Text Use to link to Instruments_Id in Instruments table (Instrument description) yes
DeploymentData FileName Text Catalogue number/Sample number/File name - should ideally be a unique identifier yes
DeploymentData TimeSwitchOn Date/Time Time instrument is switched on yes
DeploymentData TimeFirstWet Date/Time Time instrument first in water yes
DeploymentData TimeFirstInPos Date/Time Time instrumentfirst in position yes
DeploymentData TimeLastInPos Date/Time Time istrument last in position yes
DeploymentData TimeOnDeck Date/Time Time instrument on deck yes
DeploymentData TimeSwitchOff Date/Time Time instrument switched off yes
DeploymentData TimeFirstGoodData Date/Time Time of first good data yes
DeploymentData TimeLastGoodData Date/Time Time of last good data yes
DeploymentData TimeZone Text Time zone eg UTC,CST etc yes
DeploymentData InstrumentDepth Number Depth of instrument/sample yes GA.geospatial_vertical_min, GA.geospatial_vertical_max, VA.sensor_depth
DeploymentData Comment Memo Any additional comment to be attached to record Optional if removed from template, otherwise yes GA.comment
Instruments InstrumentID Text Unique ID for instrument yes
Instruments Make Text Select existing make from list or add new one yes GA.source
Instruments Model Text Select existing model from list or add new one yes GA.source, GA.keywords
InstrumentSensorConfig InstrumentID Text Unique ID for instrument yes
InstrumentSensorConfig SensorID Text Unique ID for sensor yes
InstrumentSensorConfig CurrentConfig Yes/No Is this the current Instrument/Sensor configuration yes
Sensors SensorID Text Unique ID for sensor yes
Sensors Parameter Text IMOS parameter codes, comma separated, measured by the sensor yes
Sensors SerialNumber Text Enter serial number for sensor yes VA.sensor_serial_number
Sites Site Text Unique Site ID yes
Sites SiteName Text Site Name (Not unique) yes
Sites Longitude Number Longitude in decimal degrees of Deployment Optional if removed from template, otherwise mandatory GA.geospatial_lon_min, GA.geospatial_lon_max
Sites Latitude Number Latitude in decimal degrees of Deployment Optional if removed from template, otherwise mandatory GA.geospatial_lat_min, GA.geospatial_lat_max
Sites Description Text Enter description of site: eg, Scott Reef Lagoon yes GA.abstract

Csv requirements

To use CSV files instead of a Microsoft MDB database file, only the above fields are needed. Table Name are individual CSV filenames, Field Name is the respective headers/column names required, and Data type is the expected type for each column. The CSV files need to be consistent among themselves since entries are related as in the image above and should be within the same folder.

Clone this wiki locally