Difference between revisions of "Weather Readings Database Schema"

From Earlham CS Department
Jump to navigation Jump to search
Line 2: Line 2:
  
 
datetime (timestamp)
 
datetime (timestamp)
 +
 
(all others of type real)
 
(all others of type real)
 +
 
barometer
 
barometer
 +
 
pressure
 
pressure
 +
 
altimeter
 
altimeter
 +
 
intemp
 
intemp
 +
 
outtemp
 
outtemp
 +
 
inhumid
 
inhumid
 +
 
outhumid
 
outhumid
 +
 
windspeed
 
windspeed
 +
 
winddir
 
winddir
 +
 
windgust
 
windgust
 +
 
windgustdir
 
windgustdir
 +
 
rainrate
 
rainrate
 +
 
rain
 
rain
 +
 
dewpoint
 
dewpoint
 +
 
windchill
 
windchill
 +
 
heatindex  
 
heatindex  
 +
 
et
 
et
 +
 
radiation
 
radiation
 +
 
uv
 
uv
 +
  
  

Revision as of 12:09, 27 March 2015

readings taken by weather station and stored in psql

datetime (timestamp)

(all others of type real)

barometer

pressure

altimeter

intemp

outtemp

inhumid

outhumid

windspeed

winddir

windgust

windgustdir

rainrate

rain

dewpoint

windchill

heatindex

et

radiation

uv




previous weather station information

weather=# \d+ readings

                       Table "public.readings"
       Column        |         Type         | Modifiers | Description
---------------------+----------------------+-----------+-------------
 timestamp           | abstime              |           | 
 in_temperature      | double precision     |           | Celsius 
 out_temperature     | double precision     |           | Celsius
 wind_speed          | integer              |           | Meters/Second
 wind_heading        | integer              |           | Degrees
 barometric_pressure | integer              |           | mm Hg
 in_humidity         | integer              |           | Percent
 out_humidity        | integer              |           | Percent
 total_rain          | double precision     |           | Centimeters
 wind_chill          | double precision     |           | Celsius
 dew_point           | double precision     |           | Celsius
 barometric_trend    | character varying(7) |           | NA (text string)
 daily_rain          | double precision     |           | NA, we never collected this value
Indexes:
    "timestam_pkey" UNIQUE, btree ("timestamp")
    "date_idx" btree ("timestamp")
Check constraints:
    "$1" CHECK (in_temperature >= 0:ouble precision AND in_temperature <= 50::
double precision)
    "$10" CHECK (wind_chill >= (- 40:ouble precision) AND wind_chill <= 50:o
uble precision)
    "$2" CHECK (dew_point >= (- 35:ouble precision) AND dew_point <= 50:ouble precision)
    "$3" CHECK (out_temperature >= (- 30:ouble precision) AND out_temperature <= 50:ouble precision)
    "$4" CHECK (wind_speed >= 0 AND wind_speed <= 100)
    "$5" CHECK (wind_heading >= 0 AND wind_heading <= 360)
    "$6" CHECK (barometric_pressure >= 71000 AND barometric_pressure <= 76000)
    "$7" CHECK (in_humidity >= 0 AND in_humidity <= 100)
    "$8" CHECK (out_humidity >= 0 AND out_humidity <= 100)
    "$9" CHECK (total_rain >= 0:ouble precision AND total_rain <= 100:ouble precision)
Has OIDs: yes