SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Copyright	©	2015,	Oracle	and/or	its	affiliates.	All	rights	reserved.		|	
Mark	Swarbrick		
MySQL	Principle	Presales	Consultant	
Mark.Swarbrick@Oracle.com	
	
Oracle	Code	London	2018	
	
MySQL 8.0
a Document Store with all the benefits of a
transactional RDBMS
Safe Harbor Statement
The following is intended to outline our general product direction. It is
intended for information purpose 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 up in making purchasing decisions.
The development, release and timing of any features or functionality
described for Oracle´s product remains at the sole discretion of Oracle.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Agenda
•  Relational vs NoSQL databases
•  MySQL	Document Store: the solution
•  Takeaways
•  Demo
RDBMS & MySQL
Relational vs NoSQL databases
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Relational Databases
Data Integrity
normalization
constraints (foreign keys, ...)
Atomicity, Consistency, Isolation, Durability
ACID compliant
transactions
SQL
powerfull query language
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Schemaless
no schema design, no normalization, no foreign keys, no data types, ...
very quick initial development
Flexible data structure
embedded arrays or objects
valid solution when natural data can´t be
modeled optimally into a relational model
objects persistence without the use of any ORM - mapping	object-oriented	
JSON
close to frontend
native in JS
easy to learn
NoSQL or Document Store
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
How DBAs see data How Developers see data
{
"GNP" : 249704,
"Name" : "Belgium",
"government" : {
"GovernmentForm" :
"Constitutional Monarchy, Federation",
"HeadOfState" : "Philippe I"
},
"_id" : "BEL",
"IndepYear" : 1830,
"demographics" : {
"Population" : 10239000,
"LifeExpectancy" : 77.8000030517578
},
"geography" : {
"Region" : "Western Europe",
"SurfaceArea" : 30518,
"Continent" : "Europe"
}
}
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
DMBS or NoSQL ?
Why not both ?
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
The MySQL Document Store !
SQL is now optional !
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
A solution for all
34 / 112
Developers:	
[✔]	Schemaless	or/and	Schema	
[✔]	Rapid	Prototyping/Simpler	APIs	
[✔]	Document	Model	
[✔]	Transactions	
	
Operations:	
[✔]	Performance	Management/Visibility	
[✔]	Robust	Replication,	Backup,	Restore	
[✔]	Comprehensive	Tooling	Ecosystem	
[✔]	Simpler	application	schema	upgrades	
Business	Owner:	
[✔]	Don’t	lose	my	data	=		ACID	transactions	
[✔]	Capture	all	my	data	=	Extensible/Schemaless	
[✔]	Products	On	Schedule/Time	to	Market	=	Rapid	Development	
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL Document Store
the Solution
35 / 112
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
35 / 112
	MySQL	Document	Store	
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
X DevAPI Connectors for
C++, Java, .Net, Node.js, Python, PHP
working with Communities
New MySQL Shell
Command Completion
Python, JavaScript & SQL modes
Admin functions
New Util object
A new high-level session concept that can scale from
single MySQL Server to a multiple server environment
Non-blocking, asynchronous calls follow common
language pat erns
Supports CRUD operations
37 / 112
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
	MySQL	Documents	and	Collections	
•  Collections	are	containers	for	documents		
– These	documents	share	a	purpose		
– Possibly	share	one	or	more	indexes		
– Each	collection	has	a	unique	name	
– Exists	within	a	single	schema	
•  Within	a	Collection	you	can			
– Add(),	Find(),	Modify(),	and	Remove()	-	JSON	documents	
•  Collections	can	be	
– Create(),	List(),	Drop()
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Operation Document Relational
Create Collection.add() Table.insert()
Read Collection.find() Table.select()
Update Collection.modify() Table.update()
Delete Collection.remove() Table.delete()
•  Use	SQL,	CRUD	APIs	–	Document	(NoSQL)	and	Relational	(SQL),	or	“All	of	the	Above”	
–  All	of	this	is	in	addition	to	the	Classic	APIs	
MySQL	X	DevAPI	included	in	Shell	and	Connectors
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
It	relies	on	the	proven	MySQL	InnoDB’s	strength	&	robustness:	
	
•  innodb_flush_log_at_trx_commit = 1	
•  innodb_doublewrite = ON	
•  sync_binlog = 1	
•  transaction_isolation = REPEATABLE-READ | READ-COMMITTED | ...	
We	do	care	about	your	data!	
MySQL	Document	Store	is	Full	ACID		
ACID	transactions	=	Don’t	lose	my	data
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL	Shell	8.0.11+	
	
	
MySQL	
Server	5.7	
MySQL	8.0	
Upgrade	Checker	
Prompt	Themes	
Auto	Completion	
&	
Command	History	
MySQL	
Server	8.0	
Document	Store	
X	DevAPI	
InnoDB	Cluster	
	
