If you are struggling here then i would guess you are not familiar with SQL? Perhaps start here
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 - might give you some pointers.
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.