SQLite - The Fast and Portable Database

We concluded the previous chapter with a problem, which was that none of our data was really there. All the temperature and humidity readings we took using our sensor were rather ephemeral and disappeared as soon as we closed our browser.

Overall, there is great value in storing our data:

  • It leads to a better experience for the user because, if they refresh or close their browser, the information that they were looking at will still be there.
  • It gives us access to information that we could not obtain earlier. How does the temperature today compare to the temperature of yesterday for the same time of the day? How about last week?
  • It gives us a chance to implement new features for our application, such as filtering readings based on the time of the day or searching and sorting through the readings for a given time period.

In this section of the book, we will be covering topics on how to make our data persistent through the use of simple-to-use open source tools.

We will cover the following topics:

  • Picking the correct tool for the job
  • Creating the temperature and humidity tables
  • Running CRUD operations
  • Aggregations
  • About SQLite and its architecture
  • SQLite installation on the Pi
  • Creating a database and executing queries in SQLite
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.186.173