GithubHelp home page GithubHelp logo

mongodb's Introduction

MongoDB

Introduction

MongoDB is based on a NoSQL database that is used for storing data in a key-value pair. Its working is based on the concept of document and collection. It is also an open-source, a document-oriented, cross-platform database system that is written using C++. Mongo DB can be defined as a document-oriented database system that uses the concept of NoSQL. It also provides high availability, high performance, along with automatic scaling. This open-source product was developed by the company - 10gen in October 2007, and the company also maintains it. MongoDB exists under the General Public License (GPL) as a free database management tool as well as available under Commercial license as of the manufacturer. MongoDB was also intended to function with commodity servers. Companies of different sizes all over the world across all industries are using MongoDB as their database.

General Terminologies

Database

In MongoDB, a database can be defined as a physical container for collections of data. Here, on the file system, every database has its collection of files residing. Usually, a MongoDB server contains numerous databases.

Document

A document can be defined as a collection of key-value pairs that contain dynamic schema. Dynamic schema is something that documents of the equal collection do not require for having the same collection of fields or construction, and a common field is capable of holding various types of data.

Collection

Collections can be defined as a cluster of MongoDB documents that exist within a single database. You can relate this to that of a table in a relational database management system. MongoDB collections do not implement the concept of schema. Documents that have collection usually contain different fields. Typically, all the documents residing within a collection are meant for a comparable or related purpose.

Organizations that use MongoDB

  • Adobe
  • McAfee
  • LinkedIn
  • FourSquare
  • MetLife
  • eBay
  • SAP
  • Twitter
  • Forbes
  • Facebook
  • Google
  • Aadhar

Advantages of using MongoDB

  • Since MongoDB is a schema-less database, so there is no hassle of schema migration.
  • Since it is a document-oriented language, document queries are used, which plays a vital role in supporting dynamic queries.
  • Easily scalable.
  • It is easy to have a performance tuning as compared to other relational databases.
  • It helps in providing fast accessing of data because of its nature of implementing the internal memory to store the data.
  • MongoDB is also used as a file system that can help in easy management of load balancing.
  • MongoDB also supports the searching using the concept of regex (regular expression) as well as fields.
  • Users can run MongoDB as a windows service also.
  • It does not require any VM to run on different platforms.
  • It also supports sharding of data.

use command

use DATABASE_NAME

CRUD OPERATIONS

- CREATE
    insertOne(data, options)
    insertMany(data, options)
- READ
    find(filter,options)
    findOne(filter,options)
- UPDATE
    updateOne(filter, data, options)
    updateMany(filter, data, options)
    replaceOne(filter, data, options)
- DELETE
    deleteOne(filter, options)
    deleteMany(filter, options)

dropDatabase() method : Drop a existing database.

syntax : db.dropDatabase()

Query Document

- The find() method - This method will display all the documents in a non-structured way.
db.COLLECTION_NAME.find()

mongodb's People

Contributors

vighnesh1521 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.