Sanket Bhosale
8 min readApr 28, 2021

--

Comparative study of Firebase realtime db and Mongo db

Sanket Bhosale1, Prof. Nirupma Singh2

U.G. Student, School of Engineering , Ajeenkya DY Patil University, Pune, Maharashtra, India1

Assistant Professor, School of Engineering , Ajeenkya DY Patil University, Pune, Maharashtra, Maharashtra, India2

ABSTRACT: — The purpose of this study is to introduce everyone with real-time information such as the Google firebase API, Mongo DB and their features. Firebase is an API provided by Google for data storage and syncing on your Android, iOS or web application. Rethink DB is the first open source, open source JSON database built from the ground up to the real-time web. Mongo DB is a product between related data and the nosql database using distributed technology. A real-time website is one that stores data on a website and downloads data to it very quickly but Firebase is not just a real-time database, it is much more than that. Mongo DB is an unconnected database that stores data without explicit and structured methods of linking data from separate buckets to each other.

Keywords: Google Firebase API, MongoDB, Features, Obstacles, Website Model, Editing, Restrictions.

INTRODUCTION: -A real-time database is a cloud-based database. The data is stored as a JSON format and synchronized continuously for each corresponding client. When you create shortcuts for iOS, Android, and JavaScript SDKs, a large portion of your customers’ needs are based on a single Real-Time Database and as a result you get updates with current data. Database is a set of organized data. The data can be stored locally on your computer or stored in cloud storage. All apps, whether Android, iOS or web application, have their own database. In the Android app, we can create data using SQLite, shared favorites, websites or cloud-based storage sites. The basic idea is to create a well-organized database and download data where needed. Firebase is also a backend database for android, iOS and web applications. Firebase is Google that provided a data API to create a database and download it in real time with a few lines of code. The data is stored as JSON and is available on all platforms. MongoDB is an open source database that provides high performance, high availability, and default rate. RethinkDB has a questionnaire that supports very useful questions like table and group joining, and is easy to set up and read. The Real-Time Data Base program can be defined as those computer programs designed to work in real time2.

Literature review:-

Walter Kriha [1] in his article talked about the systematic review of the NoSQL database and general concepts, strategies and patterns as well as several categories of NoSQLdatabase (store prices / prices, information details, column details) and individual products. The pros and cons of using the NoSQL database were discussed.

Supriya S. Pore, Swalaya B. Pawari [2] conducted a comparative study. Research highlights similar types of information and distinguishes between them. Axiomatics of SQL and NoSQL data is described in this paper. The study states that due to data instability, ACID assets are not used in NoSQL information

Vatika Sharma, Meenu Dave [3] provided a detailed NoSQL database focusing on how to minimize managing its origin and features.

Daniel Pan [4] in his article showed you how to connect firebase to the Android app and the basics of designing data formats in Firebase.

The Landon study *** [5] highlights the comparison between SQLite and firebase. It also focuses on organizing data in the form of a JSON tree that will be stored in Firebase.

Walter Kriha [6] in his article talked about the systematic review of the NoSQL database and general concepts, strategies and patterns as well as several NoSQLdatabase categories (key / store values, details, details) and individual products. The details and disadvantages of using the NoSQL database have already been discussed.

Supriyae, Swalaya B. Pawari [7] conducted a comparative study of SQL and NoSQL. The study highlights data types such as SQL and NoSQL, and distinguishes between them. Axiomatics of SQL and NoSQL data is described in this paper. The study states that due to data instability, ACID assets are not used in NoSQL information

Vatika Sharma, Meenu Dave [8] provided a detailed NoSQL database focusing on how to narrow down SQL law with its origins and features.

[9] Kumar, 2017 conducted a comparative analysis of 3 data-MongoDB, Cassandra, HBase using YCSB. Data were tested in 3 different performance loads, 50% and 50% readings, 100% read and 0% readings, 0% readings and 100% readings and the overall result was that Cassandra released the entire data list . A recurring feature was learned in this test. While the recurring factor increases, Cassandra and MongoDB performance decreased while HBase provided better performance.

[10] Kristic, 2018 made NoSQL data performance measurement using the YCSB measurement tool. Details to be considered are: — HamsterDB, BrightstarDB, LevelDB, RavenDB and STSdb ​​and the parameters provided are faster to write and write. Complete completion of the tests, with the speed of installation, the HamsterDB was much better compared to the others while BrightstarDB was the worst in this situation. Fast learning, STSdb ​​and levelDB provided very high performance and BluestarDB output was much smaller than others.

[11] Tang, 2017 investigated 5 data comparisons of NoSQL- HBase, Redis, Cassandra, MongoDB and Couchbase using the YCSB tool. The focus was on data loading and task loading. Redis has achieved excellent results in the event of data loading due to a persistent approach. Cassandra and HBase almost dropped 1.7 and 1.8 times respectively. Couchbase has done the worst. Work performance is performed using the A, C and H loads. Redis usually covers all other details that keep performance very high. HBase and Cassandra have been moving very slowly due to the family structure of the column and MongDB and Couchbase have provided better performance due to the final format of the document which provides inconsistent reading and writing. When performance recording increases.

4. COMPARISON

Firebase

Mongo DB

Description

Cloud-hosted

realtime document

store. Ios, Android, and

JavaScript clients share

one Realtime Database

instance and

automatically receive

updates with the

newest data.

One of the most

popular

document

stores

DB Engine

Ranking

Score 3.81

Rank 60(overall)

Score 335.0

Rank 5(overall)

Documentation

https://firebase.google

.com/docs/database/

https://docs.m

ongodb.com/m

anual/

Website

https://firebase.google

.com/

https://www.m

ongodb.com/

License

commercial

Open Source

Cloud based

