MongoDB Introduction and Installation

Source: Internet
Author: User
Tags mongodb server

Mongo DB is a non-relational database (NOSQL) that is currently very popular in the IT industry and is favored by current IT practitioners for flexible data storage. This is a brief introduction to the installation of Mongo DB, Mongo db, and the difference from a relational database.


Brief Introduction:

Mongo db data is grouped in a dataset, called a collection (collenction). Each collection has a unique identifying name in the database and can contain an unlimited number of documents. The concept of a collection is similar to a table in a relational database, unlike it does not need to define any schema.

MongoDB uses this data structure of Bson (Binary JSON) to store data and network data exchange,Bson not only supports more complex data types, but also features Schema-free (mode freedom), so to speak, Instead of defining any structure, we can store document objects of completely different structures in a single database.

The Document object, which exists in the form of a key-value pair. A key is used to uniquely identify a document, a string type, and a value can be a complex file type, such as a sentence, a picture, an array, a collection, and so on.

At the time of operation, Mongo DB does not require us to write SQL statements manually, the operation syntax of the Crud,shell command with the shell command is similar to JavaScript, it can be said that the bottom of the console query statement is done with JavaScript script.

MongoDB server can run on Linux, Windows and other platforms, support 32-bit and 64-bit applications, the default port is 27017.


MongoDB Installation:
1) I use the mongodb-win32-x86_64-2008plus-2.6.6.zip, unzip it, create the file path: E:\Program files\mongodb-2.6.6, the extracted files are copied to the folder. 2) Create the Data folder under the MongoDB folder, path: E:\Program files\mongodb\data 3) Create two folders in the Data folder for DB, log, path: E:\Program files\mongodb\data\db,e:\program files\mongodb\data\log4) Run Cmd.exe, enter DOS operating environmentgo to Bin directory:                     5) Create log filecommand: Mongod--logpath "E:\Program files\mongodb\data\log\log.txt"                    Log.txt file appears under the log folder           6) Create db filethe command is as follows: Mongod-dbpath "E:\Program files\mongodb\data\db"

After typing the following information, it means that your installation has been successful, you can enter the shell operation, the following folder is automatically generated under the DB folder:

run a Cmd.exe, enter the DOS environment, enter the command: Mongo.exe, after the link succeeds, collections:0 will automatically change to Collections:1, as follows:

This allows the shell to be manipulated.


differences from relational databases:


Summary:

Mongo DB is a good implementation of object-oriented thinking (Oo idea), in Mongo db each record is a document object. Mongo DB All data persistence operations do not require a developer to write SQL statements manually, and it is easy to implement CRUD operations by invoking the method directly.


MongoDB Introduction and Installation

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.