1.1 数据库管理系统

    在了解MongoDB之前需要先了解先数据库管理系统

1.1.1 什么是数据?

  数据(英语:data),是指未经过处理的原始记录。

  一般而言,数据缺乏组织及分类,无法明确的表达事物代表的意义,它可能是一堆的杂志、一大叠的报纸、数种的开会记录或是整本病人的病历纪录。数据描述事物的符号记录,是可定义为意义的实体,涉及事物的存在形式。是关于事件之一组离散且客观的事实描述,是构成讯息和知识的原始材料。

1.1.2 什么是数据库管理系统?

  数据库管理系统(英语:database management system,缩写:DBMS) 是一种针对对象数据库,为管理数据库而设计的大型电脑软件管理系统。

  具有代表性的数据管理系统有:Oracle、Microsoft SQL Server、Access、MySQL及PostgreSQL等。通常数据库管理师会使用数据库管理系统来创建数据库系统。

  现代DBMS使用不同的数据库模型追踪实体、属性和关系。在个人电脑、大型计算机和主机上应用最广泛的数据库管理系统是关系型DBMS(relational DBMS)。在关系型数据模型中,用二维表格表示数据库中的数据。这些表格称为关系。

  数据库管理系统主要分为俩大类:RDBMS、NOSQL

  关于RDBMS的更多信息参考:http://www.cnblogs.com/clsn/category/1131345.html

1.1.3 常见数据库管理系统?

常见的数据库管理系统,及其排名情况如下:

1.2 NoSQL是什么?

1.2.1 NoSQL简介

  NoSQL是对不同于传统的关系数据库的数据库管理系统的统称。

  两者存在许多显著的不同点,其中最重要的是NoSQL不使用SQL作为查询语言。其数据存储可以不需要固定的表格模式,也经常会避免使用SQL的JOIN操作,一般有水平可扩展性的特征。

  NoSQL一词最早出现于1998,是Carlo Strozzi开发的一个轻量、开源、不提供SQL功能的关系数据库。

**  2009******,Last.fm的Johan Oskarsson发起了一次关于分布式开源数据库的讨论,来自Rackspace的Eric Evans再次提出了NoSQL的概念,这时的NoSQL主要指非关系型、分布式、不提供ACID的数据库设计模式。

  2009年在亚特兰大举行的"no:sql(east)“讨论会是一个里程碑,其口号是"select fun, profit from real_world where relational=false;"。因此,NoSQL最普遍的解释是“非关联型的”,强调Key-Value Stores和文档数据库的优点,而不是单纯的反对RDBMS

  基于2014年的收入,NoSQL市场领先企业是MarkLogic,MongoDB和Datastax。基于2015年的人气排名,最受欢迎的NoSQL数据库是**MongoDB,Apache Cassandra和Redis**.

1.2.2 NoSQL数据库四大家族

NoSQL中的四大家族主要是:列存储、键值、图像存储、文档存储,其类型产品主要有以下这些。

<td style="width: 83.78%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: windowtext; border-right-color: windowtext; border-bottom-color: windowtext; border-left: none; background: #92d050; padding: 0cm 5.4pt;" colspan="2" width="83%">
  <p class="MsoNormal" style="text-align: center;" align="center">
    <strong><span style="color: white; mso-themecolor: background1;" lang="EN-US">NoSQL</span></strong>
  </p>
</td>
<td style="width: 27.12%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; background: #ffc000; padding: 0cm 5.4pt; height: 9.5pt;" width="27%">
  <p class="MsoNormal" style="text-align: center;" align="center">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">最终一致性键值存储</span></strong>
  </p>
</td>

<td style="width: 56.66%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt; height: 9.5pt;" width="56%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">Cassandra</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Dynamo</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Riak</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Hibari</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Virtuoso</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Voldemort</span>
  </p>
</td>
<td style="width: 56.66%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt; height: 9.5pt;" width="56%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">Memcached</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Redis</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Oracle Coherence</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">NCache</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US"> Hazelcast</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Tuple space</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Velocity</span>
  </p>
</td>
<td style="width: 56.66%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt; height: 9.5pt;" width="56%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">BigTable</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">LevelDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Tokyo Cabinet</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Tarantool</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">TreapDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Tuple space</span>
  </p>
</td>
<td style="width: 83.78%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt;" colspan="2" width="83%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">MongoDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">CouchDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">SimpleDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US"> Terrastore </span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US"> BaseX </span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Clusterpoint </span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US"> Riak</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">No2DB</span>
  </p>
</td>
<td style="width: 83.78%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt;" colspan="2" width="83%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">FlockDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">DEX</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Neo4J</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">AllegroGraph</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">InfiniteGraph</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">OrientDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Pregel</span>
  </p>
</td>
<td style="width: 83.78%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: windowtext; border-right-width: 1pt; border-right-color: windowtext; padding: 0cm 5.4pt;" colspan="2" width="83%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">Hbase</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Cassandra</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Hypertable</span>
  </p>
</td>

1.2.3 NoSQL的优势

  高可扩展性、分布式计算、没有复杂的关系、低成本

  架构灵活、半结构化数据

1.2.4 NoSQL与RDBMS对比 

<td style="width: 44.46%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #8064a2; border-right-color: #8064a2; border-bottom-color: #8064a2; border-left: none; background: #8064a2; padding: 0cm 5.4pt;" valign="top" width="44%">
  <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 1;" align="center">
    <strong><span style="font-size: 18.0pt; color: white; mso-themecolor: background1;" lang="EN-US">RDBMS</span></strong>
  </p>
</td>
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">没有声明性查询语言</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">没有预定义的模式</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">键</span><span lang="EN-US"> - </span></strong><strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">值对存储,列存储,文档存储,图形数据库</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">最终一致性,而</span></strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-weight: bold;">非</span><span lang="EN-US">ACID</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; mso-bidi-font-weight: bold;">属性</span>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">非结构化和不可预知的数据</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span lang="EN-US">CAP</span></strong><strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">定理</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">高性能,高可用性和可伸缩性</span></strong>
  </p>
</td>

