Today is the rise of popularity of NoSQL databases, such as Firebase Realtime Database and MongoDB etc.. both best for web or mobile development but I much recommend to use MongoDB instead of Firebase.
And then I recommend to use Offline First Approach for your social media app wherein you need build an application's core features to function with or without an internet connection. For this approach I recommend to use PouchDB to sync your data to your user browsers and they can use your app even without internet. But along with PouchDB you need to sync your data to a database, based from their documentation you can only sync your PouchDB data to CouchDB, Cloudant, and PouchDB Server.
So I like to recommend combination of PouchDB with MongoDB but I still doubt if it works, read this stack question. Or PouchDB with CouchDB/PouchDB Server.
Try the following also read this for additional database combination:
- https://www.gangboard.com/blog/what-database-does-facebook-use
- https://www.techworm.net/2013/05/what-database-actually-facebook-uses.html
- https://www.quora.com/What-do-big-websites-like-Facebook-Google-Twitter-and-LinkedIn-use-for-their-database-What-would-be-the-pros-and-cons-of-what-they-use-and-why