Introduction to mongoDB [ AF - Week 04 - Y3S1 ]

This week was the fourth week of this 1st semester of third year.This week has not end but I am updating this blog post from the middle of the week.


1.) Application Framework [ AF ]
In this week there was a lecture by Mr.Kushira Godellawatta basically about 
MongoDB. 
  • How to setup the environment in the PC
  • How to use the database   

 

MongoDB

 
MongoDB is a document-oriented NoSQL database using for high volume data storage. Instead of using tables and rows as in the traditional relational databases, it makes use of collections and documents.
Documents consist of key-value pairs which are the basic unit of data in MongoDB. Collections contain sets of documents and function which is the equivalent of relational database tables. 
 
 
Why to use MongoDB  
  1.  Document-oriented - MongoDB is an example for NoSQL database, which is not having data in relational format, it stores the data in documents.
  2. Indexing - Indexes can be make to improve the performance of searches within MongoDB.Any field in a MongoDB document can be indexed.
  3. Replication - A replica set consists of two or more mongoDB instances.Each replica set member may act in the role of the primary or secondary replica at any time.
  4. Load balancing - MongoDB uses the concept of sharding to scale horizontally by splitting data across multiple mongo instances.MongoDB can run over multiple servers, balancing the load and/or duplicating data to keep the system up and running in case of hardware failure.
 
Features in mongoDB
    1. Each database contains collections which in turn contains documents. Each document can be different with a varying number of fields. The size and content of each document can be different from each other.
    2. The document structure is more in line with how developers construct their classes and objects in their respective programming languages. Developers will often say that their classes are not rows and columns but have a clear structure with key-value pairs.
    3. The rows (or documents as called in MongoDB) doesn't need to have a schema defined beforehand. Instead, the fields can be created on the fly.
    4. The data model available within MongoDB allows you to represent hierarchical relationships, to store arrays, and other more complex structures more easily.



 

Thank you for visiting my blog !




Comments