<td style="width: 44.46%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #b2a1c7; border-right-width: 1pt; border-right-color: #b2a1c7; background: #e5dfec; padding: 0cm 5.4pt;" valign="top" width="44%">
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">高度组织化结构化数据</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">结构化查询语言(</span><span lang="EN-US">SQL</span></strong><strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">)</span><span lang="EN-US"> (SQL) </span></strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据和关系都存储在单独的表中。</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据操纵语言,数据定义语言</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">严格的一致性</span> </strong>
  </p>
  
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">基础事务</span> </strong>
  </p>
</td>

1.3 MongoDB简介

1.3.1 MongoDB是什么

    MongoDB并非芒果的意思,而是源于 Humongous(巨大)一词。

1.3.2 MongoDB的特性

  MongoDB的3大技术特色如下所示:

除了上图所示的还支持

  二级索引、动态查询、全文搜索 、聚合框架、MapReduce、GridFS、地理位置索引、内存引擎 、地理分布等一系列的强大功能。

但是其也有些许的缺点,例如:

  多表关联: 仅仅支持Left Outer Join

  SQL 语句支持: 查询为主,部分支持

  多表原子事务: 不支持

  多文档原子事务:不支持

  16MB 文档大小限制,不支持中文排序 ,服务端 Javascript 性能欠佳

1.3.3 关系型数据库与mongodb对比

存储方式对比

     在传统的关系型数据库中,存储方式是以表的形式存放,而在MongoDB中,以文档的形式存在。

   数据库中的对应关系,及存储形式的说明

MongoDB与SQL的结构对比详解

  <td style="width: 58.02%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #4f81bd; border-right-color: #4f81bd; border-bottom-color: #4f81bd; border-left: none; background: #4f81bd; padding: 0cm 5.4pt;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 1;" align="center">
      <span style="font-size: 18pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">MongoDB Terms/Concepts</span></strong></span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">database</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">database</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">table</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">collection</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">row</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">document or BSON document</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">column</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">field</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">index</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">index</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">table joins</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">embedded documents and linking</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">primary key</span></strong></span>
    </p>
    
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">Specify any unique column or</span></strong></span>
    </p>
    
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">column combination as </span></strong></span>
    </p>
    
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">primary key.</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">primary key</span>
    </p>
    
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">In MongoDB, the primary key is </span>
    </p>
    
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">automatically set to the _id field.</span>
    </p>
  </td>
</tr>

<tr>
  <td style="width: 41.98%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt; text-align: center;" valign="top" width="41%">
    <p class="MsoNormal">
      <span style="font-size: 14pt;"><strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">aggregation (e.g. group by)</span></strong></span>
    </p>
  </td>
  
  <td style="width: 58.02%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt; text-align: center;" valign="top" width="58%">
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">aggregation pipeline</span>
    </p>
    
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">See the SQL to Aggregation Mapping </span>
    </p>
    
    <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
      <span style="font-family: 'Yu Gothic UI Semibold', sans-serif; font-size: 14pt;" lang="EN-US">Chart.</span>
    </p>
  </td>
</tr>

1.3.4 MongoDB数据存储格式

JSON格式

  JSON 数据格式与语言无关,脱胎于 JavaScript,但目前很多编程语言都支持 JSON 格式数据的生成和解析。JSON 的官方 MIME 类型是 application/json,文件扩展名是 .json。

  MongoDB 使用JSON(JavaScript ObjectNotation)文档存储记录。

  JSON数据库语句可以容易被解析。

  Web 应用大量使用,NAME-VALUE 配对

BSON格式

  BSON是由10gen开发的一个数据格式,目前主要用于MongoDB中,是MongoDB的数据存储格式。BSON基于JSON格式,选择JSON进行改造的原因主要是JSON的通用性及JSON的schemaless的特性。 

  二进制的JSON,JSON文档的二进制编码存储格式

  BSON有JSON没有的Date和BinData

  MongoDB中document以BSON形式存放

例如:

1.3.5 MongoDB的优势

    ? MongoDB是开源产品

    ? On GitHub Url:https://github.com/mongodb

    ?  Licensed under the AGPL,有开源的社区版本

    ? 起源& 赞助by MongoDB公司,提供商业版licenses 许可

     这些优势造就了mongodb的丰富的功能:

  JSON 文档模型、动态的数据模式、二级索引强大、查询功能、自动分片、水平扩展、自动复制、高可用、文本搜索、企业级安全、聚合框架MapReduce、大文件存储GridFS

1.3.6 高可用的复制集群

  自动复制和故障切换

  多数据中心支持滚动维护无需关机支持最多50个成员

1.3.7 水平扩展

  这种方式是目前构架上的主流形式,指的是通过增加服务器数量来对系统扩容。在这样的构架下,单台服务器的配置并不会很高,可能是配置比较低、很廉价的 PC,每台机器承载着系统的一个子集,所有机器服务器组成的集群会比单体服务器提供更强大、高效的系统容载量。

  这样的问题是系统构架会比单体服务器复杂,搭建、维护都要求更高的技术背景。分片集群架构如下图所示:

1.3.8 各存储引擎的对比

<td style="width: 13.56%; border-top-width: 1pt; border-top-color: #9bbb59; border-left: none; border-bottom-width: 1pt; border-bottom-color: #9bbb59; border-right: none; background: #9bbb59; padding: 0cm 5.4pt; height: 38.4pt;" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 1;">
    <strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; color: white; mso-themecolor: background1; mso-font-kerning: 0pt;" lang="EN-US">MySQL InnoDB</span></strong>
  </p>
</td>

<td style="width: 13.62%; border-top-width: 1pt; border-top-color: #9bbb59; border-left: none; border-bottom-width: 1pt; border-bottom-color: #9bbb59; border-right: none; background: #9bbb59; padding: 0cm 5.4pt; height: 38.4pt;" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 1;">
    <strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; color: white; mso-themecolor: background1; mso-font-kerning: 0pt;" lang="EN-US">MySQL NDB</span></strong>
  </p>
</td>

<td style="width: 14.32%; border-top-width: 1pt; border-top-color: #9bbb59; border-left: none; border-bottom-width: 1pt; border-bottom-color: #9bbb59; border-right: none; background: #9bbb59; padding: 0cm 5.4pt; height: 38.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 1;">
    <strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; color: white; mso-themecolor: background1; mso-font-kerning: 0pt;" lang="EN-US">Oracle</span></strong>
  </p>
</td>

<td style="width: 18.88%; border-top-width: 1pt; border-top-color: #9bbb59; border-left: none; border-bottom-width: 1pt; border-bottom-color: #9bbb59; border-right: none; background: #9bbb59; padding: 0cm 5.4pt; height: 38.4pt;" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 1;">
    <strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; color: white; mso-themecolor: background1; mso-font-kerning: 0pt;" lang="EN-US">MongoDB MAPI</span></strong>
  </p>
</td>

<td style="width: 19.3%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #9bbb59; border-right-color: #9bbb59; border-bottom-color: #9bbb59; border-left: none; background: #9bbb59; padding: 0cm 5.4pt; height: 38.4pt;" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 1;">
    <strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; color: white; mso-themecolor: background1; mso-font-kerning: 0pt;" lang="EN-US">MongoDB WiredTiger</span></strong>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; text-indent: 13.05pt; mso-char-indent-count: 1.0; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">ES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">ROW-level</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">ROW-level</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">ROW-level</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">Collection-level</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">Document-level</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 71.1pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 71.1pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES(From 7.3)</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 71.1pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 71.1pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 71.1pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 24.6pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">64TB</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">384EB</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto; mso-yfti-cnfc: 64;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">NO</span>
  </p>
</td>
<td style="width: 13.56%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 13.62%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="13%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 14.32%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="14%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES</span>
  </p>
</td>

<td style="width: 18.88%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="18%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES </span><strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">(</span></strong><span style="font-size: 13.0pt; font-family: 黑体; mso-bidi-font-family: 'Segoe UI'; mso-font-kerning: 0pt;">分片</span><strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">)</span></strong>
  </p>
</td>

