top of page

MongoDB Vs Oracle: A Comparison



Entry



In the 70's, when software engineers transferred the program codes to the main computers by punching a set of papers, Oracle achieved great commercial success by launching its relational database software to the market. In these infancy years of information technology, the possibilities offered by the Oracle database management system have brought huge productivity gains. Afterwards, relational database management systems became the industry standard, and Oracle rose above this standard and became one of the most important technology companies in the world. In the field of database management systems, which has become more critical due to the increasing data size in recent years, a real alternative to existing products has emerged with the emergence of technologies that respond to the needs of the era, such as MongoDB.

Today, companies or institutions are thinking about how they can use their data more effectively in order to get to know their customers (service areas) better, to meet new user expectations, or to gain an advantage over the competition by introducing new products to the market. As a result of the changing and developing nature of needs, the increasing size and diversity of data, and the intense demand for change in the efficient use of resources, many presuppositions in the days when relational databases were developed are no longer valid.




  • Software development efficiency is now more important than in the past in terms of both reducing costs and delivering products to market faster. It is very difficult today to wait months or even years for applications developed with the traditional waterfall methodology and designed according to strict relational models. “Agile” approaches are now valid in software projects, more and more applications are designed as microservices so that development and management are shaped according to needs, and efficiency increase is aimed with DevOps organizations. With these modern approaches, there is an expectation that development times will be reduced to days or weeks, while costs are reduced.



- Instead of the extremely limited data sources and amount of data in the past, there is now a need for judicious management of massive amounts of structured, semi-structured or multi-format data generated by applications such as the next generation web, mobile, social media or the Internet of Things.

- Instead of local data centers in the past, there are now more flexible structures, multiple data centers, global or national cloud architectures. In this way, high accessibility and scalability of applications are guaranteed, while the obstacles preventing developers from rapidly implementing software with appropriate features according to demand are removed.

In line with these needs, databases such as MongoDB, which are based on the document data model and are not tabular, have emerged in order to implement new types of applications and meet modern application workloads, and have been widely accepted by the business world for a while. However, with the newly released version 4.0, MongoDB carries the change it has made in the market to a different dimension. MongoDB announced its full support for multi-document ACID compliance in version 4.0. While ACID was previously supported in a single document, with MongoDB 4.0 it is now possible to implement even the most sophisticated financial transactions in the MongoDB document model. In this way, developers can implement highly complex applications using a modern database designed for today's needs, instead of dealing with the problems of Oracle's architecture designed 40 years ago, while taking advantage of all the modern functionality that MongoDB brings.

In our meetings and conferences, we are often asked where to use a relational database and where to use MongoDB. In this series of articles, we want to answer the question of when MongoDB should be used, and in what situations Oracle, the most common database in the industry, should be used, given the needs and possibilities.


Oracle?



Oracle is a leading global technology company in database management software. It presents its database software, which is currently in version 18c, to the market with a core-based licensing model and additionally for additional features. For many of its users, Oracle's licensing model involves an expensive and inflexible approach. In particular, increasing data volume leads to more core usage, and as a result, Oracle license costs become the most important cost item for the data center.


In Oracle and in relational database technologies in general, you need to shape your database schema in advance according to the application needs and predetermine the rules that include the relationships between your tables in these schemas. Data related to each other are kept in different tables and these relations are provided by join operations. Even the smallest changes to the schemas in relational databases require a migration operation that will take the database operation offline or reduce its performance. Often the database (ie application) cannot be accessed during this operation.


MongoDB Nedir?



MongoDB, MongoDB Inc. It is an open source, non-relational general purpose database management system developed by MongoDB stores data in document model and in BSON (Binary JSON) format. In the MongoDB document data model, the data to be read together is stored together and this data is read quickly with the MongoDB query language. The document data model is flexible; fields may differ from document to document, documents do not need to define their structures beforehand, documents are self-describing. If there is a need to add a new field to a document, it can be easily added without affecting other documents or without the need to update a central data dictionary or take the system offline. Of course, data integrity can be controlled with document validation. The MongoDB document data model is flexible and has control mechanisms to maintain integrity.

