Skip to content

Instantly share code, notes, and snippets.

@meskarune
Last active June 29, 2020 18:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save meskarune/745498283ffd4a3531c6cf2fde30f9e6 to your computer and use it in GitHub Desktop.
Save meskarune/745498283ffd4a3531c6cf2fde30f9e6 to your computer and use it in GitHub Desktop.
CREATE TABLE IF NOT EXISTS Sensors (
MAC_Address INT PRIMARY KEY NOT NULL,
Name TEXT NOT NULL,
Location TEXT NOT NULL);
CREATE TABLE IF NOT EXISTS Readings (
MAC_Address INT NOT NULL references sensors (MAC_Address),
Tempurature REAL NOT NULL,
Humidity REAL NOT NULL,
Pressure REAL NOT NULL,
Read_Time TIMESTAMP);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment