Official Mafiree Blogs

Keeping you informed about Databases

Access Control & Account Management In MySQL 8
By Sukan   |   June 08, 2023   |   Posted in : MySQL
Discover how MySQL 8 enhances security through features like password expiry, password validation, account lock/unlock, privilege management, and dual passwords. Safeguard your valuable data and streamline access control in your MySQL environment.

Significance of using Invisible Primary key (GIPK) with MySQL 8.0
By Sukan   |   February 21, 2023   |   Posted in : MySQL
How Generated Invisible Primary Keys (GIPK) Can Boost Your Database Efficiency

Achieving High Availability Using Log Shipping
By Sujith   |   February 21, 2018   |   Posted in : SQL Server
Here we will get the detailed explanation of how we can achieve HA using Log Shipping.

SQL Server On Linux
By Sujith   |   March 30, 2019   |   Posted in : SQL Server
SQL Server 2017 brings the best features of the Microsoft relational database engine to the enterprise Linux ecosystem, including SQL Server Agent, Azure Active Directory (Azure AD) authentication, best-in-class high availability/ disaster recovery, and unparalleled data security.

Types of SQL Server Replication
By Sujith   |   February 19, 2018   |   Posted in : SQL Server
Understanding on the types of replication in SQL Server and the type apt for your traffic pattern.

 Home  /  MongoDB  
Why MongoDB?
By Jerwin   |   March 30, 2019   |   Posted in : MongoDB

   At present Organizations are expanding the range of applications to deliver high support to the business. Before looking into MongoDB, let’s have a look about NoSQL. The term NoSQL means Not Only SQL. It is a non relational database with simple and flexible structure. It is mostly used for very large databases, where the performance problems are caused due to the relational models.

MongoDB is the most well known among NoSQL databases. It has rich document based queries for easy readability. It provides full index support for high performance in applications. Data is always highly available by replication & scalable by sharding.Below image explains the architecture of the MongoDB.

The top layer involves the various kinds of applications. Next stage involves the MongoDB query language that helps us to retrieve the data from the server. With MongoDB’s flexible storage architecture, the database automatically manages the movement of data between storage engine technologies using native replication. This approach significantly reduces developer and operational complexity when compared to running multiple distinct database

More about MongoDB :
Document oriented database
Storing data in MongoDB is document data model, where each record is a document. It uses a JSON style data store. The structure of MongoDB with respect to the relational db is described below:

Schema free
This is an important feature in MongoDB that is not available in the relational databases. In a schema less db you can simply add records without any previous structure.

Let us consider a scenario in production where you have some documents and you need to add few fileds to a table/collection in relational db we have to perform a alter table to make such schema change, but when you consider MongoDB we can just add the document with the new fields without any alter. Database schema is so flexible that it does not contain any specific constraints to store the documents.

  1. db.users.insert({"name":"Raj","nativeplace":"Nagercoil"})
  2. db.users.insert({"name":"Mahesh","nativeplace":"Banglore","Hobby":"Listening to music"})
  3. db.users.insert({"name":"Sankar"})

The above mentioned documents have different structures,fields still they are present in a same single collection.

Performance
MongoDB is faster because it allows our to query in a different manner that is more sensible to the workload. The application’s working set must fit into the available physical memory in MongoDB. By default, MongoDB adds an _id field to all documents which is a primary key. This generally boosts the performance of the documents. MongoDB uses a locking system to ensure data set consistency. If there is any long running operations in the db, performance degrades as requests and operations wait for the lock. To identify those slow performing queries Database Profiling can be enabled. Once those queries that degrades the performance are identified then they can be tuned further for better performance. We have performed our own benchmark between the relational database and MongoDB for queries such as select ,select with group/aggregate function,range query,orderby and insert to find the CPU usage,Memory usage,IO wait and time for execution for all cases to analyse the performance.

Note: The benchmark is carried out in our test environment and its to give a visiblity about RDBMS & MongoDB performance comparison, the results may vary according to the machine configurations. So you can perform your own benchmark for better performance analysis.

Scalability
Database systems with large data sets or high data throughput can challenge the capacity of a single server. MongoDB helps in distributing the data across various machines by the process called Sharding.It is the process of storing data records across multiple machines. It solves data size problems with horizontal scaling. The advantage in sharding is its easy to add machines to support the data growth.

Security
MongoDB provides various security features such as authentication, authorization, encryption to secure the MongoDB deployments.

Authentication
This process involves comparing the user credentials with the files present on the databases.Once the comparison is validated then the user is granted authorization for access. MongoDB provides three methods of authentication that are listed below:

  • SCRAM
  • MongoDB Challenge and Response (MONGODB-CR)
  • x.509 Certificate Authentication

In addition the MongoDB Enterprise edition supports the below mechanisms:

  • LDAP proxy authentication
  • Kerberos authentication

Authorization
The process of granting one or more roles to a user to access the database operations & resources. MongoDB provides various roles that grants the privileges to the user according to the database needs.

Aggregation
Aggregation is similar to the group by operation in RDBMS. In MongoDB applications we can group various collections with different schema to process a desired output. Aggregation framework involves concept of data processing pipelines. Documents enter a various pipeline stages that transforms the documents into an aggregated result.

Driver support
Driver handles all interaction between the database and application. MongoDB mostly supports all kind of languages and has dedicated drivers & complete support from the MongoDB community.The below are the list of drivers that MongoDB supports:

  • C
  • C++
  • C#
  • Java
  • Node.js
  • Perl
  • PHP
  • Python
  • MotorRubyScala

ACID transactions support
The one of the reason that many people choose relational databases over non-relational is because of the ACID property. MongoDB has announced that its version 4.0 will support multi-document ACID transactions. Being schema free data model MongoDB has been widely used & now supporting ACID transaction will make it more special.

Takeaways:

  • Caching and high scalability.
  • Full index support for high performance.
  • Rich document based queries for easy readability.
  • Replication & auto failover for high availability.
  • Auto Sharding for easy scalability.
  • Map reduce for aggregation.
  • Real time analytics and high speed logging.
    technologies. It also consists of various storage engines based on the application type the storage engine can be chose



0 Comments


Leave a Comment

Name *

Email *

Comment *



Search All Blogs



Need Support?


Solutions      Services      Resources      About Mafiree

More than 3000 servers monitored

Certified database Administrators

24X7X365 Support

Happy Clients


ENQUIRE NOW
For Sales Related Queries, Please Call Our Sales Experts at

 +91-80-41155993


Meet Mafiree on social networks!

     

PCI Certificate

Copyright © 2019 - All Rights Reserved - Mafiree