I'd suggest your commentary is more than a little bit unfair and 
inaccurate, and I'll leave it at that.

Weewx by default uses an underlying sqlite3 database and puts its readings 
into an 'archive' table that has a large number of fields for the actual 
weather measurements.

CREATE TABLE archive (`dateTime` INTEGER NOT NULL UNIQUE PRIMARY KEY, 
`usUnits` INTEGER NOT NULL, `interval` INTEGER NOT NULL, `altimeter` REAL, 
`appTemp` REAL, `appTemp1` REAL, `barometer` REAL, `batteryStatus1` REAL, 
`batteryStatus2` REAL, `batteryStatus3` REAL, `batteryStatus4` REAL, 
`batteryStatus5` REAL, `batteryStatus6` REAL, `batteryStatus7` REAL, 
`batteryStatus8` REAL, `cloudbase` REAL, `co` REAL, `co2` REAL, 
`consBatteryVoltage` REAL, `dewpoint` REAL, `dewpoint1` REAL, `ET` REAL, 
`extraHumid1` REAL, `extraHumid2` REAL, `extraHumid3` REAL, `extraHumid4` 
REAL, `extraHumid5` REAL, `extraHumid6` REAL, `extraHumid7` REAL, 
`extraHumid8` REAL, `extraTemp1` REAL, `extraTemp2` REAL, `extraTemp3` 
REAL, `extraTemp4` REAL, `extraTemp5` REAL, `extraTemp6` REAL, `extraTemp7` 
REAL, `extraTemp8` REAL, `forecast` REAL, `hail` REAL, `hailBatteryStatus` 
REAL, `hailRate` REAL, `heatindex` REAL, `heatindex1` REAL, `heatingTemp` 
REAL, `heatingVoltage` REAL, `humidex` REAL, `humidex1` REAL, `inDewpoint` 
REAL, `inHumidity` REAL, `inTemp` REAL, `inTempBatteryStatus` REAL, 
`leafTemp1` REAL, `leafTemp2` REAL, `leafWet1` REAL, `leafWet2` REAL, 
`lightning_distance` REAL, `lightning_disturber_count` REAL, 
`lightning_energy` REAL, `lightning_noise_count` REAL, 
`lightning_strike_count` REAL, `luminosity` REAL, `maxSolarRad` REAL, `nh3` 
REAL, `no2` REAL, `noise` REAL, `o3` REAL, `outHumidity` REAL, `outTemp` 
REAL, `outTempBatteryStatus` REAL, `pb` REAL, `pm10_0` REAL, `pm1_0` REAL, 
`pm2_5` REAL, `pressure` REAL, `radiation` REAL, `rain` REAL, 
`rainBatteryStatus` REAL, `rainRate` REAL, `referenceVoltage` REAL, 
`rxCheckPercent` REAL, `signal1` REAL, `signal2` REAL, `signal3` REAL, 
`signal4` REAL, `signal5` REAL, `signal6` REAL, `signal7` REAL, `signal8` 
REAL, `snow` REAL, `snowBatteryStatus` REAL, `snowDepth` REAL, 
`snowMoisture` REAL, `snowRate` REAL, `so2` REAL, `soilMoist1` REAL, 
`soilMoist2` REAL, `soilMoist3` REAL, `soilMoist4` REAL, `soilTemp1` REAL, 
`soilTemp2` REAL, `soilTemp3` REAL, `soilTemp4` REAL, `supplyVoltage` REAL, 
`txBatteryStatus` REAL, `UV` REAL, `uvBatteryStatus` REAL, 
`windBatteryStatus` REAL, `windchill` REAL, `windDir` REAL, `windGust` 
REAL, `windGustDir` REAL, `windrun` REAL, `windSpeed` REAL);

If you look at the beginning of the line, you'll see the unique key is the 
dateTime (seconds since the unix epoch).

There are also a number of additional sqlite3 tables created, one per item 
above, with the dateTime for the record, the max/min for that measurement, 
when the max/min occurred, and also for things that are accumulated a 
running total.

CREATE TABLE archive_day_inTemp (dateTime INTEGER NOT NULL UNIQUE PRIMARY 
KEY, min REAL, mintime INTEGER, max REAL, maxtime INTEGER, sum REAL, count 
INTEGER, wsum REAL, sumtime INTEGER);

These tables are not connected in any way at the database level, they're 
individual tables.  They're also using the dateTime of the record as the 
primary key for the records in the table.

Weewx handles the heavy lifting for keeping the summary tables up to date 
from the data in the archive table.   When you see people who ask how to 
clear bad data from their (archive table in the) database, they are 
generally told to 'drop daily' (which deletes the summary tables) and 
'rebuild daily' (which regenerates the summary tables from the 
hand-modified archive table).

That help any ? 

I guess I'm kinda speechless re: using a drawing tool to visualize a 
database nor really what you're trying to do.   Perhaps the tool you want 
to use is google and going through the sqlite3 documentation online to 
better understand how to reverse engineer and examine a sqlite3 database, 
but I guess that's a bit harsh.  I'll assume that you're overthinking 
things a bit and looking for complexity where it doesn't exist.


   - archive table has all the 'meat'
   - summary archive_whatever tables have the pre-computed summaries of 
   max/min/sums of each element for later use
   


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/c154915f-80da-40ca-ad9a-2d7d484d0890n%40googlegroups.com.

Reply via email to