Novice MongoDB Learning---(a) Installation and introduction

Source: Internet
Author: User
Tags install mongodb mongodb download

What is NoSQL?

NoSQL, refers to a non-relational database. NoSQL, sometimes referred to as the abbreviation of not-only SQL, is a generic term for a database management system that differs from a traditional relational database.

NoSQL is used for storage of hyper-scale data. (for example, Google or Facebook collects trillions of bits of data for their users every day). These types of data stores do not require a fixed pattern and can be scaled horizontally without extra action.

Why use NoSQL?

Today we can easily access and crawl data through third-party platforms (e.g., google,facebook, etc.). User's personal information, social network, geographical location, user generated data and user operation log have multiplied. If we want to dig these user data, the SQL database is not suitable for these applications, and the development of NoSQL database can handle these big data very well.

RDBMS vs NoSQL

Rdbms
-Highly organized structured data
-Structured Query Language (SQL) (SQL)
-Data and relationships are stored in separate tables.
-Data manipulation language, data definition language
-Strict consistency
-Basic services

Nosql
-represents more than just SQL
-No declarative query language
-No pre-defined pattern
-key-value pair storage, column storage, document storage, graphics database
-final consistency, not ACID properties
-Unstructured and unpredictable data
-Cap theorem
-High performance, high availability and scalability

the pros/cons of NoSQL

Advantages:

    • -High Scalability
    • -Distributed computing
    • -Low cost
    • -Architecture flexibility, semi-structured data
    • -No complicated relationship.

Disadvantages:

    • -No standardization
    • -Limited query function (so far)
    • -final agreement is not intuitive program

ACID vs BASE
ACID BASE
Atomicity (Atomicity) Basic available (Basically Available)
Consistency (Consistency) Soft-state/flexible transactions (S-oft states)
Isolation (Isolation) Final consistency (Eventual consistency)
Persistence (Durable)


What is MongoDB?

MongoDB is an open source database system written by the C + + language.

In the case of high load, adding more nodes can guarantee the performance of the server.

MongoDB is designed to provide scalable, high-performance data storage solutions for Web applications.


MongoDB stores the data as a document. MongoDB is a database based on distributed file storage.

firstname= "Arun", address= "St. Xavier ' s Road", Spouse=[{name: "Kiran"}], Children=[{name: "Rihit", Age:8}].
Firstname= "Sameer", address= "8 Gandhi Road".

Note: The above data has two different documents (".") Separated). Storing data in this manner is a database stored in a file. MongoDB is a document-oriented database.

Key Features
  • MongoDB provides a document-oriented storage that is simple and easy to operate.
  • You can set the index of any property in the MongoDB record (for example: Firstname= "Sameer", address= "8 Gandhi Road") for faster sorting.
  • You can create data mirroring either locally or on the network, which makes MongoDB more extensible.
  • If the load increases (requiring more storage space and greater processing power), it can be distributed across other nodes in the computer network which is called a shard.
  • The MONGO supports rich query expressions. Query directives use a JSON-style tag to easily query objects and arrays embedded in the document.
  • MongoDb uses the update () command to implement a replacement of the completed document (data) or some specified data fields.
  • The map/reduce in MongoDB is primarily used for batch processing and aggregation of data.
  • Map and reduce. The map function calls emit (Key,value) to traverse all records in the collection, passing key and value to the reduce function for processing.
  • The map function and the reduce function are written in JavaScript and can be executed with the Db.runcommand or MapReduce command.
  • Gridfs is a built-in feature in MongoDB that can be used to store a large number of small files.
  • MongoDB allows you to execute scripts on the server, write a function in JavaScript, execute directly on the server, or store the definition of the function on the server, next time you call it directly.
  • MongoDB supports a variety of programming languages: ruby,python,java,c++,php,c# and many more languages.
  • MongoDB installation is simple.


MongoDB Download

MongoDB provides precompiled binary packages for 32-bit and 64-bit systems that you can download from the MongoDB official website, MongoDB precompiled binary package:

http://www.mongodb.org/downloads


The specific installation of the words self-feeling or Ubuntu is relatively simple, but also more convenient, Windows is not difficult, after downloading the double-click installation can, but still have to look at the command line under Windows, after the test environment is basically Ubuntu 12.04.

direct command line input sudo apt-get install MongoDB.

Of course you can also install Munin to monitor MongoDB operation, and visualize the Rockmongo of the interface to achieve simple operation.

Novice MongoDB Learning---(a) Installation and introduction

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.