Xiao Bai to learn MongoDB (i)

Source: Internet
Author: User
Tags install mongodb

First, MongoDB Introduction

Traditionally, a relational database management system (RDBMS) is used to manipulate databases through the standard language of SQL. In contrast, NoSQL databases do not use the SQL language. As a result, sometimes people mistakenly think of it as a negation of an existing RMDBS using SQL and are going to replace an RDBMS, which is actually not the case. NoSQL databases are a complement to the parts that RDBMS is not good at, so it should be understood to mean "not just SQL".

And MongoDB is a non-relational database, and in the process of use, you will find that its usage where Buddha has seen.

We can look at a couple of comparisons between SQL and NoSQL:

1. Data type: SQL is structured data, NoSQL unstructured data

2. Database structure: SQL needs to be defined first, and NoSQL does not need to define

In addition, MongoDB is based on distributed, collaborative services that can store larger data, support multiple query languages, and more.

However, MongoDB is not to say that it is perfect, in terms of data consistency, SQL because it is a pre-defined table structure, so the performance slightly better.

Second, the environment I built

I use the server version is CentOS 6.5, you can install MongoDB through yum, and then add PHP extension, and finally restart the Apache server, you can view the Phpinfo information to find MONGO.

Because I usually use PHP, so I use Php+mongodb+apache to play.

Add Mongod to boot entry::

[Email protected] ~]# chkconfig Mongod on

You can then use commands to see which boot entries are in the system:

[Email protected] ~]# chkconfig--list

Start MongoDB

::

[[Email protected] ~]# service Mongod start

You can also stop MongoDB ::

[[Email protected] ~]# service Mongod stop

or restart MongoDB::

[Email protected] ~]# service Mongod restart

Xiao Bai to learn MongoDB (i)

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.