Hi,nice to see you again and today let us have a look about Mongo DB and No SQL.
The official MongoDB Node.js driver provides both callback-based and Promise-based interaction with MongoDB, allowing applications to take full advantage of the new features in ES6.
Given that you have created your own project using "npm init" we install the mongodb driver and it's dependencies by executing the following "NPM" command.
npm install mongodb --save
This will download the MongoDB driver and add a dependency entry in your "package.json" file.
It provides a mechanism for storage and retrieval of data other than tabular relations model used in relational databases. NoSQL database doesn't use tables for storing data. It is generally used to store big data and real-time web applications.
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 the 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.
The following table shows the relationship of RDBMS terminology with MongoDB.
Document Oriented Storage − Data is stored in the form of JSON style documents.
- Index on any attribute
- Replication and high availability
- Auto-sharding
- Rich queries
- Fast in-place updates
- Professional support by MongoDB
Advantages of NoSQL
- It supports query language
- It provides faster performance
- It provides horizontal scallabillity
That's it for today,
Hope to see you with another blog post,
Till then,
Good bye
Comments
Post a Comment