<td style="width: 19.3%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt; height: 23.4pt;" nowrap="nowrap" width="19%">
  <p class="MsoNormal" style="margin: 0cm; margin-bottom: .0001pt; text-align: justify; text-justify: inter-ideograph; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <span style="font-size: 13.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">YES </span><strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">(</span></strong><span style="font-size: 13.0pt; font-family: 黑体; mso-bidi-font-family: 'Segoe UI'; mso-font-kerning: 0pt;">分片</span><strong><span style="mso-bidi-font-size: 12.0pt; font-family: 'Segoe UI',sans-serif; mso-fareast-font-family: 宋体; mso-font-kerning: 0pt;" lang="EN-US">)</span></strong>
  </p>
</td>

1.3.9 数据库功能和性能对比

  由下图可以看出MongoDB数据库的性能扩展能力及功能都较好,都能够在数据库中,站立一足之地。

1.3.10 MongoDB适用场景

  网站数据、缓存等大尺寸、低价值的数据

  在高伸缩性的场景,用于对象及JSON数据的存储。

1.3.11 MongoDB 慎用场景

<td style="width: 62.1%; border-top-width: 1pt; border-top-color: white; border-left: none; border-bottom-width: 3pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #c7daae; padding: 3.1pt 0.75pt 0cm; height: 41.4pt;" width="62%">
  <p class="MsoNormal" style="text-align: center;" align="center">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">原因</span></strong>
  </p>
</td>
<td style="width: 62.1%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 2.9pt 0.75pt 0cm; height: 80.4pt;" width="62%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">Hadoop</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">、</span><span lang="EN-US">Spark</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">提供更多分析运算功能和工具,并行计算能力更强</span>
  </p>
  
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">MongoDB + Hadoop/Spark</span>
  </p>
</td>
<td style="width: 62.1%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 3.9pt 0.75pt 0cm; height: 70.3pt;" width="62%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">不建索引查询太慢,索引太多影响写入及更新操作</span>
  </p>
</td>
<td style="width: 62.1%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 3.1pt 0.75pt 0cm; height: 64.65pt;" width="62%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">关联支持较弱,事务较弱</span>
  </p>
</td>
<td style="width: 62.1%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 3.9pt 0.75pt 0cm; height: 64.65pt;" width="62%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">MongoDB&nbsp; </span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">事务支持仅限于本机的单文档事务</span>
  </p>
</td>
<td style="width: 62.1%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 3.9pt 0.75pt 0cm; height: 64.65pt;" width="62%">
  <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
    <span lang="EN-US">MongoDB</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">换主节点时候会有短暂的不可写设计所限</span>
  </p>
</td>

1.3.12 什么时候该MongDB 

<td style="width: 32.84%; border-top-width: 1pt; border-top-color: white; border-left: none; border-bottom-width: 3pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #008f00; padding: 3.1pt 0.75pt 0cm; height: 34pt;" valign="top" width="32%">
  <p class="MsoNormal" style="margin-top: 3.1pt; margin-right: 0cm; margin-bottom: .0001pt; margin-left: 6.5pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;">
    <strong><span style="font-size: 18.0pt; font-family: 'Calibri',sans-serif; mso-fareast-font-family: 宋体; color: white; letter-spacing: -.05pt; mso-font-kerning: 0pt;" lang="EN-US">Yes/No?</span></strong>
  </p>
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 0.75pt 0.75pt 0cm; height: 49.3pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #ecf2e5; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>
<td style="width: 32.84%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: white; border-right-width: 1pt; border-right-color: white; background: #f5f8f3; padding: 0.75pt 0.75pt 0cm; height: 37.9pt;" valign="top" width="32%">
  &nbsp;
</td>

  在上面的表格中进行选择,但有1个yes的时候:可以考虑MongoDB;当有2个以上yes的时候:不会后悔的选择!

1.4 MongoDB的部署

  MongoDB官网:https://www.mongodb.com/

  CentOS6.X版本软件下载地址:https://www.mongodb.org/dl/linux/x86_64-rhel62

    其他版本请到进行官网下载。

1.4.1 安装前准备

  在安装之前首先确认该版本软件是否支持你的操作系统。

    更多详情查看:https://docs.mongodb.com/manual/installation/ 

<td style="width: 20.74%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #f5f6f7; border-right-color: #f5f6f7; border-bottom-color: #f5f6f7; border-left: none; background: #7f7f7f; padding: 9pt; height: 5.15pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <strong><span style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; color: white; mso-font-kerning: 0pt;" lang="EN-US">3.6 Community & Enterprise</span></strong>
  </p>
</td>

<td style="width: 20.8%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #f5f6f7; border-right-color: #f5f6f7; border-bottom-color: #f5f6f7; border-left: none; background: #7f7f7f; padding: 9pt; height: 5.15pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <strong><span style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; color: white; mso-font-kerning: 0pt;" lang="EN-US">3.4 Community & Enterprise</span></strong>
  </p>
</td>

<td style="width: 20.8%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #f5f6f7; border-right-color: #f5f6f7; border-bottom-color: #f5f6f7; border-left: none; background: #7f7f7f; padding: 9pt; height: 5.15pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <strong><span style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; color: white; mso-font-kerning: 0pt;" lang="EN-US">3.2 Community & Enterprise</span></strong>
  </p>
</td>

<td style="width: 20.8%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #f5f6f7; border-right-color: #f5f6f7; border-bottom-color: #f5f6f7; border-left: none; background: #7f7f7f; padding: 9pt; height: 5.15pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <strong><span style="font-size: 10.5pt; font-family: 'Helvetica',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 宋体; color: white; mso-font-kerning: 0pt;" lang="EN-US">3.0 Community & Enterprise</span></strong>
  </p>
</td>
<td style="width: 20.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>
<td style="width: 20.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

<td style="width: 20.8%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #f5f6f7; border-right-width: 1pt; border-right-color: #f5f6f7; padding: 8.25pt 41.25pt 9pt;" width="20%">
  <p class="MsoNormal" style="margin-top: 18.0pt; margin-right: 0cm; margin-bottom: 18.0pt; margin-left: 0cm; text-align: center; mso-line-height-alt: 9.0pt; mso-pagination: widow-orphan; layout-grid-mode: both; mso-layout-grid-align: auto;" align="center">
    <span style="font-size: 10.5pt; font-family: 'Segoe UI Symbol',sans-serif; mso-fareast-font-family: 宋体; mso-bidi-font-family: 'Segoe UI Symbol'; color: #494747; mso-font-kerning: 0pt;" lang="EN-US">✓</span>
  </p>
</td>

1.4.2 环境说明

系统环境说明:

软件版本说明

1.4.3 部署MongoDB

在root用户下操作

  Transparent Huge Pages (THP),通过使用更大的内存页面,可以减少具有大量内存的机器上的缓冲区(TLB)查找的开销。

  但是,数据库工作负载通常对THP表现不佳,因为它们往往具有稀疏而不是连续的内存访问模式。您应该在Linux机器上禁用THP,以确保MongoDB的最佳性能。

创建用户

  修改用户密码

创建程序目录

下载程序

解压程序

修改程序属主

  切换到mongod用户,设置用户环境变量

     至此,MongoDB数据库部署完成

1.4.4 管理MongoDB

  数据库的启动与关闭

   参数说明: 

