Evaluate the Performance of MongoDB NoSQL Database using Python

Page 1

GRD Journals- Global Research and Development Journal for Engineering | Volume 6 | Issue 1 | December 2020 ISSN- 2455-5703

Evaluate the Performance of MongoDB NoSQL Database using a Case Study Mr. V. Neethidevan Department of MCA Mepco Schlenk Engineering College, Sivakasi

Mr. Navin Dhinnessh Department of MCA Mepco Schlenk Engineering College, Sivakasi

Abstract The NoSQL Databases are now-a-days widely used by many big organizations to handle huge datasets and they have ability for horizontal scaling. The multi-server system has many nodes connected to servers and it uses the concept of Sharding, is a method for distributing data across multiple machines. MongoDB uses sharding to support deployments with very large data sets and high throughput operations. In this system to evaluate the performance of MongoDB, an application is developed with a case study. The Application for Student Mark Information system is developed with Python Tkinter with MongoDB. Using Anaconda as an open source distribution for Python with GUI support from Tkinter is developed for maintaining the various details about students and overall mark details for the entire college. Also the application is developed using Front end as Tkinter for designing the various screens with Graphical User Interface and the necessary collections (tables in RDBMS) are created to store the students and mark details. The data entered by the user is validated before entering in to the database. As Mongo DB is available in cloud as MongoDB Atlas, the data can be stored and retrieved from anywhere from the cloud source in a secured manner. To evaluate the query performance, the method explain() provides the necessary results. Also db.CurrentOp(), methods reports the current operations running on a mongod instance, at the server level. The performance results are added at the end. Keywords- NoSQL Database, MongoDB, Python, Anaconda

I. INTRODUCTION TO NOSQL NoSQL is a non-relational database to store huge amount of data sets and handle vertical scaling. In the recent times more applications were developed using this database in which high availability is achieved. It also useful in dealing with big data and web applications in which more data storage and it uses distributed network which has set of nodes connected with the main server. The data stored in main server is replicated and stored in the various nodes and it provides a way for high availability. It is a schema less database, no need for a rigid schema like traditional databases. Many NoSQL databases supports CAP theorem. It is meant for Consistency, Availability and Partition tolerance. Each NoSQL supports any two properties of CAP.

Fig. 1: CAP Theorem

NOSQL distributed database systems allows to achieve a level of computing power and availability that were not available in the traditional databases. These systems have higher performance, lower latency, and near 100% up-time in data centres that span the entire globe. All rights reserved by www.grdjournals.com

36


Evaluate the Performance of MongoDB NoSQL Database using a Case Study (GRDJE/ Volume 6 / Issue 1 / 007)

