MongoDB (1)--Simple introduction and installation

Source: Internet
Author: User

The NoSQL type of database Redis was contacted during the previous period, and was used as a cache server. So from this blog start learning there is a very well-known NoSQL database: MongoDb. It's just not being used in development right now. Step by step.


Simple Introduction MongoDB is an open source, non-relational database based on distributed, document-oriented storage.

Non-relational databases are the most versatile and most like relational databases.
MOngodbWritten by C + +, the name is derived from the word "humongous", whose purpose is to process large amounts of data.
MOngodbCapable of performing on Windows, UNIX, OSX, Solaris Systems, support for 32-bit and 64-bit applications, and a variety of programming language drivers.
MOngodbThe supported data structures are loosely formatted as JSON-like Bson formats that store data in the form of key-value pairs. The ability to store complex data types.
MOngodbSupported data types are: null, Boolean, String, ObjectId, 32-bit integer, 64-bit integer, 64-bit floating-point number, date, regular table, JS code, binary data, array, inline document, maximum, minimum, no defined type.
which Inline documentation I don't understand that. Doc.txt and other documents. The document referred to here is a storage unit of MongoDB (equivalent to the record in relational data). The representation in MongoDB is {key1:value1,key2:value2}, while the inline document is this form {key1:value1,key2:{key2.1:value2.1,key2.2:value2.2}}.


M The biggest feature of Ongodb is that his supported query language is very powerful, its syntax is a bit like object-oriented query language, almost can achieve similar relational database single table query of most functions. It also supports indexing of data.
installation under Windows installation Download Path: https://www.mongodb.org/downloads
After decompression installation This is nothing to say, because even the installation path is not optional.

I also noticed that it was installed. I didn't even find the path. Or on the Internet to check. It is installed by default under C:\Program Files\mongodb.
Start Create the database folder E:\mongodb. Next open the command line form:

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /southeast ">
starting with a configuration file The official download of the installation package does not have a default configuration file, if you want to use the configuration file to do it yourself, using the configuration file is more advanced than the knock command? All the commands are masters! Use configuration files to configure database files, log files, and some other configurations such as the following:

    • Create a database folder E:\mongodb\data
    • Create a log folder E:\mongodb\log
    • Setting up the configuration file E:\mongodb\conf
    • Set up the. conf profile, the configuration file contents such as the following:

Dbpath=e:\mongodb\data #数据库路径logpath =e:\mongodb\log\mongodb.log #日志输出文件路径logappend =true #错误日志採用追加模式. After configuring this option, MongoDB logs are appended to the existing log file. Instead of creating a new file from the Journal=true #启用日志文件, the Quiet=true #这个选项能够过滤掉一些没用的日志信息 is enabled by default and is set to falseport=27017 if you need to debug it #端口号 27017


Normal Startup

Watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqv/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/dissolve/70/gravity /southeast ">
Interview: http://localhost:27017/can see the display information such as the following, it indicates that the launch was successful.


It looks like you is trying to access MongoDB over HTTP on the native driver port.
MongoDB is installed as a Windows service

Installing MongoDB as a Windows service is easy, just need to add--install after the command line running on it.



Summary: Installation and brief introduction to this end, basically install this part and Redis no difference.

The feeling of NoSQL is relatively light and flexible.





MongoDB (1)--Simple 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.