Skip to content

NovaStar Core / Database Reference / Views / Overview

The NovaStar database contains several views that join data from multiple tables. These views should be used rather than writing complex queries.


Introduction

NovaStar views provide representations of data that are useful for applications.

NovaStar database tables typically have an id column that is the primary key and is used to relate tables. However, this column should typically not be used in applications if a user-facing identifier is available. For example, use columns such as station.numid and point.point_numid, which are human-facing numerical identifiers. Some data, such as calibrations and ratings, only provide the internal identifier. View use the internal id to join tables.

The following views are defined.

View                                             Description
alarm_view Used to show alarms and the triggers that define the alarms. The view is a join of the alarm and alarm_trigger tables.
calibration_view Used to show calibration data for points. The view is a join of the calibration and point tables.
point_alarm_contact_view Used to show alarm trigger definitions and notification contacts for points. The view is a join of the point_view view and the alarm_trigger, alarm_trigger_type, alarm_action, and alarm_contact tables.
point_alarm_view Used to show alarm trigger definitions and actions for points. The view is a join of the point_view view and alarm_trigger, alarm_trigger_type, and alarm_action tables.
point_type_view Used to show point type data for points. The view is for point_type table with point_flag and point_status reference table data.
point_view Used to show point metadata. The view is a join of point, point_type, and station tables.
sensordef_view Used to show point/sensor information. The view is a join of point, point_type, point_class, and station tables.
station_view Used to show station information. The view is a join of station and station_type tables.