<td style="width: 67.52%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #4f81bd; border-right-color: #4f81bd; border-bottom-color: #4f81bd; border-left: none; background: #4f81bd; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; color: white; mso-themecolor: background1;">参数说明</span></strong>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据存放路径</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">日志文件路径</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">日志输出方式</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">启用端口号</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">在后台运行</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">是否需要验证权限登录</span><span lang="EN-US">(</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">用户名和密码</span><span lang="EN-US">)</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">限制访问的</span><span lang="EN-US">ip</span>
  </p>
</td>
<td style="width: 67.52%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="67%">
  <p class="MsoNormal">
    <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">关闭数据库</span>
  </p>
</td>

登入数据库

使用配置文件的方式管理数据库:

**  普通格式配置文件**

   使用配置文件时的启动与关闭:

在数据库中关闭数据库的方法

<p class="a3" style="color: #000000;">
  > 关闭所有打开的连接
</p>

<p class="a3" style="color: #000000;">
  > 将内存数据强制刷新到磁盘
</p>

<p class="a3" style="color: #000000;">
  > 当前的操作执行完毕
</p>

<p class="a3" style="color: #000000;">
  > 安全停止
</p>

<p class="a3" style="color: #000000;">
  <strong>  <span style="color: #ff0000;">切忌kill -9</span></strong>
</p>

<p class="a3">
  &nbsp;
</p>

<p class="a3" style="color: #000000;">
  &nbsp;  数据库直接关闭,数据丢失,数据文件损失,修复数据库(成本高,有风险)
</p>

   使用kill****命令关闭进程

使用脚本管理mongodb服务

   注:该脚本可以直接在root用户下运行

<div id="cnblogs_code_open_a536c7f0-5f93-49a1-bde2-20c8eb3f49ad" class="cnblogs_code_hide">
  <pre><span style="color: #008080;"> 1</span> [root@MongoDB ~]# <span style="color: #0000ff;">cat</span>  /etc/init.d/<span style="color: #000000;">mongod  

2 #!/bin/bash 3 # 4 # chkconfig: 2345 80 90 5 # description:mongodb 6 # by clsn 7 # blog_url http://blog.nmtui.com 8 ################################# 9 10 MONGODIR=/application/mongodb 11 MONGOD=$MONGODIR/bin/mongod 12 MONGOCONF=$MONGODIR/conf/mongod.conf 13 InfoFile=/tmp/start.mongo 14 15 . /etc/init.d/functions 16 17 status(){ 18 PID=<span style="color: #0000ff;">awk</span> <span style="color: #800000;">'</span><span style="color: #800000;">NR==2{print $NF}</span><span style="color: #800000;">'</span><span style="color: #000000;"> $InfoFile 19 Run_Num=<span style="color: #0000ff;">ps</span> -p $PID|<span style="color: #0000ff;">wc</span> -<span style="color: #000000;">l 20 if [ $Run_Num -eq 2 ]; then 21 echo "MongoDB is running" 22 else 23 echo "MongoDB is shutdown" 24 return 3 25 fi 26 } 27 28 start() { 29 status &>/dev/null 30 if [ $? -ne 3 ];then 31 action "启动MongoDB,服务运行中…" /bin/false 32 exit 2 33 fi 34 sudo su - mongod -c "$MONGOD -f $MONGOCONF" >$InfoFile 2>/dev/null 35 if [ $? -eq ];then 36 action "启动MongoDB" /bin/true 37 else 38 action "启动MongoDB" /bin/false 39 fi 40 } 41 42 43 stop() { 44 sudo su - mongod -c "$MONGOD -f $MONGOCONF –shutdown" &>/dev/null 45 if [ $? -eq ];then 46 action "停止MongoDB" /bin/true 47 else 48 action "停止MongoDB" /bin/false 49 fi 50 } 51 52 53 case "$1" in 54 start) 55 start 56 ;; 57 stop) 58 stop 59 ;; 60 restart) 61 stop 62 sleep 2 63 start 64 ;; 65 status) 66 status 67 ;; 68 *) 69 echo $"Usage: $0 {start|stop|restart|status}" 70 exit 1 71 esac

