I'm creating an application that helps staffs in my college to take attendance and term marks calculation in a easy way , for this I need my data to be stored in database in central place so that more than one staff(from different mobile) can access student details from their mobile. My knowledge is up to storing the data in local database using mysql .I have no idea how to make a central place to store the data.
you can create your app Firebase Realtime database or Firestore database:-
Firebase Realtime link :- https://firebase.google.com/docs/database
Firebase Firestore link :- https://firebase.google.com/docs/firestore/quickstart
you can use these 2 databases for your best experience if you don't have back-end team.
Related
I am a novice android programmer, and I am developing my first android application. I'm trying to figure out if firebase is suitable for my needs.
My app looks like this:
users add the product to the database by filling in the product
fields
products are stored in the database as objects with simple fields (numbers and strings)
users search for a product in the database to compare its fields according to different criteria
users edit (update) product fields
users have their own accounts
My priority is the ease of use.
My question is:
Is Firebase suitable for my needs or is there a more suitable solution?
Do I understand correctly that I am interested in the Cloud Storage product?
users add the product to the database by filling in the product fields
Yes, you can achieve this using either Cloud Firestore or the Realtime Database. In both cases, you can add the data as a Map object or as a custom object of your choice.
products are stored in the database as objects with simple fields (numbers and strings)
Yes, you can achieve that. Here are Cloud Firestore supported data types, as well as Firebase Realtime Database data types.
users search for a product in the database to compare its fields according to different criteria.
None of the above databases supports native indexing or search for text fields, so you can use third-party libraries like Algolia or Elasticsearch.
users edit (update) product fields.
These are basic CRUD operations that are supported by both databases.
users have their own accounts
In this case, you should use Firebase Authentication, a service that works perfectly with both databases.
Is firebase suitable for my needs or is there a more suitable solution.
As I see in your requirements, yes, it suits your needs.
Do I understand correctly that I am interested in the Cloud Storage product?
For storing data (objects) you need to choose one of the above-mentioned databases, or why not even both, and for storing files, you should indeed use Cloud Storage for Firebase.
You could use firestore for this. Although full-text search won't work, you can use algoia/elastic to do full-text search.
I have been working on an Android application that populates a Google Map with markers from a Room Database and all user data is stored in a Firebase Realtime Database.
The application first copies the Room Database from the assets folder, so all the changes will take place in the copy of the database. The Room Database has 11 columns at the moment and only one of the column's values are changed.
Now I have reached the part where I would need to save the copy of the Room database to the corresponding user in the Firebase Realtime Database, so that if the application is uninstalled or if anything else happens, then the data and changes related to the markers would persist.
How could I save the copy of the Room Database in the Firebase Realtime Database and how can I pull that copy from the Realtime Database and set it as the version to use?
I did come across people looking for a solution to a similar problem but the solution so far has been to migrate the Room Database to the Firebase Realtime Database.
example: Link Android Room Database with Firebase Realtime Database
I also thought about getting rid of the Room Database and just using the Firebase Realtime Database but the management of the data related to the markers seems difficult not to mention the amount of reprogramming. Also if this is the best/only way to go, then if I have the database stored on Firebase, should each user have their own copy of the database, or should it include only the data that changes and a reference to the corresponding item in the main database with the rest of the data?
I just recently started using Firebase and I am not sure what would be the correct approach.
Thanks in advance!
Android's Room database is a SQL database, while Firebase's Realtime Database is a NoSQL database. There is no direct mapping from the data in your SQL database, to Firebase's NoSQL model.
But it's not clear why you'd want to store the data in Firebase. If you just want a place to store the Room files so you can retrieve them later, you might be better off using Cloud Storage for which Firebase also has SDKs. You can just upload the SQLite file to Storage, and retrieve it from there later.
I'm setting up a home security system using Arduino with some Sensors. I used C language to coding to get sensor data. I already sent that data to MySQL database hosted in 000webhost. now I want to send MySQL data to firebase. (to get real-time data). after I will show firebase data in android app.
so how to do it correctly?
If I get Jason format of Mysql data how to send it to firebase?
Does it need to be linked or just imported? In case of the latter, firebase's realtime database has an import option.
Go to the firebase console
Go to the database settings, initialize the realtime database if necessary
Click the 3 dots on the top right when you're viewing the database and click 'import JSON' and you're good to go
There is no magic process here. Both MySQL and Firebase have API's, so you'll have to write code that read from MySQL and writes to Firebase.
Alternatively you can write straight to Firebase from your C++ code using either the C++ SDK for Firebase, or (more likely) the REST API).
I am using Android Room Database for creating the database for my android app. It works perfectly for me locally but I cannot link to a server to have it online as well.
I am using Firebase for Authentication. I am trying to use Firebase Realtime Database to save the whole database object from Room and load the correct database on app startup according to the authenticated user.
I want to ask if this is possible at all? and if I can just save a whole instance of Room database or I need to re-create the database on Firebase and save my data item by item?
I also can't seem to be able to get access to the database data of Room, as when I get an object of the AppDatabase class it doesn't really pass the data. And I don't know how should do the opposite, to assign the data retrieved from Firebase later to the local data saved?
Also if it's not possible with Firebase, do you have any recommendation for some other server I can use with Room?
After a lot of researches and looking desperately for an answer here's what I reached:
Firebase already got a straight forward way to create the database and host it online. (I had my database already created so was trying to save time, but creating it from scratch using Firebase Realtime Database was a lot faster)
Room Database is quite perfect if you are planning to save your database locally and offline (Up to the post date)
I think their is no need to connect your Room Database with Firebase Realtime database because,okay first try to solve this problem, why we use Room Database ?because when we don't have internet, we can get data from Room Database , no need of network... Firebase also provides offline mode , it can also save data in persistence, so why we use Room Database ?.. Hope you got the point...
Similar project created by me which uses
Firebase authentication to login user
Save and cache user notes to sql lite database with Room
Save user notes to firebase base database
✍️ Simple Note Making App use Sqllite Room 🧰 for caching the notes and 📥 Firebase Database for online storage
https://github.com/LanguageXX/Simple-Note-App-with-Online-Storage
Hope that helps you
I am creating an Android project and in our app, we are going to store the abstract user data and we are creating in Firebase because of its feature of real-time updating. But for doing data analysis we need to store the data in some database, for doing the query operation we have thought of MySQL but on searching regarding my query I have found it can be done but it requires NodeJS support on the server which is not provided by our hosting provider. Is there some other way to handle this problem?