Difference between mongoDB and Oracle

Before starting out with the difference between mongoDB and Oracle let us go through about both the databases in brief.


Oracle is an object-relational database system that comprises of table-column-row (TCR) structure. The data in oracle database is stored logically in tables. These tables are then logically grouped in tablespaces. Oracle database physically stores data in data files. Tablespaces contain segments. These segments are made of one or more extents. An extent is the collection of contiguous data blocks. Thus data blocks are basic units of data storage in Oracle.


mongoDB is a NoSQL document-oriented database. It is basically a class and object (CO) structured database. mongoDB contains multiple databases. Each database comprises of collections. A collection is formed of one or more documents. These documents contain fields where data is stored in the form of key-value pair.

As you are clear now with the basic understanding of both the databases let us look at its differences

Difference between mongoDB and Oracle



In RDBMS, the table consists of rows and columns. Table is similar to collection in mongoDB where data is stored in fields made up of key-value pair.


In Oracle, the row represents a single implicit record. It is structured with pre-defined column names. Similar to row in RDMS the records in mongoDB is stored in documents.


A set of data values in RDMS is called column. Column in mongoDB is denoted by Field.


Basically normalization is the best practice in RDMS as it prevents data redundancy and maintains integrity. Normalization is not required in mongoDB as it attains flexibility due to its key-value pair structure.


Oracle consists of Table-Column-Row (TCR) structure. mongoDB is equivalent to Classes and Objects (CO) structure.


To get the complete view of data based on business requirements joins between multiple tables are inevitable in Oracle. In mongoDB the data is stored in a single collection, but separated by using embedded documents. Concept of join is not available in mongoDB.


Schemas are pre-defined in Oracle. mongoDB have dynamic schema which is best suited for unstructured data.

Primary Key

Any column or set of columns can be defined as primary key. Have _id as default key that serves as primary key.


Oracle RDMS database is vertically scalable. mongoDB is scaled horizontally.


Oracle is best suited for query intensive environment where data is required to be structured before using it. mongoDB is best suited for unstructured data that is available in today’s world in the form of social media and multiple other sources.

If you liked the above post, please leave your comments below.

You can also Subscribe here to stay updated on latest posts of OracleMine.com.

2 thoughts on “Difference between mongoDB and Oracle

  1. I want to know if every commited transaction in Mongo DB can be recovered as it can be recovered by Oracle using logfiles and archive log modus?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.