MongoDB is an Open Source database written in C++.
Drivers and client libraries are typically written in their respective languages, although some drivers use C extensions for better performance.
If the load increases, by adding more nodes (such as a computer), the performance can be retained.
It can be used to store data for very high-performance applications (for example Foursquare is using it in production).
MongoDB does not support SQL It supports a rich, ad-hoc query language of its own.
MongoDB stores data as documents. So it is a document oriented database.
FirstName="Arun", Address="St. Xavier's Road", Spouse=[{Name:"Kiran"}], Children=[{Name:"Rihit", Age:8}].
FirstName="Sameer",Address="8 Gandhi Road".
Notice there are two different documents (separated by "."). Storing data in this fashion is called as document oriented database. MongoDB is a document oriented database.
Key FeaturesSince MongoDB offers a Document oriented storage, It is simple and easily programmable.
What kind of database is MongoDB?
MongoDB is a document-oriented DBMS. Think of MySQL but with JSON-like objects comprising the data mode, rather than RDBMS tables. MongoDB supports neither joins nor transactions.
Does MongoDB database stores its data in tables?
A MongoDB database stores its data in collections instead of tables, which are the rough equivalent of RDBMS tables.
Do MongoDB databases have schemas?
MongoDB uses dynamic schemas. Without defining the structure you can create collections, i.e. the fields or the types of their values, of the documents in the collection. You can change the structure of documents simply by adding new fields or deleting existing ones.
Which programming languages can be used to work with MongoDB?
MongoDB client drivers exist for all of the most popular programming languages. See the latest list of drivers for details.
Does MongoDB support SQL?
No.
What are typical uses for MongoDB?
Content management systems, mobile applications, gaming, e-commerce, analytics, archiving, and logging.
Does MongoDB support transactions?
No. However, MongoDB does provide atomic operations on a single document.
Does MongoDB require a lot of RAM?
Not necessarily. It's certainly possible to run MongoDB on a machine with a small amount of free RAM. MongoDB automatically uses all free memory on the machine as its cache.
Does MongoDB handle caching?
Yes. MongoDB keeps all of the most recently used data in RAM. If you have created indexes for your queries and your working data set fits in RAM, MongoDB serves all queries from memory.
What are the limitations of 32-bit versions of MongoDB?
Changed in version 3.0: Commercial support is no longer provided for MongoDB on 32-bit platforms (Linux and Windows).
Development of MongoDB began in October 2007 by 10gen. The first public release was in February 2009.
Obtain MongoDBYou can download MongoDB from http://www.mongodb.org/downloads. As of this writing, it supports following platforms:
Databases : MongoDB is a document-oriented DBMS, with JSON-like objects comprising the data model, rather than RDBMS tables. MongoDB does not support joins nor transactions. However, it features secondary indexes, an expressive query language, atomic writes on a per-document level, and fully-consistent reads. MongoDB uses BSON, a binary object format similar to, but more expressive than JSON.
Schemas : MongoDB uses dynamic schemas. We can create collections without defining the structure, i.e. the fields or the types of their values, of the documents. You can change the structure of documents simply by adding new fields or deleting existing ones. Documents in a collection need unique set of fields.
Tables : MongoDB database stores its data in collections not in tables The collections are the rough equivalent of RDBMS tables. A collection holds one or more documents, which corresponds to a record or a row in a relational database table, and each document has one or more fields, which corresponds to a column in a relational database table.
MongoDB and ACID transactionsMongoDB does not support multi-document transactions but provides atomic operations on a single document. Often these document-level atomic operations are sufficient to solve problems that would require ACID transactions in a relational database.
In MongoDB, you can embed related data in nested arrays or nested documents within a single document and update the entire document in a single atomic operation. Relational databases might represent the same kind of data with multiple tables and rows, which would require transaction support to update the data atomically.
MongoDB allows clients to read documents inserted or modified before it commits these modifications to disk, regardless of write concern level or journaling configuration. Applications may observe two classes of behaviors :
Other database systems refer to this isolation semantics as read uncommitted. For all inserts and updates, MongoDB modifies
For multi-document operations, MongoDB does not provide any multi-document transactions or isolation. When MongoDB returns a successful journaled write concern, the data is fully committed to disk and will be available after MongoDB restarts. For replica sets, write operations are durable only after a write replicates and commits to the journal of a majority of the voting members of the set.
MongoDB and cachingMongoDB has no configurable cache. MongoDB uses all free memory on the system automatically by way of memory-mapped files. Operating systems use the same approach with their file system caches. MongoDB keeps all of the most recently used data in RAM. If you have created indexes for your queries and your working data set fits in RAM, MongoDB serves all queries from memory.
MongoDB does not implement a query cache, it serves all queries directly from the indexes and/or data files.
ToolsThere are several tools available for managing MongoDB.
MonitoringNetwork and System monitoring tool Munin has a plugin available for MongoDB.
Distributed high-performance system monitoring tool Gangila has a plugin available for MongoDB.
Open source web based graphic tool Cacti, used to graph CPU load, network bandwidth utilization has a plugin available for MongoDB.
GUIHere is a list of a few MongoDB production deployment :
w3resource's MongoDB tutorial is first of it's kind on the internet. This is a comprehensive tutorial on MongoDB, covering hundreds of examples on how to use it with PHP.
After reading this tutorial, you will be able to install and develop Web base applications using MongoDB
Next: Install MongoDB on Windows
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4