Yes

No

Server

Operating

system

hosted

Linux

OS X

Solaris

Windows

5. REAL TIME DATABASE MODEL

 Any new transaction must go through an entry control function, which monitors and manages the total transaction amount running simultaneously within the system to avoid transaction failure.

 Each new or redistributed activity is assigned a Critical Level, which sets out its planning objectives for the following activities within the plan.

 Before an employee can perform a data task, he or she must obtain a Financial Management component so that he or she can adapt the required requirements. In the event that the granule exchange requirement is denied, the transaction will be entered into a waiting line.

Trans Pending work will be redone when the requested granule is found, after which the work will do its job.

 Similarly, if the current function is not in the main memory, the O / O request is started and the function will be placed in the catch line.

The exchange ladder exchange will re-operate when the requested granule is found in the main memory, and there is no solid exchange of great demand.  When a transaction completes all of its functions, it produces its results and extracts all the data items you have. Trans Work can abort / restart several times before work. There are different types of abortions:  Abortion:

Abortion as a result of losing a deadline, or

 Abortion — the practice can be aborted due to the prevailing condition. Chronic abortion: Abortion as a result of conflict or data conflict. In this case, the transaction is likely to resume if its deadline remains active.

6. SCHEDULE OF TIMETABLE

The Real Time database system provides a feature with respect to common data sources data stored in the database. Actions that access this data should be organized according to real-time performance goals. The process of real-time data processing consists of: Financial Management Management

Protein Dispute Resolution Decisions Protocols: Locking, Expiration, Multiple Changes, Verification — all with the same purpose; e.g., forcing serializability. These Protocols must be amended and their trade must be re-evaluated under RTDB programs. 1. Financial Management Protocol: Locks used to synchronize compatible actions — Locking Phase (2PL). All lock functions precede the first opening function in the sale, the expansion phase (locks are available), the diminishing phase (locks are removed), has a blocking problem, advanced modification. 2. Dispute Resolution: The Most Important Dispute Resolution — the system itself is designed to use time stamps. Adjusted so that the system can use priority instead of time stamps. The amended plan contains the Most Important and Advanced Abortion.

7. DEADLOCK Deadlocks:

Whenever a set of tasks includes a circular wait in what is known as a waiting graph. Five policies for resolving issues you are considering: service time structures, operating costs for the abdomen. 1. Policy 1: a. Every time you issue a transaction that includes a ban on policy 2: a. Trace the prescribed cycle b. Delete the first transaction you encounter in the inconsistency cycle. c. If no transaction was found, delete the transaction with the most important deadline. Policy 3: a. Trace the deadlock cycle. b. Delete the first transaction you encounter in the inconsistency cycle. c. If the delayed service is not available, delete that purchase by the deadline. Policy 4: a. Track the deadlock cycle, then delete the first delay function you encountered in the deadlock cycle. b. If no delay action is available, remove this function with minimal criticism. 5. Policy 5: a. Take out the impossible transaction with a little criticism. b. If all else fails, discard potential transactions at a lower cost. c. This policy is sensitive to the accuracy of the calculation time because it requires information about the remaining processing time d. Therefore; The time requirements for doing everything at the beginning of each activity should be known.

8. CONCLUSION

In this paper we make a comparison between firebase, Mongo DB & Rethink. We have come to the conclusion that RealTime Data Base System can also be described as Traditional Data using the extension to provide additional capabilities to generate reliable feedback. As data is stored in the cloud it is easily accessible from anywhere. If your app works with a single DB, and is reviewed by multiple users — it is beyond the power to manage real-time data updates between devices. We learned about Google given the firebase API, Mongo DB & Rethink and its unique features and challenges. By using this feature, there is no need to build your own database or API, a real-time database handles all the most common things that come with building a backend for applications This study provides an in-depth study of various real-time applications.

References:-

[1]Kriha Walter, 2009 NoSQL Databases Hochschule der Medien. Stuttgart Media University. Stuttgart. [2] Pore Supriya S, Pawar Swalaya B, 2015. Comparative Study of SQL & NoSQL Databases. International Journal of Advanced Research in Computer Engineering & Technology (IJARCET). Volume 4 Issue 5, May 2015

[3] Sharma Vatika, Dave Meenu. 2012. SQL and NoSQL Databases. International Journal of Advanced Research in Computer Science and Software Engineering. Volume 2, Issue 8, August 2012.

[4] Daniel Pan. 2016. Firebase Tutorial. October, 2016.

[5] Cox Landon. 2017. SQLite in Android. March 2017.

[6] Kalsov, 2012. Developer Meet Firebase dated 18/3/17.

[7] “Firebase Realtime Database”. Firebase, Inc dated 18/3/17.

[8] Bill Stonehem, Google Android Firebase: Learning the Basics Paperback, 2016 dated 18/3/17.

[9] Kumar, R. and Mary, R. (2017). Comparative Performance Analysis of various NoSQL Databases: MongoDB, Cassandra and HBase on Yahoo Cloud Server. Imperial Journal of Interdisciplinary Research (IJIR), 3(4), pp.265–269.

[10]Krstic, L. and Krstic, M. (2018). TESTING THE PERFORMANCE OF NoSQL DATABASES VIA THE DATABASE BENCHMARK TOOL. Military Technical Courier, 66(3), pp.614–639.

[12]Tang, E. and Fan, Y. (2017). Performance Comparison between Five NoSQL Databases. International Conference on Cloud Computing and Big Data, pp.105–110.

[13]Matallah, H., Belalem, G. and Bouamrane, K. (2017). EXPERIMENTAL COMPARATIVE STUDY OF NoSQL DATABASES: HBASE VERSUS MONGODB BY YCSB. ResearchGate.

--

--