Is it possible to save data history with firebase?


#1

Hello,
I wanted to ask if it is possible to store some kind of history of my values. I want to store a value that I put into a TextBox in a database, but if I change this value the old value in the database should still be present and not overwritten.
Does that work with Firebase or is there a better way?
Thank you very much!
Julia


#2

Depends on how you use it, but any DB can do that including Tinydb . Can you elaborate on your objective


#3

You can store any value in the database as long as your Tag is different for storing so that your previous value won’t be overwritten.

Let’s consider this example:
Here is the application which keeps track of on which dates, the user has accessed the application.
Day 1:

  • Tag–>Day_1
  • Value–>10/05/2019
    Day 2:
  • Tag–>Day_2
  • Value–>11/05/2019
    Day 3:
  • Tag–>Day_3
  • Value–>12/05/2019

Then whenever you need, you can iterate over tags and get all the values.


#4

Actually if you would like to not invade the users privacy instead like I have begun doing, you can instead use TinyDB… How Nathan can I do this?

Use one TinyDB for searches, with the tag being the day or title of the Site, and the value being the day or the URL. Then use GetAllTags to load them into a list.


#5

I would like to create an app for my dad where he and his coworkers can store water meter values ​​(an initial value and a final value) and assign those values ​​to the different days (with dates). Since these values ​​have to be documented, I wanted to make it as easy as possible for my dad with the help of an app.


#6

One device or multiple devices?
One user or mutiple users?


#7

3 devices
11 water meters
3 users and all should have access to the data


#8

Or rather, they should be able to enter data


#9

Well yes this is all possible,

Very easy actually.

You can have the location set the watermeter ID, you can use OCR so they can take a photo of the meter instead of typing it.

Firebase is the way to go for sure.


#10

Excellent! That’s a good idea
Thank you very much!


#11

No too sure, if there are more than 11 water meters next time, he could use TinyWebDB as Firebase Database has a 1 GB limit to data stored. However as @Cian_O_Sullivan said, yes essentially you can use Firebase DB as long as it’s only 11 meters.


#12

Yes, there are only 11, it will not be more

I’m sorry, I copied the wrong text


#13

English, primary language.


#14

With three different users and three devices, TinyDB would not make sense.

Stick with Firebase,


#15

Did you read my reply? I said TinyWebDB. I also had made it bold in my reply.


#16

How would you do that if you want to save a text from the textbox and then not overwrite it?
Storing the water meter as a photo was a good idea, but my dad needs it all in writing. And so I would not have to evaluate each image and write down if I could save everything in the database. Could you maybe explain that to me?


#17

Take a photo, use an OCR extension, have it read the data, then store the data as location ID: Location/Date/Reading/URL to image

First thing to do is build an app that will gather that information,

Location Sensor
Camera
OCR,
Clock

Once you have that info you can then send it to firebase.