The MongoDB document data model natively supports objects in object-oriented programming languages. Thus, application developers can easily learn and use MongoDB. Documents let you store hierarchical relationships, arrays, and other complex data structures.

With the language-specific drivers developed by MongoDB for more than 10 application languages, it is possible to access and access data in a wide variety of structures, make instant queries, real-time analytical studies and benefit from the rich indexing opportunities offered by MongoDB. With these drivers, application developers can have the opportunity to develop more powerful software by using the analytical functions (aggregation framework), secondary indexes provided by MongoDB.




n the document model, the parent-child relationship, which is kept in different tables in the relational data model, can be kept in a single document. Thus, consistency within a single document and ACID compliance for a single document has been in question for MongoDB for a long time. That is, one or more fields can be written in a single operation within the same document, and multiple updates can be made consistently to data contained in sub-documents or arrays. Thus, MongoDB guarantees that updating a document is completely isolated (isolated) and that in case of any error, the entire transaction is rolled back and the data is consistent.

MongoDB version 4.0 has become the first open source database to offer ACID compatibility of relational databases by bringing the above-mentioned transaction consistency to multi-document transactions. With MongoDB 4.0, extremely flexible and intelligent distribution, location-based sharding that allows you to store data in any geographical location, speed, flexibility and ACID compliance have been added to the power of the document data model. With MongoDB 4.0, consistent versions of data are always read. The action taken is either applied to all documents or completely undone. Transactions in MongoDB have the same properties as transactions in relational databases, so application developers can code as they are used to in Oracle when writing code. Transactions that come with MongoDB 4.0 are multi-statement and have a similar coding format (start_transaction, commit_transaction). Thus, an application developer with similar programming experience can use MongoDB transaction features without the need for an additional learning process.

MongoDB is built on a distributed system architecture as opposed to the monolithic, single-server design of Oracle and other relational databases. As a result, MongoDB offers replica sets for continuous availability, data localization, and sharding for horizontal scalability as key features. Accessibility and scalability are integral to the MongoDB design and are extremely easy to implement. There is no need for separate software, additional architectural designs or expensive solutions for these features.


Terminology and Concepts


Its long presence and dominance in the relational databases market has led to many concepts being associated with Oracle. Although a comparison has been made here with Oracle, you can find the basic relational database concepts and their MongoDB equivalents in the table below.


Like Oracle, MongoDB offers rich content and functional features unlike other simple NoSQL data stores. MongoDB has a rich query language, supports very useful secondary indexes including text search and geospatial data, enables analytical programming with a very powerful aggregation pipeline, faceted search and graph style. It contains queries (graph processing). With MongoDB, you can use many different data types that are not supported by relational databases in a scalable architecture with all these features. You can find the Oracle and MongoDB feature comparison in the table below.


Both Oracle and MongoDB have a powerful query language. In contrast to the SQL and PL/SQL languages offered by Oracle, MongoDB offers a complete alternative to the rich query language Xpressive Query Language and Javascript coding on the database. Xpressive Query Language by MongoDB is an easy language with similar logic to SQL. Below you can find examples of how to write certain SQL examples in the MongoDB query language.




Why and Where MongoDB Instead of Oracle?


Many businesses, small and large, develop their applications with MongoDB, and some are renewing existing applications with MongoDB. With its innovative design and features tailored to modern needs, MongoDB enables these institutions to develop applications faster, benefit from different types of data, and manage applications of all sizes more effectively.

Application development is made much easier because the MongoDB document data model is directly mapped to the data structures of modern object-oriented programming languages. Objects defined in object-oriented programming languages, which are the de-facto standard of the modern software world, have no equivalent in relational databases, and object to relational mapping is required to convert these objects into relational models. This process means that a conversion process is performed between the software production and the database every time, thus a waste of time and efficiency. The difference between object-oriented programming languages ​​and relational database worlds is an important bottleneck in software production. MongoDB supports objects natively, no conversion is required. Data modeling in MongoDB is done according to application needs and the principle of storing data read together.


