<div id="docs-body">
 <div class="chapter">
  <div class="titlepage">
   <div>
    <div>
     <h1 class="title">
      <a name="document-store">
      </a>
      Chapter 22 Using MySQL as a Document Store
     </h1>
    </div>
   </div>
  </div>
  <div class="toc">
   <p>
    <b>
     Table of Contents
    </b>
   </p>
   <dl class="toc">
    <dt>
     <span class="section">
      <a href="document-store-interfaces.html">
       22.1 Interfaces to a MySQL Document Store
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="document-store-concepts.html">
       22.2 Document Store Concepts
      </a>
     </span>
    </dt>
    <dt>
     <span class="section">
      <a href="mysql-shell-tutorial-javascript.html">
       22.3 JavaScript Quick-Start Guide: MySQL Shell for Document Store
      </a>
     </span>
    </dt>
    <dd>
     <dl>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-javascript-shell.html">
         22.3.1 MySQL Shell
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-javascript-download.html">
         22.3.2 Download and Import world_x Database
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-javascript-documents-collections.html">
         22.3.3 Documents and Collections
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-javascript-relational-tables.html">
         22.3.4 Relational Tables
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-javascript-documents-in-tables.html">
         22.3.5 Documents in Tables
        </a>
       </span>
      </dt>
     </dl>
    </dd>
    <dt>
     <span class="section">
      <a href="mysql-shell-tutorial-python.html">
       22.4 Python Quick-Start Guide: MySQL Shell for Document Store
      </a>
     </span>
    </dt>
    <dd>
     <dl>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-python-shell.html">
         22.4.1 MySQL Shell
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-python-download.html">
         22.4.2 Download and Import world_x Database
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-python-documents-collections.html">
         22.4.3 Documents and Collections
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-python-relational-tables.html">
         22.4.4 Relational Tables
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="mysql-shell-tutorial-python-documents-in-tables.html">
         22.4.5 Documents in Tables
        </a>
       </span>
      </dt>
     </dl>
    </dd>
    <dt>
     <span class="section">
      <a href="x-plugin.html">
       22.5 X Plugin
      </a>
     </span>
    </dt>
    <dd>
     <dl>
      <dt>
       <span class="section">
        <a href="x-plugin-checking-installation.html">
         22.5.1 Checking X Plugin Installation
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-disabling.html">
         22.5.2 Disabling X Plugin
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-encrypted-connections.html">
         22.5.3 Using Encrypted Connections with X Plugin
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-sha2-cache-plugin.html">
         22.5.4 Using X Plugin with the Caching SHA-2 Authentication Plugin
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-connection-compression.html">
         22.5.5 Connection Compression with X Plugin
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-options-variables.html">
         22.5.6 X Plugin Options and Variables
        </a>
       </span>
      </dt>
      <dt>
       <span class="section">
        <a href="x-plugin-system-monitoring.html">
         22.5.7 Monitoring X Plugin
        </a>
       </span>
      </dt>
     </dl>
    </dd>
   </dl>
  </div>
  <a class="indexterm" name="idm46045128173776">
  </a>
  <a class="indexterm" name="idm46045128172736">
  </a>
  <a class="indexterm" name="idm46045128171248">
  </a>
  <p>
   This chapter introduces an alternative way of working with MySQL as
    a document store, sometimes referred to as
   <span class="quote">
    “
    <span class="quote">
     using
    NoSQL
    </span>
    ”
   </span>
   . If your intention is to use MySQL in a traditional
    (SQL) way, this chapter is probably not relevant to you.
  </p>
  <p>
   Traditionally, relational databases such as MySQL have usually
    required a schema to be defined before documents can be stored. The
    features described in this section enable you to use MySQL as a
    document store, which is a schema-less, and therefore
    schema-flexible, storage system for documents. For example, when you
    create documents describing products, you do not need to know and
    define all possible attributes of any products before storing and
    operating with the documents. This differs from working with a
    relational database and storing products in a table, when all
    columns of the table must be known and defined before adding any
    products to the database. The features described in this chapter
    enable you to choose how you configure MySQL, using only the
    document store model, or combining the flexibility of the document
    store model with the power of the relational model.
  </p>
  <p>
   To use MySQL as a document store, you use the following server
    features:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      X Plugin enables MySQL Server to communicate with clients using
        X Protocol, which is a prerequisite for using MySQL as a
        document store. X Plugin is enabled by default in MySQL Server
        as of MySQL 8.4. For instructions to verify X
        Plugin installation and to configure and monitor X Plugin, see
      <a class="xref" href="x-plugin.html" title="22.5 X Plugin">
       Section 22.5, “X Plugin”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      X Protocol supports both CRUD and SQL operations,
        authentication via SASL, allows streaming (pipelining) of
        commands and is extensible on the protocol and the message
        layer. Clients compatible with X Protocol include MySQL Shell
        and MySQL 8.4 Connectors.
     </p>
    </li>
    <li class="listitem">
     <p>
      Clients that communicate with a MySQL Server using X Protocol
        can use X DevAPI to develop applications. X DevAPI offers a
        modern programming interface with a simple yet powerful design
        which provides support for established industry standard
        concepts. This chapter explains how to get started using either
        the JavaScript or Python implementation of X DevAPI in
        MySQL Shell as a client. See
      <a class="ulink" href="/doc/x-devapi-userguide/en/" target="_top">
       X DevAPI User Guide
      </a>
      for in-depth tutorials on
        using X DevAPI.
     </p>
    </li>
   </ul>
  </div>
 </div>
 <br/>
</div>
