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)