I am fairly new to Firebase, I have some knowledge of databases because I have worked with MySQL before but reading the benefits of Firebase and what it has on offer - real-time database, login (auth), analytics etc.
I am looking to implement Firebase into the project I am working on. Whilst MySQL is a relational database, through my search I found (I believe) Firebase is a hierarchical database because of the how it structured database like a JSON-tree.
Following the correct way of development, I would like to draw ERDS and database tables to get an idea of how my project will communicate with the backend. However, I am not quite sure how I can represent the data structure using these mediums because in SQL you would have primary keys and foreign keys linking tables. Is this the case for Firebase as well?
For example, in MySQL the table would look like:
The ERD would like like:
My questions are:
I am new to Firebase, so any help would be nice. Thanks.
Compared to Firebase, MySQL is better for multi-row transactions. On the other hand, Firebase is a satisfactory choice when it comes to managing huge data sets because NoSQL horizontally scales data and it is much faster than MySQL.
It is not possible to use Firebase in this way. Firebase is a real-time object store. It is not a SQL database and is not intended to be a replacement for one. It completely lacks mechanisms such as JOINs, WHERE query filters, foreign keys, and other tools relational databases all provide.
This is an incredibly broad topic, as can be seen by the fact that you have four questions in a single post. I recommend watching our Firebase for SQL developers series and reading NoSQL data modeling.
A few quick answers:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With