This presentation from the January 2019 Benelux PHP conference and covers use of the MySQL Document Store via the X DevAPI so that MySQL can used as a NoSQL JSON Document store as wells as a relational database, providing the best of both works
The MySQLi Extension (MySQL Improved) is a relational database driver used in the PHP programming language to provide an interface with MySQL databases. There are three main API options when considering connecting to a MySQL database server: PHP's MySQL Extension. PHP's MySQLi Extension. PHP Data Objects (PDO)
If you use scripting languages to power web, mobile, and/or enterprise applications, this session will show you how to use Oracle Database efficiently. It demonstrates how PHP can take full advantage of new performance, scalability, availability, and security features in Oracle Database 12c and Oracle Linux. Many of these features are available to other C-based scripting languages too, like Ruby, Python and Perl. DBA's will also benefit by seeing how applications can be monitored.
Open Source 1010 and Quest InSync presentations March 30th, 2021 on MySQL Ind...Dave Stokes
Speeding up queries on a MySQL server with indexes and histograms is not a mysterious art but simple engineering. This presentation is an indepth introduction that was presented on March 30th to the Quest Insynch and Open Source 101 conferences
Seminar Sehari
PHP Indonesia
Saturday, 5th May 2012
Pelajari lebih lanjut tentang PHP+Oracle di http://pojokprogrammer.net
Related Content:
http://pojokprogrammer.net/search/node/oracle
Discover the Power of the NoSQL + SQL with MySQLDave Stokes
Slides from the May th 2020 Webinar on the MySQL Document Store -- please see video examples at https://github.com/davidmstokes/tutorials
PNWPHP -- What are Databases so &#%-ing DifficultDave Stokes
This document discusses why databases can be difficult. It begins by noting that databases are selfish, want entire systems to themselves, are messy and suck up resources. It then compares databases to toddlers. It identifies problems like most PHP developers lacking SQL training. It provides quizzes and discusses concepts like joins, indexes, foreign keys, transactions and query plans. It offers programming advice like checking return codes and scrubbing data. Finally, it recommends books and invites questions.
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptDave Stokes
The MySQL Shell has a JavaScript mode where you can use JS libraries to access you data and you can also write (and save) your own custom reports (or programs) for future use.
MySQL has a set of utilities written in Python that can do some amazing things for your MySQL instances from setting up replication with automatic fail over to copying database
The document discusses using JSON documents within a relational database. It provides examples of storing JSON documents in MySQL collections and querying them using both document and SQL syntax. Key points include:
- JSON documents can be stored in MySQL collections, providing a flexible document data model while retaining MySQL's reliability and ACID transactions.
- Documents can be queried using either document queries or by converting the JSON to relational form using JSON_TABLE, allowing the use of SQL.
- Examples are shown in several languages for CRUD operations on collections as well as indexing, validation, and more advanced queries like aggregating data from arrays.
- Storing JSON documents natively in MySQL allows leveraging both document and rel
MySQL is a SQL database that also does NoSQL. You can access data in the InnoDB or NDB storage engines as a key/value pair at amazing speeds while retaining simultaneous SQL access of the same data. Plus MySQL 5.7 features a new native JSON data type
common_schema 2.0: DBA's Framework for MySQLShlomi Noach
This document describes common_schema, an open source framework for MySQL that includes views, routines, QueryScript, and a debugger. The views provide aggregated metadata and recommendations. Routines extend MySQL's functionality with text/security functions. QueryScript allows SQL scripting. The debugger helps debug stored routines. Common_schema is installed via an SQL file and resides completely within MySQL.
MySQL JSON functions which I presented at MySQL Connect 2013. For updates about JSON functions visit https://blogs.oracle.com/svetasmirnova/tags/json
The document advertises Oracle database books and resources from O'Reilly including titles on Oracle performance optimization, SQL and PL/SQL programming, application servers, and DBA guides. It also provides links to the O'Reilly online book catalog and developer portal for Oracle and other emerging technologies, where readers can find book samples, code examples, and information on new platforms.
MySQL 8.0 introduces new features like resource groups to dedicate server resources to different query classes. It has a faster backup process using MySQL Shell utilities and compression of replication logs. The presentation provides an overview of InnoDB Cluster which allows multi-primary replication topologies and automated failover using Group Replication. It demonstrates how to easily set up a basic 3 node InnoDB Cluster on the local machine for testing using the MySQL Shell. MySQL Router can then be used to route application connections to the cluster for load balancing and high availability without application changes.
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)dpc
This document provides an overview of a presentation on MySQL stored routines given in Amsterdam on June 16, 2007. The presentation covered:
1) A quick introduction to MySQL software products and professional services
2) An overview of MySQL stored routines, their language, and techniques for using them in PHP
3) Examples of stored routines, variables, and parameters
MySQL 8.0 New Features -- September 27th presentation for Open Source SummitDave Stokes
MySQL 8.0 has many new features that you probably need to know about but don't. Like default security, window functions, CTEs, CATS (not what you think), JSON_TABLE(), and UTF8MB4 support.
The document describes how to undelete rows from MySQL binary logs without doing a full point-in-time recovery. It shows deleting a row from a table, finding the delete event in the binary log, decoding the event, rebuilding it as a write event, and replaying it to undo the delete. This allows quickly undeleting rows by manipulating the binary log directly rather than doing a slow full restore.
Redis is a NoSQL technology that rides a fine line between database and in-memory cache. Redis also offers "remote data structures", which gives it a significant advantage over other in-memory databases. This session will cover several PHP clients for Redis, and how to use them for caching, data modeling and generally improving application throughput.
Create a Database Application Development Environment with DockerBlaine Carter
In this session, Blaine Carter will explain how to use Docker to create Docker Containers which can be used to develop Database Applications with Node.js and Oracle REST Data Services (ORDS). He will demonstrate how to use Docker to create one container running an Oracle XE Database, a second running REST ORDS, and a third running Node.js on Linux running code from files in a directory on the host machine. All three containers will communicate through a Docker Network. Once the containers are up and running, Blaine will run through a couple of examples using the new Docker Containers.
Real World Experience With Oracle Xml Database 11g An Oracle Ace’s Perspectiv...Marco Gralike
The document discusses the speaker's experience with Oracle XML Database 11g and provides an overview of key topics. It covers that XML is not relational, how to set up and configure the XML database, XML handling and storage options, the protocol server, using the repository, and data handling functions. The speaker aims to discuss encountered issues and provide tips based on their experience with the XML database.
MySQL Without the SQL -- Oh My! Longhorn PHP ConferenceDave Stokes
You can now use MySQL without needing to know Structured Query Language (SQL) with the MySQL Document Store. Access JSON documents and/or relational tables using the new X DevAPI
Python And The MySQL X DevAPI - PyCaribbean 2019Dave Stokes
The document discusses the MySQL X DevAPI and how it allows developers to work with MySQL as a document store using a modern programming style. Some key points:
- X DevAPI wraps powerful concepts in a simple API, allowing applications to establish logical sessions to MySQL server instances running the X Plugin without code changes for single or clustered deployments.
- Documents are stored in Collections and CRUD (create, read, update, delete) operations can be performed on them directly rather than embedding SQL strings.
- An example Python program uses the MySQL Connector/Python library to connect to a MySQL server, retrieve a document from a collection using a filter, and print the result.
- The emphasis is on working
Develop PHP Applications with MySQL X DevAPIDave Stokes
The X DevAPI provides a way to use MySQL as a NoSQL JSON Document Store and this presentation covers how to use it with the X DevAPI PHP PECL extension. And it also works with traditional relational tables. Presented at Oracle CodeOne 24 October 2018
JavaScript and Friends August 20th, 20201 -- MySQL Shell and JavaScriptDave Stokes
The MySQL Shell has a JavaScript mode where you can use JS libraries to access you data and you can also write (and save) your own custom reports (or programs) for future use.
MySQL has a set of utilities written in Python that can do some amazing things for your MySQL instances from setting up replication with automatic fail over to copying database
The document discusses using JSON documents within a relational database. It provides examples of storing JSON documents in MySQL collections and querying them using both document and SQL syntax. Key points include:
- JSON documents can be stored in MySQL collections, providing a flexible document data model while retaining MySQL's reliability and ACID transactions.
- Documents can be queried using either document queries or by converting the JSON to relational form using JSON_TABLE, allowing the use of SQL.
- Examples are shown in several languages for CRUD operations on collections as well as indexing, validation, and more advanced queries like aggregating data from arrays.
- Storing JSON documents natively in MySQL allows leveraging both document and rel
MySQL is a SQL database that also does NoSQL. You can access data in the InnoDB or NDB storage engines as a key/value pair at amazing speeds while retaining simultaneous SQL access of the same data. Plus MySQL 5.7 features a new native JSON data type
common_schema 2.0: DBA's Framework for MySQLShlomi Noach
This document describes common_schema, an open source framework for MySQL that includes views, routines, QueryScript, and a debugger. The views provide aggregated metadata and recommendations. Routines extend MySQL's functionality with text/security functions. QueryScript allows SQL scripting. The debugger helps debug stored routines. Common_schema is installed via an SQL file and resides completely within MySQL.
MySQL JSON functions which I presented at MySQL Connect 2013. For updates about JSON functions visit https://blogs.oracle.com/svetasmirnova/tags/json
The document advertises Oracle database books and resources from O'Reilly including titles on Oracle performance optimization, SQL and PL/SQL programming, application servers, and DBA guides. It also provides links to the O'Reilly online book catalog and developer portal for Oracle and other emerging technologies, where readers can find book samples, code examples, and information on new platforms.
MySQL 8.0 introduces new features like resource groups to dedicate server resources to different query classes. It has a faster backup process using MySQL Shell utilities and compression of replication logs. The presentation provides an overview of InnoDB Cluster which allows multi-primary replication topologies and automated failover using Group Replication. It demonstrates how to easily set up a basic 3 node InnoDB Cluster on the local machine for testing using the MySQL Shell. MySQL Router can then be used to route application connections to the cluster for load balancing and high availability without application changes.
DPC2007 MySQL Stored Routines for PHP Developers (Roland Bouman)dpc
This document provides an overview of a presentation on MySQL stored routines given in Amsterdam on June 16, 2007. The presentation covered:
1) A quick introduction to MySQL software products and professional services
2) An overview of MySQL stored routines, their language, and techniques for using them in PHP
3) Examples of stored routines, variables, and parameters
MySQL 8.0 New Features -- September 27th presentation for Open Source SummitDave Stokes
MySQL 8.0 has many new features that you probably need to know about but don't. Like default security, window functions, CTEs, CATS (not what you think), JSON_TABLE(), and UTF8MB4 support.
The document describes how to undelete rows from MySQL binary logs without doing a full point-in-time recovery. It shows deleting a row from a table, finding the delete event in the binary log, decoding the event, rebuilding it as a write event, and replaying it to undo the delete. This allows quickly undeleting rows by manipulating the binary log directly rather than doing a slow full restore.
Redis is a NoSQL technology that rides a fine line between database and in-memory cache. Redis also offers "remote data structures", which gives it a significant advantage over other in-memory databases. This session will cover several PHP clients for Redis, and how to use them for caching, data modeling and generally improving application throughput.
Create a Database Application Development Environment with DockerBlaine Carter
In this session, Blaine Carter will explain how to use Docker to create Docker Containers which can be used to develop Database Applications with Node.js and Oracle REST Data Services (ORDS). He will demonstrate how to use Docker to create one container running an Oracle XE Database, a second running REST ORDS, and a third running Node.js on Linux running code from files in a directory on the host machine. All three containers will communicate through a Docker Network. Once the containers are up and running, Blaine will run through a couple of examples using the new Docker Containers.
Real World Experience With Oracle Xml Database 11g An Oracle Ace’s Perspectiv...Marco Gralike
The document discusses the speaker's experience with Oracle XML Database 11g and provides an overview of key topics. It covers that XML is not relational, how to set up and configure the XML database, XML handling and storage options, the protocol server, using the repository, and data handling functions. The speaker aims to discuss encountered issues and provide tips based on their experience with the XML database.
MySQL Without the SQL -- Oh My! Longhorn PHP ConferenceDave Stokes
You can now use MySQL without needing to know Structured Query Language (SQL) with the MySQL Document Store. Access JSON documents and/or relational tables using the new X DevAPI
Python And The MySQL X DevAPI - PyCaribbean 2019Dave Stokes
The document discusses the MySQL X DevAPI and how it allows developers to work with MySQL as a document store using a modern programming style. Some key points:
- X DevAPI wraps powerful concepts in a simple API, allowing applications to establish logical sessions to MySQL server instances running the X Plugin without code changes for single or clustered deployments.
- Documents are stored in Collections and CRUD (create, read, update, delete) operations can be performed on them directly rather than embedding SQL strings.
- An example Python program uses the MySQL Connector/Python library to connect to a MySQL server, retrieve a document from a collection using a filter, and print the result.
- The emphasis is on working
Develop PHP Applications with MySQL X DevAPIDave Stokes
The X DevAPI provides a way to use MySQL as a NoSQL JSON Document Store and this presentation covers how to use it with the X DevAPI PHP PECL extension. And it also works with traditional relational tables. Presented at Oracle CodeOne 24 October 2018
Polyglot Database - Linuxcon North America 2016Dave Stokes
Many Relation Databases are adding NoSQL features to their products. So what happens when you can get direct access to the data as a key/value pair, or you can store an entire document in a column of a relational table, and more
The document discusses the MySQL Document Store, which allows storing and querying JSON documents in MySQL databases. It introduces the components of the MySQL Document Store, including the MySQL server, JSON data type, X Plugin, X Protocol, X DevAPI, MySQL Shell and connectors. The X DevAPI provides a modern CRUD interface for working with document collections and documents. Documents can be accessed and queried using both the NoSQL-style X DevAPI and traditional SQL.
MySQL Connector/Node.js and the X DevAPIRui Quelhas
This document provides an overview of MySQL Connector/Node.js and the X DevAPI. It discusses how the X DevAPI provides a high-level database API for developing modern applications powered by InnoDB Cluster. It also describes the various components that make up the X DevAPI architecture, including the X Plugin, X Protocol, and Router. Additionally, it discusses how Connector/Node.js implements the X DevAPI and allows applications to interact with MySQL databases.
Discover The Power of NoSQL + MySQL with MySQLDave Stokes
The document discusses the MySQL Document Store, which provides both NoSQL and SQL capabilities on a single platform. It allows for schemaless document storage and querying using JSON documents, while also providing the reliability, security and transaction support of MySQL. Examples are given in several programming languages of basic CRUD operations on document collections using simple APIs that avoid the need for SQL. The document also shows how JSON documents can be queried using SQL/JSON functions, enabling more complex analysis that was previously only possible in a relational database. This provides the best aspects of both NoSQL and SQL on a proven database platform.
MySQL Document Store - A Document Store with all the benefts of a Transactona...Olivier DASINI
MySQL Document Store allows developers to work with SQL relational tables and schema-less JSON collections. To make that possible MySQL has created the X Dev API which puts a strong focus on CRUD by providing a fluent API allowing you to work with JSON documents in a natural way. The X Protocol is a highly extensible and is optimized for CRUD as well as SQL API operations.
MySQL Without the SQL - Oh My! August 2nd presentation at Mid Atlantic Develo...Dave Stokes
MySQL Document Store allows you to use MySQL as a JSON Document Databases without needing to set up relational tables, normalize data, or use Structured Query Language.
Advanced SQL - Database Access from Programming LanguagesS.Shayan Daneshvar
This document discusses various approaches for accessing databases from programming languages, including dynamic SQL, embedded SQL, standards like ODBC, JDBC, ADO/ADO.NET, and examples of using these standards. It covers connecting to databases, executing queries and stored procedures, handling results, and addressing issues like SQL injection. Other topics mentioned include database metadata, transactions, repository patterns, object-relational mapping tools, and database version control.
Data Con LA 2020
Description
MySQL is an ubiquitous relational database that can also be used as a NoSQL JSON document store. That means you do not need a DBA to set up tables - just connect and start saving data. And you can access the NoSQL data from the SQL side or the SQL data from the NoSQL side which gives you the best of both the SQL and NoSQL worlds on the same server.
*Learn how to use the X DevAPI protocol for CRUD based operations
*See how to use JSON_TABLE() to turn unstructured data temporarily structured
*Understand how JSON really makes your relational database faster
*How to extract JSON data into a relational column
Speaker
Dave Stokes,Oracle, MySQL Community Manager
SwanseaCon 2017 presentation on Making MySQL Agile-ish. Relational Databases are not usually considered part of the Agile Programming movement but there are many new features in MySQL to make it easier to include it. This presentation covers how MySQL is moving to help support agile development while maintaining the traditional 'non agile' stability expected from a database.
MySQL Tech Café #8: MySQL 8.0 for Python DevelopersFrederic Descamps
Usually it seems Python developers don't always think about MySQL as their first choice.... However when test test it with the right connector and MySQL 8.0 they love it !
Join this talk to learn how Python with mysql-connector-python can take advantages of MySQL 8.0.
This means using Standard MySQL Protocol but much nicer the X Protocol. During this session you will see how you can use MySQL Document Store and MySQL as RDBMS on the same session to benefits from both worlds.
Node.js and Oracle Database: New Development TechniquesChristopher Jones
These slides are from the AUSOUG webinar viewable at https://www.ausoug.org.au/event/node-js-and-oracle-database-new-development-techniques/
The session covered the best node-oracledb data access features for building great Node.js applications with Oracle Database. Spanning topics from the latest connection pooling advances, right through to efficient ways to access your data, all the best tips are demonstrated. After another busy year of node-oracledb releases, don’t miss the latest on this rapidly growing ecosystem.
This is a technical talk with code snippets demonstrating efficient use of the Node.js node-oracledb driver for Oracle DB. There have been several key releases of node-oracledb over the last year so there is plenty to talk about.
MySQL Day Paris 2018 - MySQL JSON Document StoreOlivier DASINI
NoSQL + SQL = MySQL
MySQL Document Store allows developers to work with SQL relational tables and schema-less JSON collections. To make that possible MySQL has created the X Dev API which puts a strong focus on CRUD by providing a fluent API allowing you to work with JSON documents in a natural way. The X Protocol is a highly extensible and is optimized for CRUD as well as SQL API operations.
MySQL Document store gives users maximum flexibility developing traditional SQL relational applications and NoSQL schema-free document database applications. This eliminates the need for a separate NoSQL document database. Developers can mix and match relational data and JSON documents in the same database as well as the same application. For example, both data models can be queried in the same application and results can be in table, tabular or JSON formats.
The MySQL Document Store architecture consists of the following components:
Native JSON Document Storage - MySQL provides a native JSON datatype is efficiently stored in binary with the ability to create virtual columns that can be indexed. JSON Documents are automatically validated.
X Plugin - The X Plugin enables MySQL to use the X Protocol and uses Connectors and the Shell to act as clients to the server.
X Protocol - The X Protocol is a new client protocol based on top of the Protobuf library, and works for both, CRUD and SQL operations.
X DevAPI - The X DevAPI is a new, modern, async developer API for CRUD and SQL operations on top of X Protocol. It introduces Collections as new Schema objects. Documents are stored in Collections and have their dedicated CRUD operation set.
MySQL Shell - The MySQL Shell is an interactive Javascript, Python, or SQL interface supporting development and administration for the MySQL Server. You can use the MySQL Shell to perform data queries and updates as well as various administration operations.
MySQL Connectors - The following MySQL Connectors support the X Protocol and enable you to use X DevAPI in your chosen language.
MySQL Connector/Node.js
MySQL Connector/PHP
MySQL Connector/Python
MySQL Connector/J
MySQL Connector/NET
MySQL Connector/C++
MySQL Document Store -- SCaLE 17x PresentationDave Stokes
The MySQL Document store is a way to use MySQL as a NoSQL JSON Document Store so that you do not need to make queries with SQL, avoid having to set up relational tables before using the data, or need to wait for a DBA to set up tab;es
This presentation introduces various aspects of web technology. It begins with an outline that lists HTML, CSS, JavaScript, jQuery, PHP and MySQL as the main languages used in web technology. It then provides definitions and examples of each language. For PHP, it also discusses features, processing pages, and database support. The presentation warns against some common mistakes for beginners, such as messy code, inconsistent formatting and abbreviations. It concludes that web technology is important for modern technology and requires interpretability across browsers.
The document provides an overview of the MySQL Document Store, which allows storing and querying JSON documents within MySQL tables without requiring SQL. It is built on the MySQL JSON data type and X DevAPI. Key features highlighted include the ability to work with both relational tables and document collections together using various programming languages, transactions, and casting collections as tables. The document store is available in MySQL 5.7 and 8 via a plug-in.
Database basics for new-ish developers -- All Things Open October 18th 2021Dave Stokes
Do you wonder why it takes your database to find the top five of your fifty six million customers? Do you really have a good idea of what NULL is and how to use it? And why are some database queries so quick and others frustratingly slow? Relational databases have been around for over fifty years and frustrating developers for at least forty nine of those years. This session is an attempt to explain why sometimes the database seems very fast and other times not. You will learn how to set up data (normalization) to avoid redundancies into tables by their function, how to join two tables to combine data, and why Structured Query Language is so very different than most other languages. And you will see how thinking in sets over records can greatly improve your life with a database.
Longhorn PHP - MySQL Indexes, Histograms, Locking Options, and Other Ways to ...Dave Stokes
This document discusses various ways to speed up queries in MySQL, including the proper use of indexes, histograms, and locking options. It begins with an introduction to indexes, explaining that indexes are data structures that improve the speed of data retrieval by allowing for faster lookups and access to ordered records. The document then covers different types of indexes like clustered indexes, secondary indexes, functional indexes, and multi-value indexes. It emphasizes choosing indexes carefully based on the most common queries and selecting columns that are not often updated. Overall, the document provides an overview of optimization techniques in MySQL with a focus on index usage.
Dutch PHP Conference 2021 - MySQL Indexes and HistogramsDave Stokes
This document discusses how to speed up queries in MySQL through the proper use of indexes, histograms, and other techniques. It begins by explaining that the MySQL optimizer tries to determine the most efficient way to execute queries by considering different query plans. The optimizer relies on statistics about column distributions to estimate query costs. The document then discusses using EXPLAIN to view and analyze query plans, and how indexes can improve query performance by allowing faster data retrieval through secondary indexes and other index types. Proper index selection and column data types are important to allow the optimizer to use indexes efficiently.
Validating JSON -- Percona Live 2021 presentationDave Stokes
JSON is a free form data exchange format which can cause problems when combined with a strictly typed relational database. Thanks to the folks at https://json-schema.org and the MySQL engineers at Oracle we can no specify required fields, type checks, and range checks.
Data Love Conference - Window Functions for Database AnalyticsDave Stokes
16 April 2021 presentation for the Data Love Conference on Window Functions for Data Base Analytics. Examples are on MySQL but will work for other RDMS's with window functions. Assumes no user background on window functions or analytics
Confoo.ca conference talk February 24th 2021 on MySQL new features found in version 8.0 including server and supporting utility updates for those who may have missed some really neat new features
Confoo 2021 - MySQL Indexes & HistogramsDave Stokes
Confoo 2021 presentation on MySQL Indexes, Histograms, and other ways to speed up your queries. This slide deck has slides that may not have been included in the presentation that were omitted due to time constraints
A Step by Step Introduction to the MySQL Document StoreDave Stokes
Looking for a fast, flexible NoSQL document store? And one that runs with the power and reliability of MySQL. This is an intro on how to use the MySQL Document Store
Confoo 202 - MySQL Group Replication and ReplicaSetDave Stokes
MySQL Group Replication, ReplicaSet, & Architectures outlines MySQL's general product direction for high availability and replication. It provides an overview of Group Replication, ReplicaSet, and related components like MySQL Shell and MySQL Router. Key capabilities discussed include automated setup and management, integrated load balancing, and both asynchronous and synchronous replication options. Limitations noted include the requirement for manual failover in ReplicaSet deployments.
PHP UK 2020 Tutorial: MySQL Indexes, Histograms And other ways To Speed Up Yo...Dave Stokes
Slow query? Add an index or two! But things are suddenly even slower! Indexes are great tools to speed data lookup but have overhead issues. Histograms don’t have that overhead but may not be suited. And how you lock rows also effects performance. So what do you do to speed up queries smartly?
MySQL New Features -- Sunshine PHP 2020 PresentationDave Stokes
MySQL has moved to a quarterly release cycle and it can be hard to keep up with the new features. For instance, there are now multi-valued indexes for things like JSON arrays to allow for fast searches of embedded data. And there is a bulk loaded for JSON, CSV, and TSV data that works in parallel. Or support for JSON-Schame.org's JSON schema validation. Plus you no longer need to run mysql_upgrade after an upgrade as that is all automated. In addition, you can now clone InnoDB tablespaces for fast initialization of replicate data. So if you need to catch up on the latest and greatest from MySQL you need to be in this session.
MySQL 8 - UKOUG Techfest Brighton December 2nd, 2019Dave Stokes
The document discusses several new features in MySQL 8 including:
1. A new data dictionary that stores metadata internally instead of external files, allowing for transactional ALTER TABLE commands.
2. Support for common table expressions and windowing functions.
3. Improvements to the optimizer including index and join order hints, descending indexes, and optimizer trace output providing more details.
4. Support for roles which are named collections of privileges that can be assigned to users.
5. UTF8MB4 is now the default character set providing support for emoji and supplementary characters.
6. Ability to create invisible indexes that are not used by the optimizer but are maintained for testing performance impact.
Upgrading to MySQL 8.0 webinar slides November 27th, 2019Dave Stokes
- The document discusses upgrading from MySQL 5.7 to MySQL 8.0, providing guidance on the upgrade path and process.
- It describes running checks using the new MySQL Shell utility to detect any issues in the 5.7 instance that need addressing before upgrading, such as incompatible syntax, removed features, or changed defaults.
- Advice is given on backup procedures, reading the upgrade documentation, and addressing any warnings or errors reported by the upgrade checker to ensure a smooth transition.
Windowing Functions - Little Rock Tech Fest 2019Dave Stokes
The document outlines Oracle's general product direction but notes that it is non-binding and subject to change. It also contains standard legal disclaimers regarding forward-looking statements and refers readers to Oracle's SEC filings for risks associated with its business and products.
Oracle CodeOne Foreign Keys Support in MySQL 8.0Dave Stokes
The document discusses foreign key support in MySQL 8.0. Foreign keys allow cross-referencing of related data across tables and help enforce referential integrity. Before MySQL 8.0, foreign key metadata was stored in storage engines rather than a centralized data dictionary. MySQL 8.0 has moved to storing foreign keys in a new centralized data dictionary, improving features like DDL handling, information schema queries, and metadata locking. Future plans include moving cascading actions to the SQL layer and improving syntax support.
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMaxim Salnikov
Imagine if apps could think, plan, and team up like humans. Welcome to the world of AI agents and agentic user interfaces (UI)! In this session, we'll explore how AI agents make decisions, collaborate with each other, and create more natural and powerful experiences for users.
Agentic AI Use Cases using GenAI LLM modelsManish Chopra
This document presents specific use cases for Agentic AI (Artificial Intelligence), featuring Large Language Models (LLMs), Generative AI, and snippets of Python code alongside each use case.
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Andre Hora
Exceptions allow developers to handle error cases expected to occur infrequently. Ideally, good test suites should test both normal and exceptional behaviors to catch more bugs and avoid regressions. While current research analyzes exceptions that propagate to tests, it does not explore other exceptions that do not reach the tests. In this paper, we provide an empirical study to explore how frequently exceptional behaviors are tested in real-world systems. We consider both exceptions that propagate to tests and the ones that do not reach the tests. For this purpose, we run an instrumented version of test suites, monitor their execution, and collect information about the exceptions raised at runtime. We analyze the test suites of 25 Python systems, covering 5,372 executed methods, 17.9M calls, and 1.4M raised exceptions. We find that 21.4% of the executed methods do raise exceptions at runtime. In methods that raise exceptions, on the median, 1 in 10 calls exercise exceptional behaviors. Close to 80% of the methods that raise exceptions do so infrequently, but about 20% raise exceptions more frequently. Finally, we provide implications for researchers and practitioners. We suggest developing novel tools to support exercising exceptional behaviors and refactoring expensive try/except blocks. We also call attention to the fact that exception-raising behaviors are not necessarily “abnormal” or rare.
Adobe Photoshop Lightroom CC 2025 Crack Latest Versionusmanhidray
Copy & Past Lank 👉👉
http://drfiles.net/
Adobe Photoshop Lightroom is a photo editing and organization software application primarily used by photographers. It's designed to streamline workflows, manage large photo collections, and make adjustments to images in a non-destructive way. Lightroom is available across various platforms, including desktop, mobile (iOS and Android), and web, allowing for consistent editing and organization across devices.
Adobe After Effects Crack FREE FRESH version 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe After Effects is a software application used for creating motion graphics, special effects, and video compositing. It's widely used in TV and film post-production, as well as for creating visuals for online content, presentations, and more. While it can be used to create basic animations and designs, its primary strength lies in adding visual effects and motion to videos and graphics after they have been edited.
Here's a more detailed breakdown:
Motion Graphics:
.
After Effects is powerful for creating animated titles, transitions, and other visual elements to enhance the look of videos and presentations.
Visual Effects:
.
It's used extensively in film and television for creating special effects like green screen compositing, object manipulation, and other visual enhancements.
Video Compositing:
.
After Effects allows users to combine multiple video clips, images, and graphics to create a final, cohesive visual.
Animation:
.
It uses keyframes to create smooth, animated sequences, allowing for precise control over the movement and appearance of objects.
Integration with Adobe Creative Cloud:
.
After Effects is part of the Adobe Creative Cloud, a suite of software that includes other popular applications like Photoshop and Premiere Pro.
Post-Production Tool:
.
After Effects is primarily used in the post-production phase, meaning it's used to enhance the visuals after the initial editing of footage has been completed.
Mastering Fluent Bit: Ultimate Guide to Integrating Telemetry Pipelines with ...Eric D. Schabell
It's time you stopped letting your telemetry data pressure your budgets and get in the way of solving issues with agility! No more I say! Take back control of your telemetry data as we guide you through the open source project Fluent Bit. Learn how to manage your telemetry data from source to destination using the pipeline phases covering collection, parsing, aggregation, transformation, and forwarding from any source to any destination. Buckle up for a fun ride as you learn by exploring how telemetry pipelines work, how to set up your first pipeline, and exploring several common use cases that Fluent Bit helps solve. All this backed by a self-paced, hands-on workshop that attendees can pursue at home after this session (https://o11y-workshops.gitlab.io/workshop-fluentbit).
This presentation explores code comprehension challenges in scientific programming based on a survey of 57 research scientists. It reveals that 57.9% of scientists have no formal training in writing readable code. Key findings highlight a "documentation paradox" where documentation is both the most common readability practice and the biggest challenge scientists face. The study identifies critical issues with naming conventions and code organization, noting that 100% of scientists agree readable code is essential for reproducible research. The research concludes with four key recommendations: expanding programming education for scientists, conducting targeted research on scientific code quality, developing specialized tools, and establishing clearer documentation guidelines for scientific software.
Presented at: The 33rd International Conference on Program Comprehension (ICPC '25)
Date of Conference: April 2025
Conference Location: Ottawa, Ontario, Canada
Preprint: https://arxiv.org/abs/2501.10037
Download Wondershare Filmora Crack [2025] With Latesttahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
Douwan Crack 2025 new verson+ License codeaneelaramzan63
Copy & Paste On Google >>> https://dr-up-community.info/
Douwan Preactivated Crack Douwan Crack Free Download. Douwan is a comprehensive software solution designed for data management and analysis.
PDF Reader Pro Crack Latest Version FREE Download 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
PDF Reader Pro is a software application, often referred to as an AI-powered PDF editor and converter, designed for viewing, editing, annotating, and managing PDF files. It supports various PDF functionalities like merging, splitting, converting, and protecting PDFs. Additionally, it can handle tasks such as creating fillable forms, adding digital signatures, and performing optical character recognition (OCR).
FL Studio Producer Edition Crack 2025 Full Versiontahirabibi60507
Copy & Past Link 👉👉
http://drfiles.net/
FL Studio is a Digital Audio Workstation (DAW) software used for music production. It's developed by the Belgian company Image-Line. FL Studio allows users to create and edit music using a graphical user interface with a pattern-based music sequencer.
Avast Premium Security Crack FREE Latest Version 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
Avast Premium Security is a paid subscription service that provides comprehensive online security and privacy protection for multiple devices. It includes features like antivirus, firewall, ransomware protection, and website scanning, all designed to safeguard against a wide range of online threats, according to Avast.
Key features of Avast Premium Security:
Antivirus: Protects against viruses, malware, and other malicious software, according to Avast.
Firewall: Controls network traffic and blocks unauthorized access to your devices, as noted by All About Cookies.
Ransomware protection: Helps prevent ransomware attacks, which can encrypt your files and hold them hostage.
Website scanning: Checks websites for malicious content before you visit them, according to Avast.
Email Guardian: Scans your emails for suspicious attachments and phishing attempts.
Multi-device protection: Covers up to 10 devices, including Windows, Mac, Android, and iOS, as stated by 2GO Software.
Privacy features: Helps protect your personal data and online privacy.
In essence, Avast Premium Security provides a robust suite of tools to keep your devices and online activity safe and secure, according to Avast.
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Ranjan Baisak
As software complexity grows, traditional static analysis tools struggle to detect vulnerabilities with both precision and context—often triggering high false positive rates and developer fatigue. This article explores how Graph Neural Networks (GNNs), when applied to source code representations like Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Data Flow Graphs (DFGs), can revolutionize vulnerability detection. We break down how GNNs model code semantics more effectively than flat token sequences, and how techniques like attention mechanisms, hybrid graph construction, and feedback loops significantly reduce false positives. With insights from real-world datasets and recent research, this guide shows how to build more reliable, proactive, and interpretable vulnerability detection systems using GNNs.
Copy & Past Link 👉👉
http://drfiles.net/
When you say Xforce with GTA 5, it sounds like you might be talking about Xforce Keygen — a tool that's often mentioned in connection with cracking software like Autodesk programs.
BUT, when it comes to GTA 5, Xforce isn't officially part of the game or anything Rockstar made.
If you're seeing "Xforce" related to GTA 5 downloads or cracks, it's usually some unofficial (and risky) tool for pirating the game — which can be super dangerous because:
Get & Download Wondershare Filmora Crack Latest [2025]saniaaftab72555
Copy & Past Link 👉👉
https://dr-up-community.info/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
Adobe Photoshop CC 2025 Crack Full Serial Key With Latestusmanhidray
Copy & Past Link👉👉💖
💖http://drfiles.net/
Adobe Photoshop is a widely-used, professional-grade software for digital image editing and graphic design. It allows users to create, manipulate, and edit raster images, which are pixel-based, and is known for its extensive tools and capabilities for photo retouching, compositing, and creating intricate visual effects.
Adobe Photoshop CC 2025 Crack Full Serial Key With Latestusmanhidray
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 2019 at Benelux PHP Conference
1. PHP,
The X DevAPI,
and the
MySQL Document Store
Dave Stokes
@Stoker
[email protected]
https://elephantdolphin.blogspot.com/
https://slideshare.net/davidmstokes
2. Safe Harbor Agreement
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.
2
4. Programmers Tasks
● 20 years ago
○ Editor - vi, vim, emacs
○ Compiler - 1 or two
languages
○ Debugger
○ Browser (maybe)
○ XML (maybe)
○ HTML (growing need)
○ Source Control System
○ IDE (you wish!)
○ Documentation (low priority)
4
5. Programmers Tasks
● 20 years ago
○ Editor - vi, vim, emacs
○ Compiler - 1 or two
languages
○ Debugger
○ Browser (maybe)
○ XML (maybe)
○ HTML (growing need)
○ Source Control System
○ IDE (you wish!)
○ Documentation (low priority)
● Today
○ GIT
○ Tests
○ CI
○ Small(er) stuff
■ Containers, VMs, micro
services, etc.
○ Main language &
Framework
○ 7 or 8 JavaScript
Frameworks
○ Data Store (SQL & NoSQL) 5
6. Programmers Tasks
● 20 years ago
○ Editor - vi, vim, emacs
○ Compiler - 1 or two
languages
○ Debugger
○ Browser (maybe)
○ XML (maybe)
○ HTML (growing need)
○ Source Control System
○ IDE (you wish!)
○ Documentation (low priority)
● Today
○ GIT
○ Tests
○ CI
○ Small(er) stuff
■ Containers, VMs, micro services,
etc.
○ Main language & Framework
○ 7 or 8 JavaScript Frameworks
○ Data Store (SQL & NoSQL)
○ JSON
○ SSH/TLS
○ Encryption
○ Bash & Powershell
○ Markdown
○ Cloud
6
7. Programmers Tasks
● 20 years ago
○ Editor - vi, vim, emacs
○ Compiler - 1 or two
languages
○ Debugger
○ Browser (maybe)
○ XML (maybe)
○ HTML (growing need)
○ Source Control System
○ IDE (you wish!)
○ Documentation (low priority)
● Today
○ GIT
○ Tests
○ CI
○ Small(er) stuff
■ Containers, VMs, micro services, etc.
○ Main language & Framework
○ 7 or 8 JavaScript Frameworks
○ Data Store (SQL & NoSQL)
○ JSON
○ SSH/TLS
○ Encryption
○ Bash & Powershell
○ Markdown
○ Cloud
○ Debugger
○ Multiple Browsers
○ Multiple IDEs
○ Documentation (still low priority)
○ Mentoring (giving or receiving)
○ More frameworks
○ More third party libraries
○ Embedded, Android, IOS, etc.
○ Key management
○ Slack
○ Repository tools
○ * as a Service (*aaS)
○ Whatever the latest craze is from The Register, Inforworld, Slashdot
7
8. Programmers Tasks
● 20 years ago
○ Editor - vi, vim, emacs
○ Compiler - 1 or two
languages
○ Debugger
○ Browser (maybe)
○ XML (maybe)
○ HTML (growing need)
○ Source Control System
○ IDE (you wish!)
○ Documentation (low priority)
● Today
○ GIT
○ Tests
○ CI
○ Small(er) stuff
■ Containers, VMs, micro services, etc.
○ Main language & Framework
○ 7 or 8 JavaScript Frameworks
○ Data Store (SQL & NoSQL)
○ JSON
○ SSH/TLS
○ Encryption
○ Bash & Powershell
○ Markdown
○ Cloud
○ Debugger
○ Multiple Browsers
○ Multiple IDEs
○ Documentation (still low priority)
○ Mentoring (giving or receiving)
○ More frameworks
○ More third party libraries
○ Embedded, Android, IOS, etc.
○ Key management
○ Slack
○ Repository tools
○ * as a Service (*aaS)
○ Whatever the latest craze is from The Register, Inforworld, Slashdot
○ YAML and other markup file syntax
○ The newest Google tool
○ etc
8
11. 2%
In my not so scientific study over the past eight years using informal informational
gathering techniques, roughly TWO PERCENT of developers receive any formal
training in Structured Query Language (SQL), Relational Calculus, Data
Normalization, or other database technologies.
And 100% of that 2% wonder why their queries stink! 11
13. Declarative Language Buried in a OO/Procedural
A big problem for many
developers is that they
are used to Object
Oriented and/or
Procedural programming
languages.
SQL is declarative
programming language
and embedding SQL in
PHP is an object-
relational impedance
mismatch.
// Formulate Query
// This is the best way to perform an SQL query
// For more examples, see mysql_real_escape_string()
$query = sprintf("SELECT firstname, lastname, address, age FROM
friends
WHERE firstname='%s' AND lastname='%s'",
mysql_real_escape_string($firstname),
mysql_real_escape_string($lastname));
// Perform Query
$result = mysql_query($query);
http://us1.php.net/manual/en/function.mysql-query.php
13
Note: the ‘mysql’ connector has
been deprecated and is not
supported in PHP 7 and was
replaced by ‘mysqli’ but there is still
a lot of code with ‘mysql’ around
14. Other Issues
1. UGLY
2. Hard to have help from your IDE
3. Extra level of complexity / opportunity to fail
4. Badly organized data & queries
15. And Yet More Issues
● Relational tables need to be set up
● Indexes
● Data mutability
● Need to rely on a DBA (or someone who has that role)
● Can’t start coding much of project before data format is know
● ORMs -- more complexity and another layer to maintain
15
17. So what if there was a way to ...
● Use schemaless JSON documents so you do not have to normalize data and
code before you know the complete schema
● Not have to embed SQL strings in your code
● Use a modern programming style API
● Be able to use the JSON data from SQL or NoSQL -
○ Best of both worlds
17
19. The X DevAPI wraps powerful concepts in a simple API.
A new high-level session concept enables you to write code that can transparently scale from single MySQL
Server to a multiple server environment.
→Read operations are simple and easy to understand.
→Non-blocking, asynchronous calls follow common host language patterns.
→The X DevAPI introduces a new, modern and easy-to-learn way to work with your data.
Documents are stored in Collections and have their dedicated CRUD operation set.
→Work with your existing domain objects or generate code based on structure definitions for
strictly typed languages.
→Focus is put on working with data via CRUD operations.
→Modern practices and syntax styles are used to get away from traditional SQL-String-Building.
19
20. Scale from Single Server to Cluster w/o Code Change
The code that is needed to connect to a MySQL document store looks a lot like
the traditional MySQL connection code, but now applications can establish logical
sessions to MySQL server instances running the X Plugin. Sessions are produced
by the mysqlx factory, and the returned Sessions can encapsulate access to one
or more MySQL server instances running X Plugin. Applications that use Session
objects by default can be deployed on both single server setups and database
clusters with no code changes.
20
21. var mysqlx = require('mysqlx');
// Connect to server on localhost
var mySession = mysqlx.getSession( {
host: 'localhost', port: 33060,
user: 'user', password: 'password' } );
var myDb = mySession.getSchema('test');
// Use the collection 'my_collection'
var myColl = myDb.getCollection('my_collection');
// Specify which document to find with Collection.find() and
// fetch it from the database with .execute()
var myDocs = myColl.find('name like :param').limit(1).
bind('param', 'S%').execute();
// Print document
print(myDocs.fetchOne());
mySession.close();
21
22. PECL MySQl X DevAPI
http://php.net/manual/en/book.mysql-xdevapi.php
22
23. Installation (Ubuntu 18.04 & PHP 7.2)
Note: The MySQL X DevAPI PECL extension is not bundled with PHP.
// Dependencies
$ apt install build-essential libprotobuf-dev libboost-dev openssl protobuf-
compiler
// PHP with the desired extensions; php7.2-dev is required to compile
$ apt install php7.2-cli php7.2-dev php7.2-mysql php7.2-pdo php7.2-xml
// Compile the extension
$ pecl install mysql_xdevapi
// Use the 'phpenmod' command
$ phpenmod -v 7.2 -s ALL mysql_xdevapi 23
24. A JAON document is a data structure composed of
key-value pairs and is the fundamental structure for using
MySQL as document store.
This document shows that the values of keys can be
simple data types, such as integers or strings, but can also
contain other documents, arrays, and lists of documents.
For example, the geography key's value consists of
multiple key-value pairs. A JSON document is represented
internally using the MySQL binary JSON object, through
the JSON MySQL datatype.
The most important differences between a document and
the tables known from traditional relational databases are
that the structure of a document does not have to be
defined in advance, and a collection can contain multiple
documents with different structures. Relational tables on
the other hand require that their structure be defined, and
all rows in the table must contain the same columns.
{
"GNP": .6,
"IndepYear": 1967,
"Name": "Sealand",
"_id": "SEA",
"demographics": {
"LifeExpectancy": 79,
"Population": 27
},
"geography": {
"Continent": "Europe",
"Region": "British Islands",
"SurfaceArea": 193
},
"government": {
"GovernmentForm": "Monarchy",
"HeadOfState": "Michael Bates"
}
}
24
25. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$marco = [
"name" => "Marco",
"age" => 19,
"job" => "Programmer"
];
$mike = [
"name" => "Mike",
"age" => 39,
"job" => "Manager"
];
$schema = $session->getSchema("testxx");
$collection = $schema->createCollection("example1");
$collection = $schema->getCollection("example1");
$collection->add($marco, $mike)->execute();
var_dump($collection->find("name = 'Mike'")->execute()->fetchOne()); 25
An Example
26. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$marco = [
"name" => "Marco",
"age" => 19,
"job" => "Programmer"
];
$mike = [
"name" => "Mike",
"age" => 39,
"job" => "Manager"
];
$schema = $session->getSchema("testxx");
$collection = $schema->createCollection("example1");
$collection = $schema->getCollection("example1");
$collection->add($marco, $mike)->execute();
var_dump($collection->find("name = 'Mike'")->execute()->fetchOne()); 26
The URI specifies the details of the connection
- Protocol
- Username
- Authentication String
- Lost
- Port
The X Plugin listens at port 33060
27. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$marco = [
"name" => "Marco",
"age" => 19,
"job" => "Programmer"
];
$mike = [
"name" => "Mike",
"age" => 39,
"job" => "Manager"
];
$schema = $session->getSchema("testxx");
$collection = $schema->createCollection("example1");
$collection = $schema->getCollection("example1");
$collection->add($marco, $mike)->execute();
var_dump($collection->find("name = 'Mike'")->execute()->fetchOne()); 27
1. Connect to the schema ‘testxx’
2. Create a collection for JSON documents
named ‘example1’
3. Use the collection ‘example1’
28. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$marco = [
"name" => "Marco",
"age" => 19,
"job" => "Programmer"
];
$mike = [
"name" => "Mike",
"age" => 39,
"job" => "Manager"
];
$schema = $session->getSchema("testxx");
$collection = $schema->createCollection("example1");
$collection = $schema->getCollection("example1");
$collection->add($marco, $mike)->execute();
var_dump($collection->find("name = 'Mike'")->execute()->fetchOne()); 28
Add records to the collection
29. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$marco = [
"name" => "Marco",
"age" => 19,
"job" => "Programmer"
];
$mike = [
"name" => "Mike",
"age" => 39,
"job" => "Manager"
];
$schema = $session->getSchema("testxx");
$collection = $schema->createCollection("example1");
$collection = $schema->getCollection("example1");
$collection->add($marco, $mike)->execute();
var_dump($collection->find("name = 'Mike'")->execute()->fetchOne()); 29
Find the record where the name = ‘Mike’
30. The Emphasis is on CRUD
30
Operation form Description
db.name.add()
The add() method inserts one document or more documents into the named
collection.
db.name.find() The find() method returns some or all documents in the named collection.
db.name.modify() The modify() method updates documents in the named collection.
db.name.remove()
The remove() method deletes one document or a list of documents from the
named collection.
CRUD EBNF Definitions - https://dev.mysql.com/doc/x-devapi-userguide/en/mysql-x-
crud-ebnf-definitions.html
32. No more messy strings
$SQLQuery = “SELECT * FROM people WHERE job
LIKE “ . $job . “AND age > $age”;
Versus
$collection = $schema-
>getCollection("people");
$result = $collection
->find('job like :job and age > :age')
->bind(['job' => 'Butler', 'age' => 16])
->execute(); 32
33. Easier to read/comprehend than SQL
$result = $collection
->remove('age > :age_from and age < :age_to')
->bind(['age_from' => 20, 'age_to' => 50])
->limit(2)
->execute();
33
Easy to add filters like SORT, LIMIT, HAVING GROUP BY
35. Got Tables?
You can also use the MySQL Document Store with Relational Tables
35
36. Quick Example using a table
#!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://root:hidave@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$schema = $session->getSchema("world");
$table = $schema->getTable("city");
$row = $table->select('Name','District')
->where('District like :district')
->bind(['district' => 'Texas'])
->limit(25)
->execute()->fetchAll();
print_r($row);
36
37. The URI Connection for a Session
#!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://root:hidave@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$schema = $session->getSchema("world");
$table = $schema->getTable("city");
$row = $table->select('Name','District')
->where('District like :district')
->bind(['district' => 'Texas'])
->limit(25)
->execute()->fetchAll();
$row = $result->fetchAll();
print_r($row);
37
38. Get schema and table
#!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://root:hidave@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$schema = $session->getSchema("world");
$table = $schema->getTable("city");
$row = $table->select('Name','District')
->where('District like :district')
->bind(['district' => 'Texas'])
->limit(25)
->execute()->fetchAll();
print_r($row);
38
39. The Query
#!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://root:hidave@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$schema = $session->getSchema("world");
$table = $schema->getTable("city");
$row = $table->select('Name','District')
->where('District like :district')
->bind(['district' => 'Texas'])
->limit(25)
->execute()->fetchAll();
;
print_r($row);
39
40. What if I Don’t Want to Rewrite old queries?
$session->sql("CREATE DATABASE addressbook")->execute();
40
41. Okay I can use Collections and Tables
BUT WHAT
ABOUT
BOTH!?!?!?! 41
42. You can also use a Collection as a table!
$collection = $schema->getCollection("people");
$table = $schema->getCollectionAsTable("people");
42
43. #!/bin/php
<?php
$session = mysql_xdevapigetSession("mysqlx://myuser:mypass@localhost:33060");
if ($session === NULL) {
die("Connection could not be established");
}
$schema = $session->getSchema("nyeats");
$table = $schema->getTable("restaurants");
$sqlx =
"WITH cte1 AS (SELECT doc->>"$.name" AS 'name',
doc->>"$.cuisine" AS 'cuisine',
(SELECT AVG(score) FROM
JSON_TABLE(doc, "$.grades[*]"
COLUMNS (score INT PATH "$.score")) as r ) AS avg_score
FROM restaurants)
SELECT *, rank() OVER
(PARTITION BY cuisine ORDER BY avg_score) AS `rank`
FROM cte1
ORDER by `rank`, avg_score DESC limit 10";
$row->sql($sqlx)->execute()-fetchAll();
print_r($row);
43
You can also use
Windowing Functions
for Advanced
Analytics
44. One of the advantages
of using MySQL as a
NoSQL Document
store is that you can
use SQL analytics on
your data!
44
45. Combine CTEs, Windowing Functions, & JSON_TABLE
WITH cte1 AS (SELECT doc->>"$.name"
AS 'name',
doc->>"$.cuisine" AS 'cuisine',
(SELECT AVG(score) FROM
JSON_TABLE(doc, "$.grades[*]"
COLUMNS (score INT PATH
"$.score")) as r ) AS avg_score
FROM restaurants)
SELECT *, rank() OVER
(PARTITION BY cuisine ORDER BY
avg_score) AS `rank`
FROM cte1
ORDER by `rank`, avg_score DESC limit 10
JSON_TABLE turns unstructured
JSON documents in to temporary
relational tables that can be
processed with SQL
Windowing Function for analytics
Common Table Expression make it
easy to write sub-queries
45
47. The X Plugin
… is a shared object that is installed by default in MySQL 8.0 and must be loaded
in 5.7
mysqlsh -u user -h localhost --classic --dba enableXProtocol
Or
mysql> INSTALL PLUGIN mysqlx SONAME 'mysqlx.so';
It listens on port 33060 so make sure you open firewall for 3306 (old MySQL) and
33060 (X Plugin).
And it supports SSL/TLS!!!
47
48. The New MySQL Shell
48
Built In JavaScript and
Python interpreters let
you work with you data
in the MySQL Shell.
Plus you get command
completion, great help
facilities, the ability to
check for server
upgrades, and the
ability to administrate a
InnoDB Clusters.
And you can also use
SQL
50. 50
InnoDB Cluster
MySQL InnoDB cluster provides a complete high availability
solution for MySQL. Each MySQL server instance runs MySQL
Group Replication, which provides the mechanism to replicate
data within InnoDB clusters, with built-in failover.
AdminAPI removes the need to work directly with Group
Replication in InnoDB clusters MySQL Router can automatically
configure itself based on the cluster you deploy, connecting client
applications transparently to the server instances.
Multiple secondary server instances are replicas of the primary. If
the primary fails, a secondary is automatically promoted to the
role of primary. MySQL Router detects this and forwards client
applications to the new primary. Advanced users can also
configure a cluster to have multiple-primaries.
51. Questions and Answers plus Additional Resources
● More Info on MySQL Document Store
○ PHP PECL Extension for X DevAPI
■ http://php.net/manual/en/book.mysql-xdevapi.php
○ MySQL Document Store
■ https://dev.mysql.com/doc/refman/8.0/en/document-store.html
○ X DevAPI User Guide
■ https://dev.mysql.com/doc/x-devapi-userguide/en/
○ Dev.MySQL.com for Downloads and Other Doces
○ X DevAPI Tutorial for Sunshine PHP
■ https://github.com/davidmstokes/PHP-X-DevAPI
● [email protected]
○ https://elephantdolphin.blogspot.com/
○ Slides at https://slideshare.net/davidmstokes
○ @Stoker
○ MySQL & JSON - A Practical Programming Guide
51