create table devices (
	deviceId integer primary key autoincrement,
	deviceName text,
	deviceLocation text,
	dstAware integer
);
create table device_env (
	entry integer primary key autoincrement,
	deviceId integer,
	environment text,
	environmentDescription text
);
create table env_outdoor (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real,
	lux real,
	uv_intensity real
);
create table env_indoor (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real
);
create table env_enclosed (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	temperature real,
	humidity real,
	pressure real,
	light real
);
create table device_status (
    entry integer primary key autoincrement,
    date timestamp,
	deviceId integer,
	batteryCharge real,
	heaterRunning integer
);