When comparing databases, license costs are an important consideration that should not be overlooked. Due to the increasing data volume and strict licensing methods of traditional database companies, these costs have become one of the most important expense items of data centers. In addition to the license cost, it is useful to add hardware, development and operation investments to be made focused on database management systems and additional tools that should be used according to the high accessibility and sustainability needs of modern applications to the total purchase cost items. Many different institutions in many different countries of the world, especially by switching from Oracle to MongoDB, declare that they have saved up to 70% due to the factors such as the developer productivity they have gained and the reduction in license and hardware costs.

By scaling to single or distributed data centers, MongoDB achieves levels of availability and sustainability that were not previously possible in relational databases. As your data and processing needs increase, MongoDB can scale horizontally on standard hardware in line with these needs, and this scaling does not require a change in the application or the application to be offline. Achieving the same scalability in Oracle requires serious architectural work, specialized and expensive hardware, and often taking the application offline.


Who uses MongoDB instead of Oracle?

In the examples below, you can find information about some organizations that are reducing costs while delivering radical benefits in developer productivity, application performance, and scalability. You can contact us at survey@karadanismanlik.com.tr e-mail address for more or examples related to your own application areas.


  • Finance giant RBS modernized its investment banking systems with a data factory approach using MongoDB. As a result, hundreds of Oracle servers were shut down, developer productivity in new applications was accelerated, and millions of dollars were saved in building a scalable and simplified cloud-ready infrastructure.



  • Telefonica has moved its customer personalization service from Oracle to MongoDB. 7 application developers, a long and iterative development process and a 14-month period were needed for the system, which was developed with Oracle and is not possible to use. On the other hand, the application, which was developed with a 3-month study of a 3-person development team using MongoDB, supports all old and new products on a global scale. MongoDB assists Telefonica with agile development, cost savings and new revenue generation applications.



  • China Eastern has converted its trip search application from Oracle to MongoDB. Using MongoDB allowed the company's project management and engineering teams to develop an application that was not possible with Oracle. The simplicity of the document data model, dynamic schema design, language-specific drivers, and indexing options mean development teams can now implement new applications much faster and at much lower cost.


What are common application areas for MongoDB?

MongoDB is a general purpose database used for many different application areas. To date, MongoDB has mostly been used in areas such as single view, IoT, real-time analytics, personalization, catalog and content management. With its multi-document ACID compatibility, MongoDB now offers a highly reliable database technology for all application areas, including financial transactions.


When Oracle?

Many organizations are migrating many of their applications, including critical and revenue-generating applications, from relational database management systems to MongoDB. However, of course, it may not be realistic for legacy applications that are completely relational and designed on SQL, especially with their ecosystem, to suddenly switch to MongoDB. With a pragmatic and realistic approach, it would be best to take advantage of MongoDB's advantages for new applications, evaluate the process and costs of converting existing applications to MongoDB and make a cost-benefit analysis. We would be pleased to assist you in your digital transformation projects by conducting a reconnaissance study in your company for the difficulties and transformation possibilities you experience in your Legacy applications. Please contact us at our e-mail address survey@karadanismanlik.com.tr.

MongoDB is a general purpose database management system designed for modern needs. You can easily implement your critical applications with MongoDB.

We are happy to assist you with any questions or needs regarding MongoDB. Catch the future while reducing your costs with MongoDB, MongoDB will come!

 
 
 
kara_beyaz_v2-arkaplansız.png

As Kara Consultancy, we provide Business Intelligence, Big Data, Data Warehouse solutions in fast, easy and scalable way with our products and services together with more than 25 years experience.

 

Kara Danışmanlık olarak müşterilerimizin iş zekası, veri tabanı teknolojileri, büyük veri ve veri ambarı ihtiyaçlarına yeni nesil, hızlı, kolay ve ölçeklenebilir çözümler sunuyoruz.

Teknolojiler

Exasol

MongoDB

Tableau

İletişim

Cevizli Mah. Zuhal Cad.  Ritim İstanbul No.44/B Blok Kat:16 D.163 34846 Maltepe/İstanbul 

Telefon: +90 (542) 717 35 57

Mail: survey@karadanismanlik.com.tr

Pazartesi - Cuma: 09.00 - 18.00 Cumartesi - Pazar: Tatil

Monday - Friday: 09.00 - 18.00 Saturday - Sunday: Closed

  • Youtube
  • Twitter
  • Instagram
  • Linkedin
bottom of page