MySQL for the Internet of Things
Chapter 4 ■ Data transformation strData += String(newVal, 2); strData += ", Delta: "; strData += String(newVal-oldVal,3); oldVal ...
Chapter 4 ■ Data transformation The first thing you should consider is whether to generate the new data on the fly or as a colum ...
Chapter 4 ■ Data transformation Now let’s see what the data looks like. Recall to get data from the table, we use the SELECT com ...
Chapter 4 ■ Data transformation Listing 4-10. Calculated Columns Using SELECT (Python) import mysql.connector; cnx = mysql.conne ...
Chapter 4 ■ Data transformation INSERT INTO derived_annotation_test (blood_oxygen, weight, avg_weight, volts) VALUES (95.46, 46. ...
Chapter 4 ■ Data transformation Code Implementation In this example, we use Python code to determine which enumeration to use. T ...
Chapter 4 ■ Data transformation cur.execute(strInsert.format(water_level, state)) cnx.commit() cur.close() cnx.close() Take a mo ...
Chapter 4 ■ Data transformation By now we know that triggers can be powerful, and in this case we can include a similar set of c ...
Chapter 4 ■ Data transformation Notice we see the four rows we inserted, and the correct enumerated values have been chosen. I s ...
Chapter 4 ■ Data transformation Let’s say you decide you want to read temperature values every hour and soil moisture values eve ...
Chapter 4 ■ Data transformation Notice here we have three tables. The base table or the table with the core information is named ...
Chapter 4 ■ Data transformation Data from Multiple Nodes Closely related to data from multiple sensors is data collected from se ...
Chapter 4 ■ Data transformation void loop() { String row[3]; int i; i = 0; //attempt to read a packet xbee.readPacket(); if (xbe ...
Chapter 4 ■ Data transformation There is one thing that using a data aggregator like this makes a bit more complicated. Recall s ...
Chapter 4 ■ Data transformation Notice we calculate the average of the values read (20) as well as the minimum and maximum value ...
Chapter 5 MySQL Primer So you’re planning your IOT solution and have decided to build into your solution a database server. Perh ...
Chapter 5 ■ MySQL priMer What IS OpeN SOUrCe? IS It reaLLY Free? Open source software grew from a conscious resistance to the co ...
Chapter 5 ■ MySQL priMer Listing 5-1 shows examples of several SQL commands in action using the mysql client. Listing 5-1. Comma ...
Chapter 5 ■ MySQL priMer A great many commands are available in MySQL. Fortunately, you need master only a few of the more commo ...
Chapter 5 ■ MySQL priMer The download page will list several files for download. Depending on your platform, you may see several ...
«
3
4
5
6
7
8
9
10
11
12
»
Free download pdf