II. LITERATURE SURVEY The fast growing of Internet and Cloud computing, need for storing and processing of big data in a more efficient manner and demand for high performance when reading and writing so the traditional database system could not able to do it and facing many challenges. The Authors in [1], described the background, basic characteristics, data model of NoSQL. In addition, classifies NoSQL databases according to the CAP theorem. Finally, the mainstream NoSQL databases are separately described in detail, and extract some properties to help enterprises to choose NoSQL. As more data is generated through various sources for any business, use of NoSQL is rising rapidly among internet companies and other enterprises. The various benefits include simplicity of design, horizontal scaling and finer control over availability. In the paper [2] the Authors , aimed to introduce the concepts behind NoSQL, provides a review of relevant literature, highlights the different NoSQL database types, and provide arguments for and against adopting NoSQL. A small prototype application has been developed to assess the stated NoSQL benefits and illustrate the differences between the SQL and NoSQL approaches. In [3], the characteristics of the data logic model of NoSQL database MongoDB and the mode design principles were analysed, then a method based on anti-normal form model was proposed. This method is based on the theory of data dependency and uses the strategy of decomposition or joint data for the different dependencies to achieve the logic schema design of non-relational database. In [4], authors provided a general overview of the NoSQL storage technology. Later a thorough analysis will highlight the features, strengths and limitations of six most popular NoSQL databases and thus would help the organizations to choose a NoSQL database which is well-suited to their needs. In [5], Authors made a comparison between the most popular NoSQL databases. It examines the need of NoSQL and how they have become an important alternative to relational databases. NoSQL databases can be categorized into four major classifications which are: key value stores, graph databases, wide column stores, and document stores. These categories are compared on the basis of functional features and non-functional features. The non-functional features include performance, scalability, flexibility, structure and complexity. The functional features include de-normalization, joins, atomicity, aggregation and keys. Then for further analysis, one database is selected from each of these categories that is, MongoDB (document stores), Cassandra (wide column stores), Redis (key value stores), and Neo4j (graph databases). Selected databases are compared on their data model, CAP theorem, distributive properties and other factors. By performing the comparison on non-functional features, it has been found that a document store can be used if high performance, flexibility and scalability are required and if we have represented the data in JSON format. Column store can be used for semi structured data which requires high performance and scalability. In [6], Authors discussed each of those database systems and tries to seek out the perfect answer for Big Data necessities. In [7], author described data modelling and query execution in MongoDB Document database. Also explained how data is retrieved from MongoDB Document database without using JOIN. In [8], the Authors made an attempts to use NoSQL database to replace the relational database. It mainly focuses on one of the new technology of NoSQL database i.e. MongoDB, and makes a comparison study with MySQL and thus justifies why MongoDB is liked over MySQL. Lastly, a method is suggested to integrate with different-2 technology of these two types of database by adding a middleware (Metadata) between application layer and database layer. In [9], the study explored information on various NoSQL (Not only Structured Query Language) databases and attempts to make a comparison between them based on different criteria. The NoSQL databases were created to offer high performance and high availability especially for large scale and high concurrency applications at the expense of losing the ACID (Atomic, Consistent, Isolated, and Durable) properties of the traditional databases in exchange with a weaker BASE (Basic Availability, Soft state, Eventual consistency) features. In [10], the performance evaluation of MySQL and MongoDB is performed where MySQL is an example of relational database and MongoDB is an example of non-relational databases. A relational database (the concept) is a data structure that allows you to link information from different 'tables', or different types of data buckets. A non-relational database just stores data without explicit and structured mechanisms to link data from different buckets to one another.

III. EXPERIMENTAL WORK In this system, a case study for STUDENT MARK INFORMATION SYSTEM USING MONGODB-PYTHON TKINTER is developed with Python with Tkinter and back end as Mongodb. The front end is developed with Python using Tkinter. Tkinter is the standard GUI library for Python. Python when combined with Tkinter provides a fast and easy way to create GUI applications. Tkinter provides a powerful object-oriented interface to the Tk GUI toolkit. Creating a GUI application using Tkinter is an easy task. All you need to do is perform the following steps – – Import the Tkinter module. – Create the GUI application main window. – Add one or more of the above-mentioned widgets to the GUI application. – Enter the main event loop to take action against each event triggered by the user. The GUI part is developed using tkinter. In this a case study for student information system is developed as shown in the following diagram.

All rights reserved by www.grdjournals.com

37


Evaluate the Performance of MongoDB NoSQL Database using a Case Study (GRDJE/ Volume 6 / Issue 1 / 007)

Fig. 2: Application Design

Since MongoDB is a NoSQL database, all unstructured data can be inserted in to collection. The collection has semester wise subject information and with the help of the application the user can enter various details about each student final Grade can be calculated and the final mark statement can be prepared for each student. Also the various operations line insertion, deletion, viewing of each student details with marks and updation of various details for each student can be done in an easier manner.

Fig. 3: Output Results

Fig. 4: Output - Mark Details

All rights reserved by www.grdjournals.com

38


Evaluate the Performance of MongoDB NoSQL Database using a Case Study (GRDJE/ Volume 6 / Issue 1 / 007)

Viewing the mark details for a class The whole system is developed using Python under Anaconda, as it is a free and open source distribution of Python that aims to simplify the package management and deployment.

Fig. 5: Output Statistics