<p>
  <span class="cnblogs_code_collapse">View Code 脚本管理mongodb服务</span><span style="background-color: #ffffff; font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px;">&nbsp;</span></div> </div> 
  
  <h2>
    <span id="15_MongoDB">1.5 MongoDB的基本操作</span>
  </h2>
  
  <p>
    Mongodb中关键字种类:
  </p>
  
  <div>
    <blockquote>
      <p class="a3" style="color: #000000;">
        db(数据库实例级别)
      </p>
      
      <p class="a3" style="color: #000000;">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;db本身
      </p>
      
      <p class="a3" style="color: #000000;">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;db.connection 数据库下的集合信息
      </p>
      
      <p class="a3" style="color: #000000;">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;db.collection.xxx(
      </p>
      
      <p class="a3" style="color: #000000;">
        rs(复制集级别)
      </p>
      
      <p class="a3">
        &nbsp;
      </p>
      
      <p class="a3" style="color: #000000;">
        sh(分片级别)
      </p>
    </blockquote>
  </div>
  
  <h3>
    <span id="151">1.5.1 查询操作</span>
  </h3>
  
  <p>
    在客户端指定数据库进行连接:(默认连接本机test数据库)
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>[mongod@MongoDB ~]$ mongo <span style="color: #800080;">10.0</span>.<span style="color: #800080;">0.152</span>/<span style="color: #000000;">admin

MongoDB shell version: 3.2.8 connecting to: 10.0.0.152/admin > db admin

  <p>
    查看当前数据库版本
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.version()

3.2.8

  <p>
    切换数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> use test;

switched to db test

  <p>
    显示当前数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db

test > db.getName() test

  <p>
    查询所有数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #808080;">></span><span style="color: #000000;"> show dbs;

clsn .000GB local .000GB test .000GB > show databases; clsn .000GB local .000GB test .000GB

  <p>
    查看clsn数据库当前状态
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> <span style="color: #0000ff;">use</span><span style="color: #000000;"> clsn;

> db.stats() { "db" : "clsn", "collections" : 1, "objects" : 10000, "avgObjSize" : 80, "dataSize" : 800000, "storageSize" : 258048, "numExtents" : , "indexes" : 1, "indexSize" : 94208, "ok" : 1 }

  <p>
    查看当前数据库的连接机器地址
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.getMongo()

connection to 127.0.0.1

  <h3>
    <span id="152">1.5.2 数据管理</span>
  </h3>
  
  <p>
    创建数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> use clsn;</pre>
    </div>
  </div>
  
  <p>
    <strong><em><span style="text-decoration: underline;">说明:</span></em></strong>
  </p>
  
  <div>
    <blockquote>
      <div style="color: #000000;">
        <p class="a3">
          创建数据库:
        </p>
        
        <p class="a3">
          当use的时候,系统就会自动创建一个数据库。
        </p>
        
        <p class="a3">
          如果use之后没有创建任何集合。系统就会删除这个数据库。
        </p>
      </div>
    </blockquote>
  </div>
  
  <div>
    <p class="ac">
      删除数据库
    </p>
    
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> show dbs;

clsn .000GB local .000GB test .000GB > use clsn switched to db clsn > db.dropDatabase() { “dropped” : “clsn”, “ok” : 1 }

  <p>
    说明:
  </p>
  
  <div>
    <blockquote>
      <p class="a3" style="color: #000000;">
        删除数据库:
      </p>
      
      <p class="a3">
        &nbsp;
      </p>
      
      <p class="a3" style="color: #000000;">
          如果没有选择任何数据库,会删除默认的test数据库
      </p>
    </blockquote>
  </div>
  
  <p>
    <span style="background-color: #00ff00;"><strong>创建集合</strong></span>
  </p>
  
  <p>
    &nbsp;&nbsp; 方法一:
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">> use clsn;

switched to db clsn

db.createCollection(‘a’) { “ok” : 1 } db.createCollection(‘b’) { “ok” : 1 }

  <p>
    &nbsp;&nbsp; 查看当前数据下的所有集合
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> show collections;

a b > db.getCollectionNames() [ "a", "b" ]

  <p>
    方法二:
  </p>
  
  <p>
      当插入一个文档的时候,一个集合就会自动创建。
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> <span style="color: #0000ff;">use</span><span style="color: #000000;"> clsn;

switched to db clsn > db.c.insert({name:clsn}); WriteResult({ "nInserted" : 1 }) > db.c.insert({url:http://blog.nmtui.com}); WriteResult({ "nInserted" : 1 })

  <p>
    &nbsp;&nbsp; 查看创建的合集
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.getCollectionNames()

[ "a", "b", "c" ]

  <p>
    &nbsp;&nbsp; 查看合集里的内容
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.c.find()

{ "_id" : ObjectId("5a4cbcea83ec78b7bea904f8"), "name" : "clsn" } { "_id" : ObjectId("5a4cbcfc83ec78b7bea904f9"), "url" : "http://blog.nmtui.com" }

  <p>
    重命名集合
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> db.c.renameCollection(<span style="color: #800000;">"</span><span style="color: #800000;">clsn</span><span style="color: #800000;">"</span><span style="color: #000000;">)

{ "ok" : 1 } > db.getCollectionNames() [ "a", "b", "clsn" ]

  <p>
    &nbsp;&nbsp; 删除合集
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.a.drop()

true

db.getCollectionNames() [ "b", "clsn" ]

  <p>
    &nbsp;&nbsp; 插入1w行数据
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> <span style="color: #0000ff;">for</span>(i=<span style="color: #800080;"></span>;i&lt;<span style="color: #800080;">10000</span>;i++){ db.log.insert({<span style="color: #800000;">"</span><span style="color: #800000;">uid</span><span style="color: #800000;">"</span>:i,<span style="color: #800000;">"</span><span style="color: #800000;">name</span><span style="color: #800000;">"</span>:<span style="color: #800000;">"</span><span style="color: #800000;">mongodb</span><span style="color: #800000;">"</span>,<span style="color: #800000;">"</span><span style="color: #800000;">age</span><span style="color: #800000;">"</span>:<span style="color: #800080;">6</span>,<span style="color: #800000;">"</span><span style="color: #800000;">date</span><span style="color: #800000;">"</span>:<span style="color: #0000ff;">new</span><span style="color: #000000;"> Date()}); }

WriteResult({ "nInserted" : 1 })

  <p>
    查询集合中的查询所有记录
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> db.log.find()</pre>
    </div>
  </div>
  
  <p>
    注:默认每页显示20条记录,当显示不下的的情况下,可以用it迭代命令查询下一页数据。
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> DBQuery.shellBatchSize=<span style="color: #800080;">50</span><span style="color: #000000;">;    # 每页显示50条记录

50 app> db.log.findOne() # 查看第1条记录 app> db.log.count() # 查询总的记录数 app> db.log.find({uid:1000}); # 查询UUID为1000的数据

  <p>
    删除集合中的记录数
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>>  db.log.distinct(<span style="color: #800000;">"</span><span style="color: #800000;">name</span><span style="color: #800000;">"</span><span style="color: #000000;">)      #  查询去掉当前集合中某列的重复数据

[ "mongodb" ] > db.log.remove({}) # 删除集合中所有记录 WriteResult({ "nRemoved" : 10000 })
> db.log.distinct("name") [ ]

  <p>
    查看集合存储信息
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>><span style="color: #000000;"> db.log.stats()          # 查看数据状态

> db.log.dataSize() # 集合中数据的原始大小 > db.log.totalIndexSize() # 集合中索引数据的原始大小 > db.log.totalSize() # 集合中索引+数据压缩存储之后的大小 > db.log.storageSize() # 集合中数据压缩存储的大小

    <p class="ac">
      pretty()使用
    </p>
  </div>
  
  <div>
    <div class="cnblogs_code">
      <pre>> db.log.find({uid:<span style="color: #800080;">1000</span><span style="color: #000000;">}).pretty()

{ "_id" : ObjectId("5a4c5c0bdf067ab57602f7c2"), "uid" : 1000, "name" : "mongodb", "age" : 6, "date" : ISODate("2018-01-03T04:28:59.343Z") }

  <h2>
    <span id="16_MongoDB">1.6 MongoDB中用户管理</span>
  </h2>
  
  <p>
      MongoDB数据库默认是没有用户名及密码的,即无权限访问限制。为了方便数据库的管理和安全,需创建数据库用户。
  </p>
  
  <h3>
    <span id="161">1.6.1 用户的权限</span>
  </h3>
  
  <p>
      用户中权限的说明&nbsp;
  </p>
  
  <table class="MsoTable15Grid4Accent3" style="width: 100%; border-width: initial; border-style: none; border-color: initial;" border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td style="width: 31.14%; border-top-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-color: #9bbb59; border-bottom-color: #9bbb59; border-left-color: #9bbb59; border-right: none; background: #9bbb59; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 5;" align="center">
          <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; color: white; mso-themecolor: background1;">权限</span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #9bbb59; border-right-color: #9bbb59; border-bottom-color: #9bbb59; border-left: none; background: #9bbb59; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 1;" align="center">
          <strong><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New'; color: white; mso-themecolor: background1;">说明</span></strong>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; background: #eaf1dd; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span lang="EN-US">Read&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">允许用户读取指定数据库</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span lang="EN-US">readWrite&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">允许用户读写指定数据库</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; background: #eaf1dd; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span lang="EN-US">dbAdmin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">允许用户在指定数据库中执行管理函数,如索引创建、删除,查看统计或访问</span><span lang="EN-US">system.profile</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span lang="EN-US">userAdmin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">允许用户向</span><span lang="EN-US">system.users</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">集合写入,可以找指定数据库里创建、删除和管理用户</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; background: #eaf1dd; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span lang="EN-US">clusterAdmin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用,赋予用户所有分片和复制集相关函数的管理权限。</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span lang="EN-US">readAnyDatabase&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用,赋予用户所有数据库的读权限</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; background: #eaf1dd; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span lang="EN-US">readWriteAnyDatabase </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用,赋予用户所有数据库的读写权限</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span lang="EN-US">userAdminAnyDatabase </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用,赋予用户所有数据库的</span><span lang="EN-US">userAdmin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">权限</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; background: #eaf1dd; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span lang="EN-US">dbAdminAnyDatabase&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; background: #eaf1dd; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用,赋予用户所有数据库的</span><span lang="EN-US">dbAdmin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">权限。</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 31.14%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #c2d69b; border-bottom-color: #c2d69b; border-left-color: #c2d69b; border-top: none; padding: 0cm 5.4pt;" width="31%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span lang="EN-US">root&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></strong>
        </p>
      </td>
      
      <td style="width: 68.86%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #c2d69b; border-right-width: 1pt; border-right-color: #c2d69b; padding: 0cm 5.4pt;" width="68%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">只在</span><span lang="EN-US">admin</span><span style="font-family: '微软雅黑',sans-serif; mso-ascii-font-family: 'Courier New'; mso-hansi-font-family: 'Courier New';">数据库中可用。超级账号,超级权限</span>
        </p>
      </td>
    </tr>
  </table>
  
  <p>
      &nbsp;更多关于用户权限的说明参照:https://docs.mongodb.com/manual/core/security-built-in-roles/
  </p>
  
  <p>
    <em><span style="text-decoration: underline;">用户创建语法</span></em>&nbsp;&nbsp;
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">{

user: "<name>", pwd: "<cleartext password>", customData: { <any information> }, roles: [ { role: "<role>", db: "<database>" } | "<role>", … ] }

  <p>
    语法说明:
  </p>
  
  <div>
    <blockquote>
      <p class="a3" style="color: #000000;">
        user字段:用户的名字;
      </p>
      
      <p class="a3" style="color: #000000;">
        pwd字段:用户的密码;
      </p>
      
      <p class="a3" style="color: #000000;">
        cusomData字段:为任意内容,例如可以为用户全名介绍;
      </p>
      
      <p class="a3" style="color: #000000;">
        roles字段:指定用户的角色,可以用一个空数组给新用户设定空角色;
      </p>
      
      <p class="a3">
        &nbsp;
      </p>
      
      <p class="a3" style="color: #000000;">
        roles 字段:可以指定内置角色和用户定义的角色。
      </p>
    </blockquote>
  </div>
  
  <h3>
    <span id="162">1.6.2 创建管理员用户</span>
  </h3>
  
  <p>
    进入管理数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> <span style="color: #0000ff;">use</span> admin</pre>
    </div>
  </div>
  
  <p>
    创建管理用户,root权限
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">db.createUser(

{ user: "root", pwd: "root", roles: [ { role: "root", db: "admin" } ] } )

  <p>
    <span style="color: #ff0000;"><strong>注意:</strong></span>
  </p>
  
  <blockquote>
    <p style="color: #000000;">
      &nbsp;&nbsp;&nbsp;  创建管理员角色用户的时候,必须到admin下创建。
    </p>
    
    <p>
      &nbsp;
    </p>
    
    <p style="color: #000000;">
      &nbsp;&nbsp;  &nbsp;删除的时候也要到相应的库下操作。
    </p>
  </blockquote>
  
  <p>
    查看创建完用户后的collections;
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre> ><span style="color: #000000;"> show tables; 

system.users # 用户存放位置 system.version

  <p>
    <strong>查看创建的管理员用户</strong>
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>    ><span style="color: #000000;"> show users
{
    </span><span style="color: #800000;">"</span><span style="color: #800000;">_id</span><span style="color: #800000;">"</span> : <span style="color: #800000;">"</span><span style="color: #800000;">admin.root</span><span style="color: #800000;">"</span><span style="color: #000000;">,
    </span><span style="color: #800000;">"</span><span style="color: #800000;">user</span><span style="color: #800000;">"</span> : <span style="color: #800000;">"</span><span style="color: #800000;">root</span><span style="color: #800000;">"</span><span style="color: #000000;">,
    </span><span style="color: #800000;">"</span><span style="color: #800000;">db</span><span style="color: #800000;">"</span> : <span style="color: #800000;">"</span><span style="color: #800000;">admin</span><span style="color: #800000;">"</span><span style="color: #000000;">,
    </span><span style="color: #800000;">"</span><span style="color: #800000;">roles</span><span style="color: #800000;">"</span><span style="color: #000000;"> : [
        {
            </span><span style="color: #800000;">"</span><span style="color: #800000;">role</span><span style="color: #800000;">"</span> : <span style="color: #800000;">"</span><span style="color: #800000;">root</span><span style="color: #800000;">"</span><span style="color: #000000;">,
            </span><span style="color: #800000;">"</span><span style="color: #800000;">db</span><span style="color: #800000;">"</span> : <span style="color: #800000;">"</span><span style="color: #800000;">admin</span><span style="color: #800000;">"</span><span style="color: #000000;">
        }
    ]
}</span></pre>
    </div>
  </div>
  
  <p>
    验证用户是否能用
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>> db.auth(<span style="color: #800000;">"</span><span style="color: #800000;">root</span><span style="color: #800000;">"</span>,<span style="color: #800000;">"</span><span style="color: #800000;">root</span><span style="color: #800000;">"</span><span style="color: #000000;">)

1 # 返回 1 即为成功

  <p>
    用户创建完成后在配置文件中开启用户验证
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>cat >>/application/mongodb/conf/mongod.conf&lt;&lt;-<span style="color: #800000;">'</span><span style="color: #800000;">EOF</span><span style="color: #800000;">'</span><span style="color: #000000;">

security: authorization: enabled EOF

  <p>
    重启服务
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>/etc/init.d/mongod  restart</pre>
    </div>
    
    <p>
        <span style="background-color: #ffff00; color: #ff0000;"><strong>登陆测试,注意登陆时选择admin</strong><strong>数据库</strong></span>
    </p>
  </div>
  
  <p>
       <span style="color: #ff0000;"> 注意:</span>用户在哪个数据库下创建的,最后加上什么库。
  </p>
  
  <p>
    方法一:命令行中进行登陆
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>[mongod@MongoDB ~]$ mongo -uroot -<span style="color: #000000;">proot admin 

MongoDB shell version: 3.2.8 connecting to: admin >

  <p>
    方法二:在数据库中进行登陆验证:
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>[mongod@MongoDB ~<span style="color: #000000;">]$ mongo 

MongoDB shell version: 3.2.8 connecting to: test > use admin switched to db admin > db.auth("root","root") 1

show tables; system.users system.version

  <h3>
    <span id="163">1.6.3 按生产需求创建应用用户</span>
  </h3>
  
  <p>
    <span style="background-color: #ffff00;"><strong>创建对某库的只读用户</strong></span>
  </p>
  
  <p>
    &nbsp;&nbsp; 在test库创建只读用户test
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">use</span><span style="color: #000000;"> test

db.createUser( { user: "test", pwd: "test", roles: [ { role: "read", db: "test" } ] } )

  <p>
    &nbsp;&nbsp; 测试用户是否创建成功
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>db.auth(<span style="color: #800000;">"</span><span style="color: #800000;">test</span><span style="color: #800000;">"</span>,<span style="color: #800000;">"</span><span style="color: #800000;">test</span><span style="color: #800000;">"</span><span style="color: #000000;">)

show users;

  <p>
    登录test用户,并测试是否只读
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">show collections;

db.createCollection(b)

  <p>
    <span style="background-color: #ffff00;"><strong>创建某库的读写用户</strong></span>
  </p>
  
  <p>
      创建test1用户,权限为读写
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">db.createUser(

{ user: "test1", pwd: "test1", roles: [ { role: "readWrite", db: "test" } ] } )

  <p>
    &nbsp;&nbsp; 查看并测试用户
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">show users;

db.auth("test1","test1")

  <p>
    <span style="background-color: #ffff00;"><strong>创建对多库不同权限的用户</strong></span>
  </p>
  
  <p>
    &nbsp;&nbsp; 创建对app为读写权限,对test库为只读权限的用户
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">use</span><span style="color: #000000;"> app

db.createUser( { user: "app", pwd: "app", roles: [ { role: "readWrite", db: "app" }, { role: "read", db: "test" } ] } )

  <p>
    查看并测试用户
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">show users

db.auth("app","app")

  <p>
    <strong>删除用户</strong>
  </p>
  
  <p>
    &nbsp;&nbsp; 删除app用户:先登录到admin数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre>mongo -uroot &ndash;proot <span style="color: #800080;">127.0</span>.<span style="color: #800080;">0.1</span>/admin</pre>
    </div>
  </div>
  
  <p>
    &nbsp;&nbsp; 进入app库删除app用户
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">use</span><span style="color: #000000;"> app

db.dropUser("app")

  <h3>
    <span id="164">1.6.4 自定义数据库</span>
  </h3>
  
  <p>
    创建app数据库的管理员:先登录到admin数据库
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">use</span><span style="color: #000000;"> app

db.createUser( { user: "admin", pwd: "admin", roles: [ { role: "dbAdmin", db: "app" } ] } )

  <p>
    创建app数据库读写权限的用户并具有clusterAdmin权限:
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">use</span><span style="color: #000000;"> app

db.createUser( { user: "app04", pwd: "app04", roles: [ { role: "readWrite", db: "app" }, { role: "clusterAdmin", db: "admin" } ] } )

  <h2>
    <span id="17_SQLMongoDB">1.7 SQL与MongoDB语言对比</span>
  </h2>
  
  <p>
    <span style="background-color: #00ff00;">SQL语言与CRUD语言对照</span>&nbsp;
  </p>
  
  <table class="MsoTable15Grid4Accent1" style="width: 100%; border-width: initial; border-style: none; border-color: initial;" border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td style="width: 37.92%; border-top-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-color: #4f81bd; border-bottom-color: #4f81bd; border-left-color: #4f81bd; border-right: none; background: #4f81bd; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 5;" align="center">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">SQL Schema Statements</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #4f81bd; border-right-color: #4f81bd; border-bottom-color: #4f81bd; border-left: none; background: #4f81bd; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: center; mso-yfti-cnfc: 1;" align="center">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">MongoDB Schema Statements</span></strong>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">CREATE TABLE users (</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">id MEDIUMINT NOT NULL</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">AUTO_INCREMENT,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">user_id Varchar(30),</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">age Number,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">status char(1),</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">PRIMARY KEY (id)</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">Implicitly created on first insert() operation. The primary </span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">key _idis automatically added if _id field is not specified.</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.insert( {</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">user_id: "abc123",</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">age: 55,</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">status: "A"</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">} )</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">However, you can also explicitly create a collection:</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.createCollection("users")</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">ALTER TABLE users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">ADD join_date DATETIME</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;">在<span lang="EN-US">Collection </span></span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">级</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">没有数据</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">结</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">构概念。然而在</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US"> document</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">级</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">,可以通</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">过</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">$set</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;">在</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">update</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;">操作添加列到文档中。</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.update(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ $set: { join_date: new Date() } },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ multi: true }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">ALTER TABLE users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">DROP COLUMN join_date</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;">在<span lang="EN-US">Collection </span></span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">级</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">没有数据</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">结</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">构概念。然而在</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US"> document</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">级</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">,可以通</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">过</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">$unset</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;">在<span lang="EN-US">update</span>操作从文档中</span><span style="font-family: '微软雅黑',sans-serif; mso-bidi-font-family: 微软雅黑;">删</span><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; mso-bidi-font-family: 'Yu Gothic UI Semibold';">除列。</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.update(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ $unset: { join_date: "" } },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ multi: true }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">CREATE INDEX idx_user_id_asc</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">ON users(user_id)</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.createIndex( { user_id: 1 } )</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">CREATE INDEX</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">idx_user_id_asc_age_desc</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">ON users(user_id, age DESC)</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.createIndex( { user_id: 1, age: -1 } )</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 37.92%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" width="37%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">DROP TABLE users</span></strong>
        </p>
      </td>
      
      <td style="width: 62.08%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" width="62%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.drop()</span>
        </p>
      </td>
    </tr>
  </table>
  
  <p>
    <span style="background-color: #00ff00;">插入/删除/更新 语句对比</span>
  </p>
  
  <table class="MsoTable15Grid4Accent1" style="width: 100%; border-width: initial; border-style: none; border-color: initial;" border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td style="width: 39.26%; border-top-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-color: #4f81bd; border-bottom-color: #4f81bd; border-left-color: #4f81bd; border-right: none; background: #4f81bd; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 5;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">SQL &nbsp;Statements</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #4f81bd; border-right-color: #4f81bd; border-bottom-color: #4f81bd; border-left: none; background: #4f81bd; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 1;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">MongoDB &nbsp;Statements</span></strong>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">INSERT INTO</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">users(user_id,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">age</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">status)</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">VALUES ("bcd001",</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">45,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">"A")</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.insert(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ user_id: "bcd001", age:</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">45, status: "A" }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">DELETE FROM users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">WHERE status = "D"</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.remove( { status: "D" } )</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">DELETE FROM users</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.remove({})</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">UPDATE users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SET status = "C"</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">WHERE age > 25</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.update(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ age: { $gt: 25 } },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ $set: { status: "C" } },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ multi: true }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">UPDATE users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SET age = age + 3</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">WHERE status = "A"</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.update(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ status: "A" } ,</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ $inc: { age: 3 } },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ multi: true }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
  </table>
  
  <p>
    <span style="background-color: #00ff00;">查询类操作对比&nbsp;</span>
  </p>
  
  <table class="MsoTable15Grid4Accent1" style="width: 100%; border-width: initial; border-style: none; border-color: initial;" border="1" cellspacing="0" cellpadding="0">
    <tr>
      <td style="width: 39.26%; border-top-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-top-color: #4f81bd; border-bottom-color: #4f81bd; border-left-color: #4f81bd; border-right: none; background: #4f81bd; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 5;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">SQL SELECT Statements</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top-width: 1pt; border-right-width: 1pt; border-bottom-width: 1pt; border-top-color: #4f81bd; border-right-color: #4f81bd; border-bottom-color: #4f81bd; border-left: none; background: #4f81bd; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 1;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif; color: white; mso-themecolor: background1;" lang="EN-US">MongoDB find() Statements</span></strong>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SELECT *</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">FROM users</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.find()</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SELECT id,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">user_id,</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">status</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">FROM users</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.find(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ user_id: 1, status: 1, _id: 0 }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SELECT user_id, status</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">FROM users</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.find(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ user_id: 1, status: 1 }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SELECT *</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">FROM users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 4;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">WHERE status = "A"</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.find(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ status: "A" }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
    
    <tr>
      <td style="width: 39.26%; border-right-width: 1pt; border-bottom-width: 1pt; border-left-width: 1pt; border-right-color: #95b3d7; border-bottom-color: #95b3d7; border-left-color: #95b3d7; border-top: none; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="39%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">SELECT user_id, status</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">FROM users</span></strong>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 68;">
          <strong><span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">WHERE status = "A"</span></strong>
        </p>
      </td>
      
      <td style="width: 60.74%; border-top: none; border-left: none; border-bottom-width: 1pt; border-bottom-color: #95b3d7; border-right-width: 1pt; border-right-color: #95b3d7; background: #dbe5f1; padding: 0cm 5.4pt;" valign="top" width="60%">
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">db.users.find(</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ status: "A" },</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">{ user_id: 1, status: 1, _id: 0 }</span>
        </p>
        
        <p class="MsoNormal" style="text-align: justify; text-justify: inter-ideograph; mso-yfti-cnfc: 64;">
          <span style="font-family: 'Yu Gothic UI Semibold',sans-serif;" lang="EN-US">)</span>
        </p>
      </td>
    </tr>
  </table>
  
  <h2>
    <span id="18">1.8 错误解决</span>
  </h2>
  
  <h6>
    <span id="i"><span style="font-size: 14px;">  在登陆数据库的时候,发现会由描述文件相关的报错。</span></span>
  </h6>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #000000;">[mongod@MongoDB mongodb]$ mongo

MongoDB shell version: 3.2.8 connecting to: test Server has startup warnings: 2018-01-03T11:08:55.526+0800 I CONTROL [initandlisten] 2018-01-03T11:08:55.526+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. rlimits set to 19193 processes, 65535 files. Number of processes should be at least 32767.5 : 0.5 times number of files.

  <p>
    解决办法:
  </p>
  
  <div>
    <div class="cnblogs_code">
      <pre><span style="color: #0000ff;">cat</span> >> /etc/security/limits.conf &lt;&lt;<span style="color: #000000;">EOF

mongod soft nofile 32767.5 mongod soft nproc 32767.5 EOF

  <p>
    &nbsp;&nbsp; 修改后,重启服务器,即可解决该问题。
  </p>
  
  <h2>
    <span id="19">1.9 参考文献</span>
  </h2>
  
  <div>
    <blockquote>
      <p class="a3" style="color: #000000;">
        [1]&nbsp;&nbsp;<a href="https://docs.mongodb.com/manual/introduction/">https://docs.mongodb.com/manual/introduction/</a>
      </p>
      
      <p class="a3" style="color: #000000;">
        [2]&nbsp;&nbsp;<a href="/wp-content/themes/clsn-003/inc/go.php?url=http://www.mongoing.com/docs/introduction.html" >http://www.mongoing.com/docs/introduction.html</a>
      </p>
      
      <p class="a3" style="color: #000000;">
        [3]&nbsp;&nbsp;<a href="https://zh.wikipedia.org/">https://zh.wikipedia.org/</a>
      </p>
      
      <p class="a3" style="color: #000000;">
        [4]&nbsp;&nbsp;<a href="https://docs.mongodb.com/manual/core/security-built-in-roles/">https://docs.mongodb.com/manual/core/security-built-in-roles/</a>
      </p>
    </blockquote>
  </div>
  
  <p>
    &nbsp;
  </p>
  
  <div id="toc_container" class="toc_white have_bullets">
    <ul class="toc_list">
      <li>
        <a href="#11">1.1 数据库管理系统</a><ul>
          <li>
            <a href="#111">1.1.1 什么是数据?</a>
          </li>
          <li>
            <a href="#112">1.1.2 什么是数据库管理系统?</a>
          </li>
          <li>
            <a href="#113">1.1.3 常见数据库管理系统?</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#12_NoSQL">1.2 NoSQL是什么?</a><ul>
          <li>
            <a href="#121_NoSQL">1.2.1 NoSQL简介</a>
          </li>
          <li>
            <a href="#122_NoSQL">1.2.2 NoSQL数据库四大家族</a>
          </li>
          <li>
            <a href="#123_NoSQL">1.2.3 NoSQL的优势</a>
          </li>
          <li>
            <a href="#124_NoSQLRDBMSnbsp">1.2.4 NoSQL与RDBMS对比&nbsp;</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#13_MongoDB">1.3 MongoDB简介</a><ul>
          <li>
            <a href="#131_MongoDB">1.3.1 MongoDB是什么</a>
          </li>
          <li>
            <a href="#132_MongoDB">1.3.2 MongoDB的特性</a>
          </li>
          <li>
            <a href="#133_mongodb">1.3.3 关系型数据库与mongodb对比</a>
          </li>
          <li>
            <a href="#134_MongoDB">1.3.4 MongoDB数据存储格式</a>
          </li>
          <li>
            <a href="#135_MongoDB">1.3.5 MongoDB的优势</a>
          </li>
          <li>
            <a href="#136">1.3.6 高可用的复制集群</a>
          </li>
          <li>
            <a href="#137">1.3.7 水平扩展</a>
          </li>
          <li>
            <a href="#138">1.3.8 各存储引擎的对比</a>
          </li>
          <li>
            <a href="#139">1.3.9 数据库功能和性能对比</a>
          </li>
          <li>
            <a href="#1310_MongoDB">1.3.10 MongoDB适用场景</a>
          </li>
          <li>
            <a href="#1311_MongoDB">1.3.11 MongoDB 慎用场景</a>
          </li>
          <li>
            <a href="#1312_MongDBnbsp">1.3.12 什么时候该MongDB&nbsp;</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#14_MongoDB">1.4 MongoDB的部署</a><ul>
          <li>
            <a href="#141">1.4.1 安装前准备</a>
          </li>
          <li>
            <a href="#142">1.4.2 环境说明</a>
          </li>
          <li>
            <a href="#143_MongoDB">1.4.3 部署MongoDB</a>
          </li>
          <li>
            <a href="#144_MongoDB">1.4.4 管理MongoDB</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#15_MongoDB">1.5 MongoDB的基本操作</a><ul>
          <li>
            <a href="#151">1.5.1 查询操作</a>
          </li>
          <li>
            <a href="#152">1.5.2 数据管理</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#16_MongoDB">1.6 MongoDB中用户管理</a><ul>
          <li>
            <a href="#161">1.6.1 用户的权限</a>
          </li>
          <li>
            <a href="#162">1.6.2 创建管理员用户</a>
          </li>
          <li>
            <a href="#163">1.6.3 按生产需求创建应用用户</a>
          </li>
          <li>
            <a href="#164">1.6.4 自定义数据库</a>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#17_SQLMongoDB">1.7 SQL与MongoDB语言对比</a>
      </li>
      <li>
        <a href="#18">1.8 错误解决</a><ul>
          <li>
            <ul>
              <li>
                <ul>
                  <li>
                    <ul>
                      <li>
                        <a href="#i">  在登陆数据库的时候,发现会由描述文件相关的报错。</a>
                      </li>
                    </ul>
                  </li>
                </ul>
              </li>
            </ul>
          </li>
        </ul>
      </li>
      
      <li>
        <a href="#19">1.9 参考文献</a>
      </li>
    </ul>
  </div>