MySQL for Developers
SQL, application connectors, JSON and query performance
Why this course
Develop console and web applications that store, retrieve and present data with MySQL. Work through SQL refreshers and selected guided exercises covering schema design, queries, application access, transactions, JSON and performance analysis.
The 3–4-day programme assumes prior SQL experience. Use a prepared, supported MySQL environment such as MySQL 8.4 LTS with a compatible connector for PHP, Java or Python. Broader routine, engine and optimisation topics are introduced through focused examples rather than comprehensive administration training.
Learning outcomes
- Use MySQL clients and choose a compatible application connector.
- Design tables and use appropriate data types, keys and metadata.
- Retrieve and modify data with expressions, aggregates, joins, subqueries and views.
- Use transactions, prepared statements, import/export operations and stored-program features.
- Work with JSON and spatial data and distinguish SQL access from X DevAPI document operations.
- Inspect query plans and apply measured indexing and query improvements.
Prerequisites
For developers creating MySQL-backed applications. Prior experience with relational databases, SQL and the programming language selected for the exercises is expected.
10 modules
01Environment, architecture and clients3 topics
- MySQL Overview, Products and Services
- MySQL Enterprise Services
- Supported operating systems and version compatibility
- Installing MySQL and the World Database
- MySQL General Architecture
- How MySQL uses Disk Space
- How MySQL uses Memory
- Invoking Client Programs
- Using Option Files
- The MySQL Client
- Current client tools: MySQL Shell and a compatible graphical SQL client
- MySQL Connectors
- Third-Party APIs
02Retrieving data and handling SQL expressions3 topics
- The SELECT Statement
- Aggregating Query Results
- Using UNION
- SQL Modes
- Handling Missing or invalid Data Values
- Interpreting Error Messages
- SQL Comparisons
- Functions in SQL Expressions
- Comments in SQL Statements
03Data types and metadata6 topics
- Data Type Overview
- Numeric Data Types
- Character String Data Types
- Binary String Data Types
- Temporal Data Types
- NULL values
- Metadata Access Methods
- The INFORMATION_SCHEMA Database / Schema
- Using SHOW and DESCRIBE
- The mysqlshow Command
04Database and table design6 topics
- Database Properties
- Good Design Practices
- Identifiers
- Creating Databases
- Altering Databases
- Dropping Databases
- Creating Tables
- Table Properties
- Column Options
- Creating tables based on existing tables
- Altering Tables
- Dropping Tables
- Foreign Keys
05Data changes and transactions6 topics
- The INSERT Statement
- The DELETE Statement
- The UPDATE Statement
- The REPLACE Statement
- INSERT with ON DUPLICATE KEY UPDATE
- The TRUNCATE TABLE Statement
- What is a Transaction?
- Transaction Commands
- Isolation Levels
- Locking
06Joins, subqueries and views7 topics
- What is a Join?
- Joining Tables in SQL
- Basic Join Syntax
- Inner Joins
- Outer Joins
- Other Types of Joins
- Joins in UPDATE and DELETE Statements
- Types of Subqueries
- Table Subquery Operators
- Correlated and Non-Correlated Subqueries
- Converting Subqueries to Joins
- What are Views?
- Creating Views
- Updatable Views
- Managing Views
- Obtaining View Metadata
07Prepared statements and data exchange5 topics
- Why use Prepared Statements?
- Using Prepared Statements from the mysql Client
- Preparing a Statement
- Executing a Prepared Statement
- De-allocating a Prepared Statement
- Exporting and Importing Data
- Exporting and Importing Data using SQL
- Exporting and Importing Data using MySQL Client Programs
- Import Data with the SOURCE Command
08Stored routines and triggers9 topics
- What is a Stored Routine?
- Creating, Executing and Deleting Stored Routines
- Compound Statements
- Assign Variables
- Parameter Variables
- Parameter Declarations
- Flow Control Statements
- Declare and use Handlers
- Cursors
- What are Triggers?
- Creating and deleting triggers
- Restrictions on Triggers
09Storage engines and measured optimisation6 topics
- SQL Parser and Storage Engine Tiers
- Storage Engines and MySQL
- The MyISAM Storage Engine
- The InnoDB Storage Engine
- The MEMORY Storage Engine
- Other Storage Engines
- Overview of Optimization Principles
- Using Indexes for Optimization
- Using EXPLAIN to Analyze Queries
- Query Rewriting Techniques
- Optimizing Queries by Limiting Output
- Using Summary Tables
- Optimizing Updates
- Choosing Appropriate Storage Engines
10Application development with connectors, JSON and spatial data10 topics
- Aggregate and summarize data
- Analyze queries for optimization
- Choose between connectors for a given application
- Control transactions in SQL applications
- Create and store JSON documents
- Explain application development with NoSQL and XDevAPI
- Process data in JSON documents
- Store and process numeric data, spatial data, string data
- Use MySQL Shell to access document stores through X Protocol
- Use prepared statements
Select the connector and API for the application. Use parameter binding through the connector where appropriate; distinguish connector APIs from SQL PREPARE syntax. Practise transactions and JSON SQL operations, and demonstrate X DevAPI document access using a configured X Protocol environment.
A programme built around your team.
Share your training goals and requirements.