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.|
|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.
Hi I am Paras.
Thanks for stopping by at OracleMine.com. Speaking about my brief introduction, I work for a multinational organisation in Oracle related technologies. Being an avid blogger, I would like to inform you about my productivity and motivational blog XpressPlanet.com. Speaking of OracleMine.com, I will try my best to share knowledge on technologies in as simple and understandable manner as possible. You can also contribute your knowledge on OracleMine by writing to us at email@example.com. Again I appreciate your visit. Hope to see you again and again!