CREATE TABLE entities (eid INTEGER PRIMARY KEY, entity TEXT);
CREATE INDEX entities_entity ON entities (entity);

CREATE TABLE datapoints (dpid INTEGER PRIMARY KEY, datapoint TEXT);
CREATE INDEX datapoints_datapoint ON datapoints (datapoint);

CREATE TABLE pobs (eid INTEGER, timestamp INTEGER, dpid INTEGER, value NUMERIC);
CREATE INDEX pobs_eid_timestamp_dpid ON pobs (eid, timestamp, dpid);
