Firebase is a real-time database that can be an excellent choice for apps that need to handle data in real-time across multiple devices.
The database service of Firebase is called Cloud Firestore. It works in nearly real-time, fetching changes from your database as they happen.
MongoDB is a cross-platform document-oriented database program. Firebase and MongoDB are working to create robust, convenient, and scalable modern database platforms for web and app developers.
MongoDB is a schemalessdatabase because one collection holds different documents.