A. Evaluation of Database > db.test.find( { a: 1 } ).explain("executionStats") { "queryPlanner" : { "plannerVersion" : 1, "namespace" : "db.test", "indexFilterSet" : false, "parsedQuery" : { "a" : { "$eq" : 1 } }, "winningPlan" : { "stage" : "EOF" }, "rejectedPlans" : [ ] }, "executionStats" : { "executionSuccess" : true, "nReturned" : 0, "executionTimeMillis" : 17, "totalKeysExamined" : 0, "totalDocsExamined" : 0, "executionStages" : { "stage" : "EOF", "nReturned" : 0, "executionTimeMillisEstimate" : 0, "works" : 1, "advanced" : 0, "needTime" : 0, "needYield" : 0,

All rights reserved by www.grdjournals.com

39


Evaluate the Performance of MongoDB NoSQL Database using a Case Study (GRDJE/ Volume 6 / Issue 1 / 007)

"saveState" : 0, "restoreState" : 0, "isEOF" : 1, "invalidates" : 0 } }, "serverInfo" : { "host" : "mca-acer-79", "port" : 27017, "version" : "4.0.10", "gitVersion" : "c389e7f69f637f7a1ac3cc9fae843b635f20b766" }, "ok" : 1 } >

IV. CONCLUSION Thus NoSQL database like a MongoDB, can able to store huge data with horizontal scaling and has the capacity to handle huge amount of dataset. In this system, an application has developed as a case study. The system can able to store details like studentsdetails, mark scored details for all the students of an Institute. After storing details into the database, data is retrieved and manipulated to prepare Mark statement. Also to evaluate the performance of the database during runtime. From the screenshot, it is clearly understood that it could support more data with balanced workload among the different nodes connected to the Primary server.

REFERENCES [1] [2]

Jing Han, Haihong E, Guan Le, Beijing University of Posts and Telecommunications, Survey on NoSQL Database, 2011 IEEE. Jagdev Bhogal; Imran Choksi Faculty of Computing, Engineering and the Built Environment School of Computing, Telecommunication and Networks Birmingham City University, UK, Handling Big Data using NoSQL, 2015 29th International Conference on Advanced Information Networking and Applications Workshops, IEEE. [3] Yunhua Gu1, Shu Shen1, Jin Wang1, Jeong-Uk Kim2 1 Jiangsu Engineering Center of Network Monitoring, School of Computer & Software, Nanjing University of Information Science & Technology, Nanjing, 210044, China, Application of NoSQL Database MongoDB, 2015 International Conference on Consumer Electronics-Taiwan (ICCE-TW). [4] Pragati Prakash Srivastava; Saumya Goyal; Anil Kumar (SMIEEE) Dept. of Computer Science and Engineering Mody University of Science and Technology Rajasthan, India. 2015 IEEE. [5] Adity Gupta, Swati Tyagi, Nupur Panwar, Shelly Sachdeva Jaypee Institute of Information Technology, 2017 IEEE. [6] Dr. Archana Raje1, Aniket Jagdale2 1(Information Technology, K. J. Somaiya Institute of Management Studies and Research, India), IOSR Journal of Computer Engineering (IOSR-JCE), Sql Vs NoSql: NewSql the Solution for Big Data. [7] Rupali Arora, Rinkle Rani Aggarwal, Modeling and Querying Data in MongoDB, International Journal of Scientific & Engineering Research, Volume 4, Issue 7, July-2013 [8] Lokesh Kumar1 , Dr. Shalini Rajawat2,Krati Joshi3, Computer Science & Engineering, Vivekananda Global University, Jaipur, Rajasthan, India, International Journal of Modern Trends in Engineering and Research (IJMTER) Volume 02, Issue 05, [May– 2015]. [9] Abhishek Prasad1, Bhavesh N. Gohil2 1,2S.V.National Institute of Technology, Ichchhanath, Surat,India, A Comparative Study of NoSQL Databases, Volume 5, No. 5, May-June 2014 International Journal of Advanced Research in Computer Science. [10] Dipina Damodaran B1, Shirin Salim2 and Surekha Marium Vargese 3, Department of Computer Engineering, M A College of Engineering, Kothamangalam, Kerala, India, PERFORMANCE EVALUATION OF MYSQL AND MONGODB DATABASES International Journal on Cybernetics & Informatics (IJCI) Vol. 5, No. 2, April 2016.

All rights reserved by www.grdjournals.com

40


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.