Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Doc store

15 views

Published on

Doc store presentation at MYSQL User camp 11 Oct 2018 by Sankalita Chakraborty

Published in: Engineering
  • Be the first to comment

  • Be the first to like this

Doc store

  1. 1. MySQL Document Store Sankalita Chakraborty Senior Member Technical Staff sankalita.chakraborty@oracle.com 11th October 2018
  2. 2. Copyright © 2016, Oracle and/or its affiliates. All rights reserved. | Safe Harbour Statement Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  3. 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. 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.
  5. 5. Document Store Architecture Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  6. 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. 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. 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. 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.
  10. 10. Collection ADD Function Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  11. 11. Collection FIND Function Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  12. 12. Collection MODIFY Function Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  13. 13. Collection REMOVE Function Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  14. 14. Examples of CRUD Operation (using C/JAVA) Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  15. 15. Create collection Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  16. 16. Insert Data Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  17. 17. Find JSON document Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  18. 18. Modify JSON document Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  19. 19. Remove JSON document Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  20. 20. Demo of CRUD Operation (using C/JAVA) Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved.
  21. 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.

×