# MariaDb & Serial Port Data

**URL:** <https://discourse.nodered.org/t/mariadb-serial-port-data/25459>\
**Category:** General\
**Created:** [25 April 2020 06:36 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459 "2020-04-25T06:36:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![scalci](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scalci/32/20511_2.png) [@scalci](https://discourse.nodered.org/u/scalci)\
**Post date:** [25 April 2020 06:36 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/1 "2020-04-25T06:36:58Z")

</div>

Hi Everyone,

I need some help and direction if anyone can assist.

I have and creating a weather station that get data via the Rasp serial port that I display via Node Red.

I want to log this data into a DB. I installed MariaDB, but from here I have no clue what to do.

I created a DB “weather, with a table “weathertbl” and added some fields.

What type should the fields be?  
The data that comes in is temperature etc (21.34) etc

How do I update this data into the DB.

Rgs

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 April 2020 07:11 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/2 "2020-04-25T07:11:51Z")

</div>

> [@scalci](#):
>
> What type should the fields be?  
> The data that comes in is temperature etc (21.34) etc

Probably float see [here](https://mariadb.com/kb/en/data-types/)

> [@scalci](#):
>
> How do I update this data into the DB.

If you are struggling here then i would guess you are not familiar with SQL? Perhaps start [here](https://mariadb.com/kb/en/a-mariadb-primer/)

NOTE: this forum is for node-red related issues. Your questions are about database basics.  
Typically you would try something, get stuck, post your flow/screenshots/errors etc & we help you solve it.

So, can I suggest you give the MariaDB documentation a good look over, see how far you get, pop another question on here if you get stuck populating the DB.

Good luck.

PS: Since **MariaDB** is a fork of **MySQL** , the database structure and indexes of **MariaDB** are the **same as MySQL** , perhaps search this forum for MySQL and the [flow library](https://flows.nodered.org/search?term=mysql) - might give you some pointers.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 April 2020 08:04 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/3 "2020-04-25T08:04:21Z")

</div>

Unless you have a particular desire to use mariadb then I suggest looking at Influxdb which is specifically designed for time series databases. There are influx nodes for writing data to it without the need to understand SQL and if you want sophisticated graphs it can easily be used with Grafana.

---

<div class="post-metadata">

**Author:** ![scalci](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scalci/32/20511_2.png) [@scalci](https://discourse.nodered.org/u/scalci)\
**Post date:** [25 April 2020 15:51 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/4 "2020-04-25T15:51:07Z")

</div>

hi Steve, you are right. 🙂 I am learning.

I will take a look

---

<div class="post-metadata">

**Author:** ![scalci](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/scalci/32/20511_2.png) [@scalci](https://discourse.nodered.org/u/scalci)\
**Post date:** [25 April 2020 15:52 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/5 "2020-04-25T15:52:02Z")

</div>

Hi Colin, thank you, there is no specific need, I saw this in a tutorial not knowing much on DB's I will take a look at this.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [24 June 2020 15:52 UTC](https://discourse.nodered.org/t/mariadb-serial-port-data/25459/6 "2020-06-24T15:52:02Z")

</div>

Closed on 24 June 2020 15:52 UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
