YouTip LogoYouTip

Mongodb Intro

MongoDB is a document-oriented database, storing data in a format similar to JSON documents. The design philosophy of MongoDB is to address the needs of large data volumes, high performance, and flexibility. MongoDB uses Collections to organize Documents, where each document is composed of key-value pairs. * **Database**: A container for storing data, similar to a database in a relational database. * **Collection**: A collection within a database, similar to a table in a relational database. * **Document**: A data record within a collection, similar to a row in a relational database, stored in BSON format. MongoDB stores data as a document, with a data structure composed of key-value pairs. The document is similar to a JSON object, and field values can contain other documents, arrays, and arrays of documents: !(#) * * * ## Key Features * **Document-Oriented Storage**: MongoDB is a document-oriented database that stores data in a JSON-like format, making the data structure more flexible and rich. * **Index Optimization for Queries**: MongoDB allows users to create indexes on any attribute within a document, such as `FirstName` and `Address`, thereby improving query efficiency and sorting performance. * **Data Mirroring and Scalability**: By creating replicas of data locally or over a network, MongoDB achieves robust data redundancy and scalability. * **Horizontal Scaling and Sharding**: To handle increased load, MongoDB can distribute data across other nodes in a computer network using sharding technology, enabling horizontal scaling. * **Powerful Query Language**: MongoDB uses a JSON-formatted query syntax, supporting complex query expressions, including queries on embedded objects and arrays. * **Data Updates**: Using the `update()` command, MongoDB can replace an entire document or update specified data fields, providing a flexible way to update data. * **MapReduce for Batch Processing**: MongoDB's MapReduce functionality is designed for large-scale data processing and aggregation operations. It achieves efficient data summarization through the `emit(key, value)` call in the Map function and the logical processing in the Reduce function. * **MapReduce Scripting**: The Map and Reduce functions are written in JavaScript and can be executed in MongoDB via the `db.runCommand` or `mapreduce` commands. * **GridFS for Large File Storage**: GridFS is a built-in feature of MongoDB used for storing and retrieving files that exceed the BSON document size limit, such as images and videos. * **Server-Side Script Execution**: MongoDB allows the execution of JavaScript scripts on the server side, providing the ability to execute directly on the server or store function definitions for later invocation. * **Multi-Language Support**: MongoDB provides support for multiple programming languages, including but not limited to RUBY, PYTHON, JAVA, C++, PHP, and C#. * **Simple Installation**: The installation process for MongoDB is simple and intuitive, making it easy for users to deploy and use quickly. * * * ## History | Version | Release Date | Feature Description | | --- | --- | --- | | 1.0 | August 2009 | More indexes per collection, faster index creation | | 1.2 | December 2009 | Map/Reduce, stored JavaScript functions, configurable fsync time, several minor features and fixes | | 1.4 | March 2010 | Production-ready sharding | | 1.6 | August 2010 | Replica sets, IPv6 support | | 1.8 | March 2011 | | | 2.0 | September 2011 | | | 2.2 | August 2012 | Enhanced geospatial support, switch to V8 JavaScript engine | | 2.4 | March 2013 | Security enhancements, text search (beta), hash indexes, aggregation enhancements, text search integration | | 2.6 | April 8, 2014 | Query engine improvements, new write operation protocol, security enhancements, WiredTiger storage engine support, pluggable storage engine API | | 3.0 | March 3, 2015 | SCRAM-SHA-1 authentication, improved explain functionality, MongoDB Ops Manager, replica set election enhancements, WiredTiger storage engine as default | | 3.2 | December 8, 2015 | Configuration servers as replica sets, read concern, switch from V8 to SpiderMonkey, linearizable read concern | | 3.4 | November 29, 2016 | Views, collation | | 3.6 | November 2017 | | | 4.0 | June 2018 | Transactions | | 4.2 | August 2019 | | | 4.4 | July 2020 | | | 4.4.5 | April 2021 | | | 4.4.6 | May 2021 | Future-versioned API | | 5.0 | July 13, 2021 | Client-side field-level encryption, live resharding, time series support | | 6.0 | July 2022 | | | 7.0 | August 15, 2023 | | * * * ## MongoDB Download You can download the installation package from the official MongoDB website at: [https://www.mongodb.com/try/download/community](https://www.mongodb.com/try/download/community). MongoDB supports the following platforms: * **Linux**: MongoDB supports various Linux distributions, including but not limited to Ubuntu, Debian, CentOS, Red Hat Enterprise Linux (RHEL), Fedora, etc. * **Windows**: MongoDB provides an official version for the Windows operating system, which can run on Windows Server and Windows desktop operating systems. * **macOS**: MongoDB can run on macOS and provides an official installer for macOS. * **Docker**: MongoDB can also run as a Docker container, making it more convenient to deploy and manage MongoDB across various platforms. !(#) * * * ## Language Support MongoDB has official drivers as follows: * (https://github.com/mongodb/mongo-c-driver) * [C++](https://github.com/mongodb/mongo) * [C# / .NET](http://www.mongodb.org/display/DOCS/CSharp+Language+Center) * (https://github.com/TonyGen/mongodb-erlang) * (http://hackage.haskell.org/package/mongoDB) * (https://github.com/mongodb/mongo-java-driver) * (http://www.mongodb.org/display/DOCS/Javascript+Language+Center) * (https://github.com/fons/cl-mongo) * [node.JS](https://github.com/mongodb/node-mongodb-native) * (https://github.com/mongodb/mongo-perl-driver) * (https://github.com/mongodb/mongo-php-driver) * (https://github.com/mongodb/mongo-python-driver) * (https://github.com/mongodb/mongo-ruby-driver) * (https://github.com/mongodb/casbah) * (https://github.com/mongodb/mongo-go-driver) * * * ## MongoDB Tools There are several management tools available for MongoDB. ### Monitoring MongoDB provides a network and system monitoring tool called Munin, which is applied as a plugin to MongoDB. Ganglia is a high-performance system monitoring tool for MongoDB, also applied as a plugin to MongoDB. Cacti is a graphical open-source tool used for viewing CPU load and network bandwidth utilization. It also provides a plugin for monitoring MongoDB. ### GUI * Fang of Mongo – Web-based, built with Django and jQuery. * Futon4Mongo – A MongoDB clone of the CouchDB Futon web interface. * Mongo3 – Written in Ruby. * MongoHub – An application for OSX. * Opricot – A browser-based MongoDB console, written in PHP. * Database Master β€” A MongoDB management tool for Windows. * RockMongo β€” The best MongoDB management tool for PHP, lightweight and supports multiple languages. * * * ## MongoDB Application Cases Below are some examples of companies using MongoDB in practice: * Craiglist uses MongoDB to archive billions of records. * FourSquare, a location-based social networking site, uses MongoDB on Amazon EC2 servers to share data. * Shutterfly, an internet-based social and personal publishing service, uses MongoDB for various persistent data storage requirements. * bit.ly, a web-based URL shortening service, uses MongoDB to store its own data. * spike.com, an MTV Networks affiliate, uses MongoDB. * Intuit, a provider of software and services for small businesses and individuals, uses MongoDB to track user data for small businesses. * sourceforge.net, a resource site for finding, creating, and publishing open-source software for free, uses MongoDB for backend storage. * etsy.com, a website for buying and selling handmade items, uses MongoDB. * The New York Times, one of the leading online news portals, uses MongoDB. * CERN, the famous particle physics research institute, uses MongoDB for data from the Large Hadron Collider at the European Organization for Nuclear Research.
← Bootstrap V2 IntroNosql β†’