MongoDB- A Quick Intro

39027b3c080041e1a1b5189233f19d66
0

The Common DB that we use to store Data is SQL DB, Oracle DB. Any relational database has a typical schema design that shows number of tables and the relationship between these tables. While in MongoDB there is no concept of relationship.

MongoDB is a cross-platform, document oriented database that provides high performance, high availability, and easy scalability. MongoDB works on concept of collection and document. It is an open-source document database and leading NoSQL database.

Database: Database is a physical container for collections. Each database gets its own set of files on the file system. A single MongoDB server typically has multiple databases.

Collection: Collection is a group of MongoDB documents. It is equivalent of an RDBMS table. A collection exists within a single database. Collections do not enforce a schema. Documents within a collection can have different fields. Typically, all documents in a collection are of similar or related purpose.

Document: A document is a set of key-value pairs. Documents have dynamic schema. Dynamic schema means that documents in the same collection do not need to have the same set of fields or structure, and common fields in a collection’s documents may hold different types of data.

Main purpose to use MongoDB is speed and its simplicity because mostly databases are too much slow to fetch data and PHP needs to wait for databases most of the time and web development is impossible without database so if you want to work fast with database, MongoDB is best option you have.

The collection object should be used to perform basic operations to manipulate its information. For instance, if you want to store information about a person you use code like this:

Let’s see one example of Contact form-

Contact form contains contact information of user like user contact number. If user have multiple contact numbers like residential, mobile number, company number and even if you want to store more information like this,then you need to take relational table for same and if you move to relational table, you need to apply Join query to retrieve information of user in our traditional database.Whereas in MongoDB everything is stored in document so there is no need of JOIN operation.Everything stored in MongoDB is in one document. All numbers are associated in same record without JOINs and if you would like to include a collection of contact information of a user, you can simply create an embedded doc in MongoDB.

Below given table shows the relationship of RDBMS terminology with MongoDB

 

RDBMS MongoDB
Database Database
Table Collection
Tuple/Row Document
Column Field
Table Join Embedded Documents
Primary Key Primary Key (Default key_id provided by mongodb itself)
Database Server and Client
Mysqld/Oracle mongo
Mysql/sqlplus mongo

 

MongoDB Developer and Administrator Certification Training

Advantages of MongoDB over RDBMS:

  • Schema less: MongoDB is document database in which one collection holds different documents. Number of fields, content and size of the document can differ from one document to another.
  • Structure of a single object is clear
  • No complex joins
  • Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that’s nearly as powerful as SQL
  • Tuning
  • Ease of scale-out: MongoDB is easy to scale
  • Conversion / mapping of application objects to database objects not needed
  • Uses internal memory for storing the (windowed) working set, enabling faster access of data

Why should use MongoDB:

  • Document Oriented Storage : Data is stored in the form of JSON style documents
  • Index on any attribute
  • Replication & High Availability
  • Auto-Sharing
  • Rich Queries
  • Fast In-Place Updates
  • Professional Support By MongoDB

Where should use MongoDB?

  • Big Data
  • Content Management and Delivery
  • Mobile and Social Infrastructure
  • User Data Management
  • Data Hub

Career options with MongoDB

Once you know this skill set, your demand will increase in the market. Lot of web application and e-commerce websites have migrated to Mongo DB. As it is open source so help is easily available on the internet. Many developers have started adopting it. MongoDB hires techies from Oracle and Teradata. It’s advisable to know this skill as lot of companies like Sapient, Infosys and Accenture are hiring MongoDB experts.

MongoDB Developer and Administrator Certification Training

{[40% higher salary than Avg Oracle admin salary Get MongoDB Job Offers],[5000]}

Blog Author

Follow :

Related Blogs