Skip to content

aminmesbahi/MySQL-Course

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MySQL 8.0 Course

This folder is a MySQL-oriented companion to the SQL Server course in the repository root. It keeps the same tutorial tone and lesson sequencing where possible, but replaces SQL Server-only features with practical MySQL 8.0 equivalents.

Scope

  • Target engine: MySQL 8.0+
  • Style: runnable, tutorial-first scripts with short instructional comments
  • Goal: keep the learning path familiar while using native MySQL patterns

Agenda

See AGENDA.md for the lesson mapping and the conversion plan.

Index

Database Basics

  1. 01_Creating_Database.sql - Create databases, set defaults, and inspect schema metadata.
  2. 02_Backup_Database.sql - Logical backup and restore workflow with MySQL tooling.

Administration & Maintenance

  1. 03_Event_Scheduler.sql - Automate recurring tasks with the MySQL Event Scheduler.

Schema & Objects

  1. 04_Indexes_Part_1.sql - Build and test common index patterns in InnoDB.
  2. 05_Stored_Procedures.sql - Create procedures, handlers, output parameters, and transactional routines.
  3. 06_Functions.sql - Create scalar stored functions and model set-returning logic with MySQL-friendly alternatives.
  4. 07_Triggers.sql - Use BEFORE and AFTER triggers with NEW and OLD row references.
  5. 08_Views.sql - Create simple, join, aggregate, and JSON-producing views.

Data Modeling & Semi-Structured Data

  1. 09_Hierarchy_Data.sql - Model hierarchies with adjacency lists and recursive CTEs.
  2. 10_XML.sql - Work with XML stored as text using XPath helper functions.
  3. 11_JSON.sql - Work with MySQL JSON columns, paths, generated columns, and JSON_TABLE.
  4. 12_Relationship_Graph_Alternatives.sql - Model graph-like data with relational tables and joins.

Querying & Analytics

  1. 13_Match_Alternatives.sql - Replace graph MATCH patterns with join-based and recursive queries.
  2. 14_Statements.sql - Review statement patterns, operator behavior, and index-friendly predicates.
  3. 15_Windowing_Functions.sql - Use window functions for ranking, navigation, and running aggregates.
  4. 16_Rank_Functions.sql - Use ranking functions with partitions and top-N patterns.
  5. 17_Time_Series.sql - Analyze time-series data with window functions, interval bucketing, and manual history tracking.
  6. 18_Row_Filtering_Alternatives.sql - Emulate row-level access patterns with views, user mapping, and privilege boundaries.
  7. 19_Approximation_Alternatives.sql - Replace approximate percentile features with MySQL distribution-analysis patterns.
  8. 20_Prediction_Alternatives.sql - Replace PREDICT with SQL-based forecasting and scoring patterns.

Data

The data folder contains sample CSV, JSON, and XML files reused by the semi-structured data lessons.

Notes

  • Several scripts use DELIMITER // because MySQL routines and triggers contain internal semicolons.
  • Lessons 09, 12, and 13 are intentional rewrites rather than literal ports because MySQL does not implement hierarchyid, graph node/edge tables, or the SQL Server MATCH clause.
  • Lessons 18, 19, and 20 are also intentional rewrites because MySQL does not provide native row-level security policies, APPROX_PERCENTILE_*, or the SQL Server PREDICT clause.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors