One of the must-learn skills for front-end development ——— non-relational database and MongoDB Quick start of relational database first step download and installation

Source: Internet
Author: User
Tags install mongodb

The database is generally divided into two directions: relational databases and non-relational databases. Our common MySQL, Oracle, Sqlserever, and IBMDB2 belong to relational databases, where the relationship is worth the structure of a two-dimensional table , But as the complexity of Web applications increases, A fully relational-based database is no longer sufficient to meet actual needs. There are some non-relational databases, so-called non-relational, it is not the structure of the two-dimensional table . A common use is to save data in the form of key-value pairs -———— that is NoSQL.

Today we share one of the most popular non-relational databases in front-end development MongoDB.

MongoDB is a database based on distributed file storage. Written by the C + + language. Designed to provide scalable, high-performance data storage solutions for WEB applications. is a non-relational database with the richest functions, most like relational databases . The supported query languages are very powerful. See Http://baike.baidu.com/link?url=SedsPp1YPbSrktGL3B84wvdu3HI8mhEJoTqfSeX6XSTK8pL-e1N90SCvfRqXnckRvk0BO-iq7gtwsXndLgRKNa

Learning methods: mongdb = JavaScript Syntax + relational database functions, summarized as follows:

1.Mongodb is a non-relational database, and relational database comparison learning;

2. The format of the data is not a two-dimensional table, but the object of the way to save;

3. You can add, delete, modify, and view data using the corresponding (JS) syntax

To install MongoDB:

1.: https://www.mongodb.com/

MongoDB has changed the way it was installed when it released the 3.x version. The previous version does not need to install, directly decompression can be, if you choose the 3.x version note system if it is 32-bit to download 32-bit, 64-bit download 64-bit;

2. Installation

Can be installed to any disk, but it is recommended to install the other disk of the system disk, new folder: MONGO

Note: If you use the default path to install, please also see clearly, in which directory is installed. Because the directory needs to be used later.

Next is the way to go next.

3. Create a folder in the MONGO directory data to save the information (essential)

4. Start the MONGO server:

Open the cmd Command window and go to the bin directory and execute the following command:

Mongod--dbpath =d:\mongo\data

5. Open a CMD command window and go to the bin directory and use the MONGO command to link the server

Be careful not to turn off the first command window. Once it's switched off, the service stops.

Installation Detail Description:

ü 1th: The version,the four-bit, may not be installed on the OS.

ü 2nd: Install the path, do not have Chinese. The name of the folder should not have spaces. If the program Files have spaces.

ü 3rd: whenthe MONGDB service is started, the--dbpath is followed by the data directory, (copying its own Data directory)

ü 4th:mongod--dbpath=data directory, in addition to Mongod and --dbpath, other places do not appear any space, If there are spaces in the path, enclose the path string in quotation marks (single quotation marks, double quotation marks). as follows:

ü 5th: Once the service is turned on, if you want to make sure you can use MongoDB, the window does not turn off. If you want to connect MongoDB , then open a new window.

MongoDB defaults to the installation method and does not add this service to Windows services.

We open the service every time by using the mongod command.

This service can be found through Task Manager

If we need to use this command to open the service every time, it will be very troublesome. We can add this mongd service to the list of services in Windows by command. use the following command:

Mongod--dbpath = D:/mongo/data--logpath=d:/mongo/mongo.log--install

here the mongo.log file does not need to be created, the file name can be arbitrarily specified, as far as the . Log end, indicating that it is a log file.

PS: If you add a service, there is no response, or there is an error message (Insufficient permissions), you need to elevate permissions, as an administrator to open the cmd window.

Once added, view the list of services again, as follows:

Then we can manage it in the list of services

You can also use commands to manipulate them.

Open Service:net start service name

Stop service:net stop service name

Ps:

The service name is MongoDB, uppercase and lowercase, you need administrator status to execute the net start/stop command , if you want to use this service from windows The list of services is removed and can be used as follows:

to uninstall MongoDB, you can use the command mongod--remove.

One of the must-learn skills for front-end development ——— non-relational database and MongoDB Quick start of relational database first step download 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.