Mysql Server 8.0: the Oracle Mysql Team Writes the Code

Mysql Server 8.0: the Oracle Mysql Team Writes the Code

MySQL 8.0 Driving Innovation with MySQL and Docker Kathy Forte MySQL Curriculum Developer Microservices World 2019 (With Insights from MySQL Development and Product Management Teams) CopyrightCopyright © © 2019 2019, Oracle, Oracle and/or and/or its its affiliates. affiliates. All All rights rights reserved. reserved. | Safe Harbor Statement 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. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 2 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 3 Many Feature Requests in 8.0 Came From You Feature Request Feature Request from DBAs from Developers Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | MySQL Server 8.0: The Oracle MySQL Team Writes the Code Drawing from https://www.dreamstime.com/royalty-free- stock-image-source-code-puzzle-shows-software-program- programming-showing-image34210956 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | MySQL 8.0 - Enables Modern Web Applications Developer First Data Driven Hybrid data model and data Optimizing services with real access APIs for flexibility for time data analysis developers Scalable & Secure Mobile Friendly Improved query/index x maintenance tools, security Ready for location based 24 7 tools, and performance services. Handling Emoji improvements and Unicode characters at Scale Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 6 Quote from External, Independent Source “Let me therefore boldly claim: MySQL 8.0 is one small step for a database, one giant leap for SQL” - Markus Winand, Modern SQL https://modern-sql.com/blog/2019-04/mysql-8.0 https://twitter.com/MarkusWinand Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | MySQL Server 8.0: Agenda 1 Top Five 8.0 Features for Developers Drawing from https://www.dreamstime.com/royalty- free-stock-image-source-code-puzzle- 2 shows-software-program-programming- Top Five 8.0 Features for DBAs showing-image34210956 3 Containers and MySQL Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | MySQL – Next Version – 8.0: Top Features for Developers 1) MySQL Document Store 2) Window Functions or Analytical Functions 3) Common Table Expressions / (CTEs) 4) InnoDB NO WAIT & SKIP LOCKED 5) utf8mb4 Character Set Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 MySQL 8.0 – Hybrid Model Developer First Hybrid data model and data access APIs for flexibility for developers MySQL Document Store – NoSQL within MySQL product Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 https://www.youtube.com/watch?v=E8zwnXjIjPM Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 1. MySQL Document Store Business Benefit: Both worlds in one database product: Saves time - don’t have to learn yet another database product Reduces complexity of dealing with multiple vendors Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 Relational vs. Document Store (Non-Relational) https://www.upwork.com/hiring/data/sql-vs-nosql-databases-whats-the-difference/ Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 13 MySQL as a Document Store • All the existing features of MySQL – Replication – ACID transaction http://datastoragecharlotte.com/services/document-storage/ – Documents have data integrity – All of our tools – Collection joins; analytics on collections • With the addition of schemaless – Documents using JSON – Easy to program CRUD APIs Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 14 CRUD Operations NoSQL/Document Javascript Java NodeJS C# Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Document Store . How to use Document Store within MySQL: https://dev.mysql.com/doc/refman/8.0/en/document-store.html • How to combine SQL and NoSQL (video): https://www.youtube.com/watch?v=yQvdJ2mVHjg&index=2&list=PLWx5 a9Tn2EvGe-LGUpXYkv8-5LyKGh_DF • Blogs - MySQL Document Store: https://mysqlserverteam.com/category/docstore/ Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 17 MySQL 8.0 - Data-Driven Models for Developers Data Driven Optimizing services with real time data analysis and locking control More Top Features for SQL Developers / Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 MySQL 8.0 – Data-Driven Models Business Benefit: Real-time data analysis and more: Less complex programming with Window Functions, Common Table Expressions (CTEs), ‘NO WAIT’ & ‘SKIP LOCKED’ Saves time - don’t have to switch to analytics database Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 12 2. MySQL Window Functions Improving Support for Analytics Feature Request from Developers https://www.google.com/search?biw=1646&bih=907&tbm=isch&sa=1&q=window++cat&oq=window+ +cat&gs_l=psy-ab.3..0l6j0i67k1j0l3.20057.20669.0.21178.4.4.0.0.0.0.217.601.0j3j1.4.0....0...1.1.64.psy- ab..0.2.211...0i7i30k1j0i8i7i30k1.0.lMDZgoQOoG0#imgrc=w_TkHuUSM07wtM: Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 20 Window Functions Improving Support for Analytics https://www.google.com/search?biw=1646&bih=907&tbm=isch&sa=1 &q=window++cat&oq=window++cat&gs_l=psy- ab.3..0l6j0i67k1j0l3.20057.20669.0.21178.4.4.0.0.0.0.217.601.0j3j1.4.0.. ..0...1.1.64.psy- ab..0.2.211...0i7i30k1j0i8i7i30k1.0.lMDZgoQOoG0#imgrc=w_TkHuUSM 07wtM: Window functions gather results into a set of rows, returning a single aggregated value for each of the rows in the result set Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 21 Window Functions Justin Turner Dodgers 348 Charlie Blackman Rockies 333 Consider: SELECT * Daniel Murphy Nationals 332 FROM player; Bryce Harper Nationals 327 Paul Goldschmidt Diamondbacks 322 Buster Posey Giants 321 The top ten batters in the DJ LeMahieu Rockies 316 National League - 2017 Nolan Arenado Rockies 315 Joey Votto Reds 315 Ryan Zimmerman Nationals 310 21 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Window Functions Here’s an aggregate function: give me the top batting average from each team of top ten batters for each NL team: SELECT team, MAX(baverage) FROM player GROUP BY team; Diamondbacks 322 Nationals 332 Dodgers 348 Giants 321 Reds 315 Rockies 333 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 23 Window Functions Team Name baverage MAX (baverage) SELECT team, name, baverage, Diamondbacks Paul Goldschmidt 322 322 MAX(baverage) OVER (PARTITION BY team) Dodgers Justin Turner 348 348 FROM player; Giants Buster Posey 321 321 Nationals Ryan Zimmerman 310 332 Nationals Daniel Murphy 332 332 Nationals Bryce Harper 327 332 Reds Joey Votto 315 315 Rockies Charlie Blackmon 333 333 Rockies DJ LeMahieu 316 24 333 Rockies Nolan Arenado 315 333 24 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Window Functions Diamondbacks Paul Goldschmidt 322 1 Dodgers Justin Turner 348 1 Giants Buster Posey 321 1 SELECT team, name, baverage, RANK() OVER (PARTITION BY team Nationals Daniel Murphy 332 1 ORDER BY baverage DESC) FROM player Nationals Bryce Harper 327 2 ORDER BY team, baverage DESC; Nationals Ryan Zimmerman 310 3 Reds Joey Votto 315 1 Rockies Charlie Blackmon 33325 1 Rockies DJ LeMahieu 316 2 Rockies Nolan Arenado 315 3 25 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | More on Window Functions http://mysqlserverteam.com/mysql-8-0-2-introducing-window-functions/ https://dev.mysql.com/doc/refman/8.0/en/window-functions.html Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 3. MySQL Common Table Expressions (CTEs) Feature Request from Developers https://forums.anandtech.com/threads/could-you-live-a-recursive-life.2393849/ Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 27 Common Table Expressions (CTEs) • “With queries” – Statement scoped views – Valid only in the query they are being used – Benefit: Simplifies writing complex SQL: https://forums.anandtech.com/threads/could- you-live-a-recursive-life.2393849/ WITH t1 AS (SELECT * FROM tblA WHERE a=‘b’) SELECT * FROM t1; Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 28 Recursive CTE WITH RECURSIVE qn AS ( SELECT 1 AS a UNION ALL SELECT 1+a FROM qn WHERE a<10 ) a SELECT * FROM qn; 1 https://forums.anandtech.com/threads/could-you-live-a- 2 recursive-life.2393849/ 3 4 5 6 7 8 9 10 Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 29 Family Tree Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | Recursive CTE Benefit: Iteration Consider: A table with one parent, one child, family tree parent child Charles Jeffrey Jeffrey Kathy Kathy Samuel Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 31 Recursive CTE Benefit: Iteration How many levels in this family descendants tree? parent descendant level WITH RECURSIVE descendants AS Charles Jeffrey 1 ( SELECT parent, child AS descendant, 1 as level Charles Kathy 2 FROM family UNION ALL Charles Samuel 3 SELECT d.parent, f.child, d.level + 1 ….. FROM descendants as d JOIN family f ON d.descendant

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    83 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us