Hi there , I want to dump a data (at this moment single data) (i'm new to database)
in mysql or postgresql(which needs lots of work like docker or something)
can any one explains how to start with working on database??
Any step by step process for getting and dumping data to my raspberry pi 3 model b+.
If it is a simple database for storing only a few thousand records then have a look at sqlite. It is very easy to use with node-red and does not need the installation of a db server.
If you want to store time-series data, so for example temperature data stored over a period of time, then have a look at influxdb, also very easy to interface with node-red.
If you want to store a large amount of data, something like stock control in a factory for example then you will need a database such as mysql or postgresql.
If you have to ask that question then that probably means you should not be using mysql. Setting up and managing a mysql database server is not trivial. You would probably be better to start with sqlite (which does not have a server so is much easier to setup and use) and once you get something going with that you can decide whether you need mysql.
What sort of system are you building and what size of database are you expecting to have? Do multiple users/applications need to access the database at the same time?
1.for clarity I want to use mysql
2. I seen sqllite but have large amount of data so it can not be useful
3. I want to use mysql because after that i want to publish on heroku where it is supported.
4. For installing process of mysql tool and all stuff i got an error like this
There are various guides on how to install mariadb on a raspberry pi.
Databases are fields of study:
I seen sqllite but have large amount of data so it can not be useful
Why can sqlite not it not be useful you think ? This all depends on your needs of the database capabilities, large amounts of data is not directly one of them, they are both just files with records inside it.
You say you are new to databases, sqlite might be an easier way forward.
Actually I will have real time data which is suitable for mysql or postgresql.
mysql/mariadb is similar to sqlite, except sqlite has no server and no multi-user environment.
For realtime (streaming?) data, both are not suitable out of the box. Then again, a raspberry pi is not either.
For timestamped data you will be better off by using influxdb instead.
Please give us more information on what your system is intended to do so that we can make appropriate suggestions. Otherwise we are just thrashing about in the dark.
I want mysql to be connected to my local sysyem and I can make queries on it.
Thing is it is showing error which i posted earlier.
if i successfully make out of mysql all the possible queries will go to online server like heroku or other,
So From RPi i will send data to online database and make queries from there.
But from node red it is showing not connected.
So What type of line should user use because
sudo apt-get install mysql-server
is giving me error.
will this one line solve my issue? or any other thing i needed?
I just want all the steps so that i can not miss any installation, If any installation miss then I think i have give more time to it to recover (If I'm not wrong).
That is not what I meant, I meant what is the whole system doing? What sort of data? How much? How many users will be accessing the data concurrently? Why mysql? What do you want use the data for after storing it?
You mentioned realtime data I think, is that things like temperature and so on?
All these factors determine the best way to go. Mysql is generally not the best database for storing (and retrieving) real time process data.
If you are convinced that you know enough about the subject to decide that mysql/mariadb is the way to go (mariadb is an opensource version of mysql) then you need to learn about mysql. That is nothing to do with node-red. Since you apparently are starting from zero knowledge of databases I think you should spend a couple of days working through some database primers and then move onto mysql tutorials.