3. Introduction
●
●
Alternative way using the MySQL Database.
●
Allows Users to work with
➔
SQL relational tables
➔
Schema-less JSON collections using CRUD Operation
●
Key features
➔
Flexibility of a NoSQL Database
➔
Consistency of a RDBMS
➔
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
4. What is a Document ?
●
Set of key value pairs
●
Schema-less
●
Data Structure capable of representing complex information
●
Examples of Documents
➔
JSON
➔
XML
➔
YAML
●
Reasons for using JSON
➔
Compact, Popular and Standardized
➔
Natively available in Python, Javascript etc
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
6. MySQL Document Store –Components
●
MySQL Shell/Connectors
➔
Interactive Shell allowing execution of CRUD operation
➔
Provides DevAPI and Standard API support in Specific Languages
●
X Dev API
➔
New, standard APIs for CRUD and SQL operations on top of X Protocol
➔
Introduces Collections as new Schema object.
●
X Protocol
➔
New MySQL client protocol on top of TCP layer
➔
Uses Protobuf
➔
Works for both CRUD and SQL operations
●
X Plugin
➔
Enables the communication using X Protocol for relational and document operations
➔
Maps CRUD operation to tables
➔
Supports clients that implement X DevAPI and enables use of MySQL as a document
store.
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
7. MySQL Document Store Flowchart
●
Application generates XPlugin requests using Connector DevAPIs
●
Requests are transported to the XPugin via XProtocol
●
XPlugin generates SQL queries corresponding to the requests
●
Collections are stored as InnoDB tables
●
ACID Compliance, transactions, replications, row locking all work as normal
MySQL
Application
(DevAPI)
XPlugin MySQL(Innodb)Xprotocol (TCP)
Xplugin Requests SQL Queries
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
8. Document Store DevAPI
●
Set of APIs which enable the usage of MySQL Document store .
●
They are implemented as Native Language APIs by specific Connectors.
●
Abstracts the Relational DataBase aspect
➔
Developer can write queries and DB code directly in Net, Java, Python,
NodeJS, C++
➔
Developer deals directly with Collections as opposed to Table, columns,
schema etc
●
They implement CRUD methods to insert, query, modify and delete JSON documents
●
Relational table support is provided.
●
Simplified Indexes for indexing document fields.
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
9. JSON Indexing
JSON columns cannot be indexed directly.
Generated columns allow indexing on specific values in JSON documents.
➔ Create a virtual column on the value
➔ Create an index in on the virtual column
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
20. Demo of CRUD Operation
(using C/JAVA)
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
21. ✔ Schemaless or/and Schema
✔ Rapid Prototyping/Simpler APIs
✔ Document Model
✔ Transactions
✔ ACID Properties
Conclusion
MySQL Document Store allows both schema-less and schema in the same technology stack.
Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
Notas del editor
Growing roster of users running Cluster – lots of telcos, fastest growth web and enterprise, see social gaming, online ecomm properties, content delivery
PayPal spoke earlier in the month at MySQL Connect conf how they built new payment fraud detection system out of MySQL, deployed globally across AWS, enabling them to read any write from anywhere in the world in under 1 sec, so grown from a specialisation in telco to serve a broad selection of use cases – now gojng into detail on next major step forward – Cluster 7.3
Pass to Andrew
<number>