With the advent of E-Commerce, businesses persistently examine various ways to improvise and accomplish their demands with web engineering that provide notable resolution. The progress in economic status demands colossal databases that store the data efficiently. The databases currently used are relational or non-relational. Both these types have their benefits and limitations that influence the overall processing of data. Non-relational databases are referred to as NoSQL-not only SQL, and Relational databases are known as SQL-Structured Query Language. It has been suggested in many studies that NoSQL databases surpass SQL databases. Our paper aims to evaluate these claims by analyzing the CRUD [Create, Read, Update, Delete] operations executed by both database types.
Introduction
I. INTRODUCTION
In the past, numerous operations extensively employed relational databases to collect data. The relational database suggested the elementary structure in the format of a table that held a row and column. It could be arranged through the SQL query language to insert, delete, update, and read data. Although, it is not a technology that can measure, achieve and deliver constant accessibility needs for backing online operations. Therefore, relational databases have stumbled to keep up with the surge of modernization.
The most feasible database option for online web and mobile operations have to support the volume of data that increases enormously as well as the class of data with further variety similar to amorphous data, structured data, and semi-structured data. Also, it's necessary to have a database system that can be reused with large quantities of data briskly and in inelastic situations. However, even if the Relational database is celebrated, it may not be compatible with the growth conditions that bear added performance systems. To beat this challenge, NoSQL, which is a non-relational category, is established. Thus, there are multiple discussions in the database world to displace the relational database system with the NoSQL database system. Presently, the NoSQL database has been further popularized in the conventional information system.
Still, there's a problem for the database developer to choose a NoSQL database or relational database to reposit information in their systems. They've data that suggests that a NoSQL database is applicable for unstructured data to store a substantial amount of data. In fact, when we need to collect structured data and to accumulate a large quantum of data, a NoSQL database may be just good enough when not compared to the relational database because the relational database can collect data in the form of a table and can store data that is structured as well. Also, NoSQL databases give high adaptability. They do not own a stringent database schema. They can contain information on the heterogeneity of configurations.
We choose MongoDB as a representative of NoSQL databases because it's a robust open-source database with an expanding community evolving and endorsing it. On the other hand, we use MySQL to assess SQL databases as it uses SQL. In this paper, we aim to compare the performance between MongoDB, a NoSQL database that is the crucial- value type database and MySQL, a relational database. We probe which situation is better and compare the performance from processing time. We differentiate between insert operation, delete operation, update operation, and read operation in the same dataset.
II. RELATED WORKS
In recent times, there are numerous experimenters tendering the comparison between anon-relational database and relational database because they would want to detect the competent database for their work and there are multiple NoSQL databases that have advantages and drawbacks. Many papers compare the effectiveness between non relational and a relational database. Similar as [1], [2] compared the effectiveness between Redis and SQL server. In [1] experimented in 4 operations that corresponded to the insert, update, delete, and select operation.
The result of running a trial displayed that Redis had better runtime performance for insert, update and simple query. SQL server performed more when streamlining and querying by non-key attributes, as easily as for aggregate queries. In [2] experimented in 5 operations that accorded the insert, update, delete, select and general queries. They tested on the same dataset for a commonplace e-commerce schema. The results showed that MongoDB performed better than SQL server for utmost operations except aggregate function queries. Also, some exploration, In [3] compared MongoDB with MySQL. In [3] disassociated the trial into four operations that consisted of the insert, update, delete and select operation. They experimented in panel operation. The results of the experimentation showed MongoDB had better performance than MySQL. In [4] compared performance of querying. They divided querying into two classifications that consisted of the simple query and complex query. Their results showed MongoDB had more efficient performance than Oracle in the simple query, but Oracle had better execution than MongoDB in a complex query. In [5] experimented to compare the performance of relational database (MySQL) and graph database (Neo4J). Their results showed that Neo4J was double-quick than MySQL in querying the results. A few experimenters use MongoDB to be representative of the NoSQL database because it is established longer than other databases. Still, it can show only that MongoDB, one kind of document database, is outperformed than a relational database in beaucoup case studies. There are still many NoSQL databases that are applicative.
In this paper, we concentrate on the comparison between MongoDb as a NoSQL database and MySQL as a relational database in the same environment.We run our tests in four queries that include an insert operation, an update operation, delete operation and select operation. The several queries performed on the MongoDb database which original queries in SQL language have been carried out on MariaDB. We relate to the system of [6] for uses as guidelines in the coding of our trial.
III. COMPARISON
As bandied over, the main goal of our paper is to talk over the differences in the performance of SQL and NoSQL databases in E-Commerce. We operate MongoDB and MySQL to represent NoSQL and SQL respectively. There are a many vital points to remark before commencing to collate between the two types.
The first and foremost is that the structural composition of both of these databases should be considered. The NoSQL databases, and specifically MongoDB, don't abide by the relational model. MongoDB can regard all of the reposited data as a library, without facing some challenges like empty or NULL fields. But on the other hand, there are generalities and operations in relational databases called normalization, which is known for resolving many abnormalities like redundancy and blank fields. Thus, Still, we must, if we are required to analogize these two database engines, evaluate each one under its conventional circumstances and under the data model that the database is engineered for.
Ultimately, the alternate pivotal point is that it examines that their end is a comparison between two systems, it should be reckoned that to reduce any inscrutability related to vivid processing expenditure of commerce interfaces of target networks, a common interface should be applied for all systems.
IV. EXPERIMENT RESULT
In the following, we've assigned one subsection to each trial, which desired operation or query is expressed and the outcomes are demonstrated in that.
A. INSERT Operation
The INSERT INTO Statement is used to add new rows of data to a table in the database. The evaluation shows that MongoDB has a higher speed of execution of the INSERT operation.
B. DELETE Operation
The DELETE query is used to delete the already present records from a table. We pair the DELETE query with the WHERE command to delete the selected rows, otherwise all the records would be deleted. It is seen that MongoDb outperforms MySQL.
The first DELETE query took 0.3524 seconds to perform in MySQL, while in MongoDB it was performed in 0.0028 seconds and the second delete was performed in 0.8231 seconds in MySQL and 0.0064 seconds in MongoDB.
???????C. UPDATE Operation
An Update query is a type of action query that makes alterations to many records at the same instant. It has been noted that MongoDb showcases superiority in this section as well.
The first UPDATE query took 0.0987 seconds to perform in MySQL, while in MongoDB it was performed in 0.0021 seconds and the second update was performed in 0.0428 seconds in MySQL and 0.0013 seconds in MongoDB.
???????D. SELECT Operation
A select query is a database object that displays information in Datasheet view. This query does not store data, however, it shows data that is stored in tables.
The first SELECT query took 0.00187 seconds to perform in MySQL, while in MongoDB it was performed in 0.0011 seconds and the second update was executed in 0.6478 seconds in MySQL and 0.0052 seconds in MongoDB.
ACID:Atomicity, Consistency, Isolation and Durability
Database
Document type,key-value pair,graph databases
Table types
Schema
Support dynamic schema
Support pre-defined
Language
Structured Query Language
Unstructured Query Language
VI. ACKNOWLEDGMENT
I would like to express my gratitude to my professor Amit Hatekar and our parents for their immense support and guidance.
Conclusion
MongoDB provides good adaptability in database evolution procedure and in this database engine the data surroundings are suitable to be developed horizontally. Data with distinctive complications can be fitted into this database in the form of one field. MongoDB can be used in circumstances where data are authentically substantial or database structure is altered continuously. In fact, MongoDB can effortlessly manage vital schemas similar to document operation systems that correspond to several dynamic fields and only a limited searchable field. For those users that use a fairly stronger and further structured schema, MongoDB still presents better results in terms of performance and speed in numerous cases. Still, it should be noted that the weakness of MongoDB occurs when aggregate functions are done on non-key attributes. The type of data still needs to be classified according to the company’s plan of action to use the database. In future works, we plan to estimate the operation of MongoDB and SQL in a distributed terrain to estimate their performance, especially when the in- memory mode of relational databases is used.
References
[1] Wittawat Puangsaijai, Sutheera Puntheeranurak, “A Comparative Study of Relational Database and Key-Value Database for Big Data Applications” 5th International Electrical Engineering Congress, Pattaya, Thailand, 8-10 March 2017.
[2] S.H. Aboutorabi, M. Rezapour, M. Moradi and N. Ghadiri, “Performance evaluation of SQL and MongoDB databases for big e-commerce data,” In Computer Science and Software Engineering (CSSE), 2015 International Symposium on, pp. 1-7. IEEE. 2015.
[3] C. Gy?rödi, R. Gy?rödi, G. Pecherle and A Olah, “A comparative study: MongoDB vs. MySQL,” In Engineering of Modern Electric Systems (EMES), 2015 13th International Conference on, pp. 1-6. IEEE, 2015.
[4] A. Faraj, B. Rashid and T. Shareef, “Comparative study of relational and nonrelational database performances using Oracle and MongoDB systems,” In International Journal of Computer Engineering and Technology (IJCET) Volume 5, Issue 11, November (2014), pp. 11-22.
[5] G. Jaiswal and A.P. Agrawal, “Comparative Analysis of Relational and Graph Databases,” In IOSR Journal of Engineering (IOSRJEN) e-ISSN: 2250-3021, p-ISSN: 2278-8719 Vol. 3, Issue 8 (August. 2013), ||V2|| PP 25-27
[6] Josh Sherman, “MySQL and Redis Command Equivalents,” Available in https://joshtronic.com/2013/07/29/mysql-and-redis-command equivalents/.
[7] Canonical Group Ltd., “Sample database with test suite 1.0.6 \"employees-db-1.0.6,” Available in https://launchpad.net/test db/employees-db-1/1.0.6
[8] Cornelia Gy?rödi.,”A Comparative Study: MongoDB vs. MySQL”,Available in https://www.researchgate.net/figure/2