NoSQL Concept and MongoDB
NoSQL has emerged as a different and alternative approach compared to relational database management systems (RDBMS).
Actually, there are fundamental differences between the scalable NoSQL systems and relational database management systems.
- Relational database management systems are transaction-based and have ACID rules. NoSQL systems do not fully support the ACID rules and there is no transaction concept in many NoSQL systems.
- Data in the relational database management systems is located on fixed tables and columns. NoSQL systems are not dependent on fixed tables and columns.
- SQL query is not used in NoSQL systems.
- Disintegration of data by primary key is not compulsory in relational database management systems. NoSQL systems access the data over primary keys.
Moreover NoSQL systems are defined in 3 groups among themselves such as document-based, key/value based and graphic-based generally and each group have differences about data consistency and data access strategies.
MongoDB (from "humongous") is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.
Development of MongoDB began in 2007, when the company was building a platform as a service similar to Windows Azure or Google App Engine.
In 2009, MongoDB was open sourced as a stand-alone produc with an AGPL license.
The latest stable version, 2.4.0, was released in March 2013.
At this point, it would be useful to look at the mapping chart of MongoDB concepts and SQL concepts in the conventional relational database management systems:
|row||document or BSON document|
|table joins||embedded documents and linking|
Specify any unique column or column combination as primary key.
In MongoDB, the primary key is automatically set to the _id field.
|aggregation (e.g. group by)||
See the SQL to Aggregation Framework Mapping Chart.
We have to consider the following features :
- Query Support. Whereas many NoSQL solutions enables you to access the data only through the keys, MongoDB offers to query regarding the intended fields and specific ranges (range query), also it offers you to query with regular expressions.
- Secondary Index Support. As well as the querying with respect to intended fields, defining these fields as secondary index provides to access data in a high performance.
- Master-Slave Replication Support. Directing the read and write operations to separate servers, running a slave server as a master server when the master service is inaccessible is a very important positive value undoubtedly.
- Sharding Support.
- MapReduce Support.
- Driver Support for many Software Languages.
If you wanto to set up MongoDB, MongoDB documentation provides all the information you need.
- A roadmap to becoming a web developer in 2019
- MYSQL: How to create a new user and give it full access only to 1 database
- ArangoDB, install and configure the popular Database in ubuntu 16.04
- How JSON data types work in mysql
- How to Disable Strict SQL Mode in MySQL 5.7 and Ubuntu 16.04
- How to send an e-mail in 1984 - Vintage overdose
- MySql: How to build a performant search engine
- SQLMAP installation and usage in Ubuntu and Kali linux
- Install HHVM + Nginx on Ubuntu 14.04
- Optimize MySql On Low Memory Servers
- PHP: Storing arrays in database
- How to import and export a large database using SSH