Reputation: 1043
I come from SQL background, so Firebase is pretty big shift for me. My most recent project requires me to consider only useing Firebase for data and file storing.
The project is a social messaging app that has already up to 100K registered users.
My concern is, can Firebase fully substitute SQL? Features that I find problematic:
I want to avoid situation 2 years down the line, when 50 million messages have been sent and suddenly a bad-language filter needs to be put in place. Now what.
In SQL I would run
delete from messages where content like "%bad-word%"
5 minutes later, done.
So my question is, can Firebase fully substitute SQL?
Upvotes: 0
Views: 1078
Reputation: 3377
No, firebase can't fully substitute SQL as of now. But there are solutions to the problems you mentioned while using Firebase with 3rd party systems or custom implementations.
Before considering firebase for your solution in place of SQL, you should consider that it is noSQL, and has entirely different paradigm. There are many usecases that are easy to implement with noSQL, so it depends on the scenario. Firebase is better suited for realtime scenarios.
Firebase (Real Time DB or Firestore) doesn't have full text search as of now. You will have to use Algolia or ElasticSearch or do some custom implementation similar to this (and some other articles available online).
If blocking users simply means adding an entry to some one on one table that tells user X blocked user Y, firebase can do it with realtime execution.
We can remotely logout users using admin sdk, like this.
Not supported. You will have to maintain a count key for each stat you want to get, else you will have to fetch all (or partial of all) data and count on client side.
You can query records on a number of factors. As a reference please look at firebase firestore queries.
Please let me know if you have any questions.
Upvotes: 1