SQL	CLI	
	
Output	Formats	
(Table,	JSON,	Tabbed)	
Batch	Execution	
	
JavaScript	
Python	
SQL
MySQL	Document	Store:	Architecture	
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL	X	devAPI	connector	for:	
	
•  Java	
-  https://insidemysql.com/connector-j-8-0-11-the-face-for-your-brand-new-document-oriented-database/	
•  .NET	
-  https://insidemysql.com/introducing-connector-net-with-full-support-for-mysql-8-0/	
•  Node.JS	
-  https://insidemysql.com/introducing-connector-node-js-for-mysql-8-0/	
•  C++	
-  https://insidemysql.com/what-is-new-in-connector-c-8-0/	
•  Python	
-  https://insidemysql.com/using-mysql-connector-python-8-0-with-mysql-8-0/	
•  PHP	
-  https://insidemysql.com/introducing-the-mysql-x-devapi-php-extension-for-mysql-8-0/	
•  ODBC	
-  https://insidemysql.com/what-is-new-in-connector-odbc-8-0/	
https://insidemysql.com/mysql-8-0-welcome-to-the-devapi/	
Write	application	using														X	DevAPI
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
what do I gain ?
Takeaways
This is the best of the two worlds in one product !
Data integrity
ACID Compliant
Transactions
SQL
schemaless
flexible data structure
easy to start (CRUD)
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
Resources	
Topic Link(s)
MySQL	as	a	Document	Store https://dev.mysql.com/doc/refman/8.0/en/document-store.html
MySQL	Shell	User	Guide https://dev.mysql.com/doc/mysql-shell-excerpt/8.0/en/index.html
MySQL	Shell	Documentation https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/
https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/
X	Dev	API	User	Guide https://dev.mysql.com/doc/x-devapi-userguide/en/
X	Plugin https://dev.mysql.com/doc/refman/8.0/en/x-plugin.html
MySQL	Engineering	Blog https://insidemysql.com/mysql-8-0-welcome-to-the-devapi/
https://insidemysql.com/mysql-document-store-crud-quick-start/
MySQL	JSON	Data	Type https://dev.mysql.com/doc/refman/8.0/en/json.html
Blogs http://dasini.net/blog/2015/11/17/30-mins-avec-json-en-mysql/
http://dasini.net/blog/2015/11/30/json-et-colonnes-generees-avec-mysql
http://mysqlserverteam.com/tag/json/
http://mysqlserverteam.com/category/docstore/	
22
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL Document Store
Demo
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
js> session.createSchema('name')	
js> use doc	
js> db.getCollections()	
js> db.createCollection(‘myCollection')	
js> db.getCollections()
js> db.myCollection.add({“param1":“value1", “param2":“value2”})	
	
	
js> db.myCollection.find()
js> db.myCollection.find().limit(1)
js> db.myCollection.find("_id = '00005af018430000000000000002'")
js> db.myCollection.modify("_id = '1234'").set(“param",“value")
js> db.myCollection.remove("_id = '1234'")
js> session.startTransaction()
js> …
js> session.rollback()
	
Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
MySQL	Document	Store	demo	“cheat	sheet”	
Create	
Read	
Update	
Delete	
Sessions

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

TLV - Whats new in MySQL 8
TLV - Whats new in MySQL 8TLV - Whats new in MySQL 8
TLV - Whats new in MySQL 8
 
MySQL @ the University Of Nottingham
MySQL @ the University Of NottinghamMySQL @ the University Of Nottingham
MySQL @ the University Of Nottingham
 
MySQL NoSQL Document Store
MySQL NoSQL Document StoreMySQL NoSQL Document Store
MySQL NoSQL Document Store
 
MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018MySQL 8.0, what's new ? - Forum PHP 2018
MySQL 8.0, what's new ? - Forum PHP 2018
 
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud ServiceMySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
MySQL Day Paris 2016 - Introducing Oracle MySQL Cloud Service
 
MySQL Clusters
MySQL ClustersMySQL Clusters
MySQL Clusters
 
MySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise EditionMySQL Day Paris 2016 - MySQL Enterprise Edition
MySQL Day Paris 2016 - MySQL Enterprise Edition
 
Percona Live - Dublin 01 my sql ha-mysql-clusters
Percona Live - Dublin 01 my sql ha-mysql-clustersPercona Live - Dublin 01 my sql ha-mysql-clusters
Percona Live - Dublin 01 my sql ha-mysql-clusters
 
MySQL Cluster Whats New
MySQL Cluster Whats NewMySQL Cluster Whats New
MySQL Cluster Whats New
 
MySQL Group Replication
MySQL Group ReplicationMySQL Group Replication
MySQL Group Replication
 
Oow MySQL Whats new in security overview sept 2017 v1
Oow MySQL Whats new in security overview sept 2017 v1Oow MySQL Whats new in security overview sept 2017 v1
Oow MySQL Whats new in security overview sept 2017 v1
 
MySQL Enterprise Cloud
MySQL Enterprise Cloud MySQL Enterprise Cloud
MySQL Enterprise Cloud
 
MySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document StoreMySQL Day Paris 2016 - MySQL as a Document Store
MySQL Day Paris 2016 - MySQL as a Document Store
 
MySQL for Oracle DBAs
MySQL for Oracle DBAsMySQL for Oracle DBAs
MySQL for Oracle DBAs
 
Oracle Cloud Hybrid Storage Tiering
Oracle Cloud Hybrid Storage TieringOracle Cloud Hybrid Storage Tiering
Oracle Cloud Hybrid Storage Tiering
 
Percona Live - Dublin 02 security + tuning
Percona Live - Dublin 02 security + tuningPercona Live - Dublin 02 security + tuning
Percona Live - Dublin 02 security + tuning
 
MySQL Cloud Service
MySQL Cloud ServiceMySQL Cloud Service
MySQL Cloud Service
 
MySQL Document Store
MySQL Document StoreMySQL Document Store
MySQL Document Store
 
MySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime TimeMySQL 8: Ready for Prime Time
MySQL 8: Ready for Prime Time
 
MySQL Community and Commercial Edition
MySQL Community and Commercial EditionMySQL Community and Commercial Edition
MySQL Community and Commercial Edition
 

Ähnlich wie Oracle Code Event - MySQL JSON Document Store

2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
Geir Høydalsvik
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
Olivier DASINI
 

Ähnlich wie Oracle Code Event - MySQL JSON Document Store (20)

MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)MySQL Document Store (Oracle Code Warsaw 2018)
MySQL Document Store (Oracle Code Warsaw 2018)
 
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
MySQL Day Paris 2018 - What’s New in MySQL 8.0 ?
 
Node.js and the MySQL Document Store
Node.js and the MySQL Document StoreNode.js and the MySQL Document Store
Node.js and the MySQL Document Store
 
MySQL Document Store and Node.JS
MySQL Document Store and Node.JSMySQL Document Store and Node.JS
MySQL Document Store and Node.JS
 
MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...MySQL Document Store - A Document Store with all the benefts of a Transactona...
MySQL Document Store - A Document Store with all the benefts of a Transactona...
 
MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?MySQL 8.0 - What's New ?
MySQL 8.0 - What's New ?
 
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
DataOps barcelona - MySQL 8.0 document store: NoSQL with all the benefits of ...
 
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
2018: State of the Dolphin, MySQL Keynote at Percona Live Europe 2018, Frankf...
 
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
MySQL User Group NL: MySQL 8.0 Document Store- NoSQL with all the benefits of...
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQL
 
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
Oracle Open World 2018 /  Code One : MySQL 8.0 Document StoreOracle Open World 2018 /  Code One : MySQL 8.0 Document Store
Oracle Open World 2018 / Code One : MySQL 8.0 Document Store
 
MySQL as a Document Store
MySQL as a Document StoreMySQL as a Document Store
MySQL as a Document Store
 
MySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQLMySQL Shell: The DevOps Tool for MySQL
MySQL Shell: The DevOps Tool for MySQL
 
Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
 
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document StoreConnector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
Connector/J Beyond JDBC: the X DevAPI for Java and MySQL as a Document Store
 
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
MySQL Shell: the daily tool for devs and admins. By Vittorio Cioe.
 
Oracle NoSQL
Oracle NoSQLOracle NoSQL
Oracle NoSQL
 
MySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document StoreMySQL Day Paris 2018 - MySQL JSON Document Store
MySQL Day Paris 2018 - MySQL JSON Document Store
 
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
MySQL 20 años: pasado, presente y futuro; conoce las nuevas características d...
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 

Mehr von Mark Swarbrick (12)

TLV - MySQL Security overview
TLV - MySQL Security overviewTLV - MySQL Security overview
TLV - MySQL Security overview
 
MySQL At University Of Nottingham - 2018 MySQL Days
MySQL At University Of Nottingham - 2018 MySQL DaysMySQL At University Of Nottingham - 2018 MySQL Days
MySQL At University Of Nottingham - 2018 MySQL Days
 
MySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL DaysMySQL At Mastercard - 2018 MySQL Days
MySQL At Mastercard - 2018 MySQL Days
 
MySQL Security + GDPR - 2018 MySQL Days
MySQL Security + GDPR - 2018 MySQL DaysMySQL Security + GDPR - 2018 MySQL Days
MySQL Security + GDPR - 2018 MySQL Days
 
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
MySQL InnoDB + NDB Cluster - 2018 MySQL DaysMySQL InnoDB + NDB Cluster - 2018 MySQL Days
MySQL InnoDB + NDB Cluster - 2018 MySQL Days
 
MySQL Cloud - 2018 MySQL Days
MySQL Cloud - 2018 MySQL DaysMySQL Cloud - 2018 MySQL Days
MySQL Cloud - 2018 MySQL Days
 
MySQL 2018 Intro - 2018 MySQL Days
MySQL 2018 Intro - 2018 MySQL DaysMySQL 2018 Intro - 2018 MySQL Days
MySQL 2018 Intro - 2018 MySQL Days
 
MySQL + GDPR
MySQL + GDPRMySQL + GDPR
MySQL + GDPR
 
Percona Live - Dublin 03 ee + cloud
Percona Live - Dublin 03 ee + cloudPercona Live - Dublin 03 ee + cloud
Percona Live - Dublin 03 ee + cloud
 
MySQL Enterprise Cloud
MySQL Enterprise CloudMySQL Enterprise Cloud
MySQL Enterprise Cloud
 
MySQL Enterprise Monitor 3
MySQL Enterprise Monitor 3MySQL Enterprise Monitor 3
MySQL Enterprise Monitor 3
 
Why MySQL High Availability Matters
Why MySQL High Availability MattersWhy MySQL High Availability Matters
Why MySQL High Availability Matters
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Oracle Code Event - MySQL JSON Document Store

  • 2. Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purpose 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 up in making purchasing decisions. The development, release and timing of any features or functionality described for Oracle´s product remains at the sole discretion of Oracle. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 3. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. Agenda •  Relational vs NoSQL databases •  MySQL Document Store: the solution •  Takeaways •  Demo
  • 4. RDBMS & MySQL Relational vs NoSQL databases Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 5. Relational Databases Data Integrity normalization constraints (foreign keys, ...) Atomicity, Consistency, Isolation, Durability ACID compliant transactions SQL powerfull query language Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 6. Schemaless no schema design, no normalization, no foreign keys, no data types, ... very quick initial development Flexible data structure embedded arrays or objects valid solution when natural data can´t be modeled optimally into a relational model objects persistence without the use of any ORM - mapping object-oriented JSON close to frontend native in JS easy to learn NoSQL or Document Store Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 7. How DBAs see data How Developers see data { "GNP" : 249704, "Name" : "Belgium", "government" : { "GovernmentForm" : "Constitutional Monarchy, Federation", "HeadOfState" : "Philippe I" }, "_id" : "BEL", "IndepYear" : 1830, "demographics" : { "Population" : 10239000, "LifeExpectancy" : 77.8000030517578 }, "geography" : { "Region" : "Western Europe", "SurfaceArea" : 30518, "Continent" : "Europe" } } Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 8. DMBS or NoSQL ? Why not both ? Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 9. The MySQL Document Store ! SQL is now optional ! Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 10. A solution for all 34 / 112 Developers: [✔] Schemaless or/and Schema [✔] Rapid Prototyping/Simpler APIs [✔] Document Model [✔] Transactions Operations: [✔] Performance Management/Visibility [✔] Robust Replication, Backup, Restore [✔] Comprehensive Tooling Ecosystem [✔] Simpler application schema upgrades Business Owner: [✔] Don’t lose my data = ACID transactions [✔] Capture all my data = Extensible/Schemaless [✔] Products On Schedule/Time to Market = Rapid Development Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 11. MySQL Document Store the Solution 35 / 112 Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 12. 35 / 112 MySQL Document Store Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 13. X DevAPI Connectors for C++, Java, .Net, Node.js, Python, PHP working with Communities New MySQL Shell Command Completion Python, JavaScript & SQL modes Admin functions New Util object A new high-level session concept that can scale from single MySQL Server to a multiple server environment Non-blocking, asynchronous calls follow common language pat erns Supports CRUD operations 37 / 112 Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 14. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. MySQL Documents and Collections •  Collections are containers for documents – These documents share a purpose – Possibly share one or more indexes – Each collection has a unique name – Exists within a single schema •  Within a Collection you can – Add(), Find(), Modify(), and Remove() - JSON documents •  Collections can be – Create(), List(), Drop()
  • 15. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. Operation Document Relational Create Collection.add() Table.insert() Read Collection.find() Table.select() Update Collection.modify() Table.update() Delete Collection.remove() Table.delete() •  Use SQL, CRUD APIs – Document (NoSQL) and Relational (SQL), or “All of the Above” –  All of this is in addition to the Classic APIs MySQL X DevAPI included in Shell and Connectors
  • 16. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. It relies on the proven MySQL InnoDB’s strength & robustness: •  innodb_flush_log_at_trx_commit = 1 •  innodb_doublewrite = ON •  sync_binlog = 1 •  transaction_isolation = REPEATABLE-READ | READ-COMMITTED | ... We do care about your data! MySQL Document Store is Full ACID ACID transactions = Don’t lose my data
  • 17. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. MySQL Shell 8.0.11+ MySQL Server 5.7 MySQL 8.0 Upgrade Checker Prompt Themes Auto Completion & Command History MySQL Server 8.0 Document Store X DevAPI InnoDB Cluster SQL CLI Output Formats (Table, JSON, Tabbed) Batch Execution JavaScript Python SQL
  • 18. MySQL Document Store: Architecture Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 19. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. MySQL X devAPI connector for: •  Java -  https://insidemysql.com/connector-j-8-0-11-the-face-for-your-brand-new-document-oriented-database/ •  .NET -  https://insidemysql.com/introducing-connector-net-with-full-support-for-mysql-8-0/ •  Node.JS -  https://insidemysql.com/introducing-connector-node-js-for-mysql-8-0/ •  C++ -  https://insidemysql.com/what-is-new-in-connector-c-8-0/ •  Python -  https://insidemysql.com/using-mysql-connector-python-8-0-with-mysql-8-0/ •  PHP -  https://insidemysql.com/introducing-the-mysql-x-devapi-php-extension-for-mysql-8-0/ •  ODBC -  https://insidemysql.com/what-is-new-in-connector-odbc-8-0/ https://insidemysql.com/mysql-8-0-welcome-to-the-devapi/ Write application using X DevAPI
  • 20. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. what do I gain ? Takeaways
  • 21. This is the best of the two worlds in one product ! Data integrity ACID Compliant Transactions SQL schemaless flexible data structure easy to start (CRUD) Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 22. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. Resources Topic Link(s) MySQL as a Document Store https://dev.mysql.com/doc/refman/8.0/en/document-store.html MySQL Shell User Guide https://dev.mysql.com/doc/mysql-shell-excerpt/8.0/en/index.html MySQL Shell Documentation https://dev.mysql.com/doc/dev/mysqlsh-api-javascript/8.0/ https://dev.mysql.com/doc/dev/mysqlsh-api-python/8.0/ X Dev API User Guide https://dev.mysql.com/doc/x-devapi-userguide/en/ X Plugin https://dev.mysql.com/doc/refman/8.0/en/x-plugin.html MySQL Engineering Blog https://insidemysql.com/mysql-8-0-welcome-to-the-devapi/ https://insidemysql.com/mysql-document-store-crud-quick-start/ MySQL JSON Data Type https://dev.mysql.com/doc/refman/8.0/en/json.html Blogs http://dasini.net/blog/2015/11/17/30-mins-avec-json-en-mysql/ http://dasini.net/blog/2015/11/30/json-et-colonnes-generees-avec-mysql http://mysqlserverteam.com/tag/json/ http://mysqlserverteam.com/category/docstore/ 22
  • 23. Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 24. MySQL Document Store Demo Copyright @ 2018 Oracle and/or its affiliates. All rights reserved.
  • 25. js> session.createSchema('name') js> use doc js> db.getCollections() js> db.createCollection(‘myCollection') js> db.getCollections() js> db.myCollection.add({“param1":“value1", “param2":“value2”}) js> db.myCollection.find() js> db.myCollection.find().limit(1) js> db.myCollection.find("_id = '00005af018430000000000000002'") js> db.myCollection.modify("_id = '1234'").set(“param",“value") js> db.myCollection.remove("_id = '1234'") js> session.startTransaction() js> … js> session.rollback() Copyright @ 2018 Oracle and/or its affiliates. All rights reserved. MySQL Document Store demo “cheat sheet” Create Read Update Delete Sessions