All tutorials
MySQL tutorials
The popular open-source database — schemas & types, CRUD, keys & joins, indexes, functions and transactions.
- Chapters
- 16
- Total reading
- 4h 4m
- Level
- Beginner to Advanced
Chapters
- Chapter 114 min readStart
MySQL Fundamentals
What MySQL is, connecting to a server, creating databases and tables, and choosing the right data types. - Chapter 215 min readStart
CRUD & Querying
Insert, read, update and delete rows, then filter, sort, paginate and group results — the daily bread of database work. - Chapter 316 min readStart
Keys, Relationships & Joins
Model related data with primary and foreign keys, enforce integrity, and combine tables with the join types. - Chapter 416 min readStart
Indexes, Functions & Performance
Speed up queries with indexes, read the query plan with EXPLAIN, use built-in functions, and keep data safe with transactions. - Chapter 515 min readStart
Advanced Joins & Set Operations
Join a table to itself, chain many tables, find non-matches, and combine result sets with UNION. - Chapter 616 min readStart
Subqueries & CTEs
Nest a query inside another, correlate it to the outer row, and refactor complex logic into readable common table expressions. - Chapter 716 min readStart
Window Functions
Rank rows, compute running totals, and compare each row to its neighbours — without collapsing the result like GROUP BY does. - Chapter 815 min readStart
Views & Stored Routines
Save queries as reusable views, and push logic into the database with stored procedures and functions. - Chapter 914 min readStart
Triggers & Scheduled Events
React automatically to data changes with triggers, and run recurring jobs inside the database with the event scheduler. - Chapter 1015 min readStart
Advanced Data Types & JSON
Store semi-structured data in JSON columns, use ENUM/SET wisely, and compute columns automatically with generated columns. - Chapter 1114 min readStart
Constraints & Data Integrity
Let the database guard your data — CHECK constraints, cascading foreign keys, composite and unique keys, and why integrity belongs in the schema. - Chapter 1216 min readStart
Transactions, Isolation & Locking
Go beyond COMMIT/ROLLBACK — ACID guarantees, isolation levels, the anomalies they prevent, and how to avoid deadlocks. - Chapter 1316 min readStart
Query Optimization Deep Dive
Make slow queries fast — read EXPLAIN properly, design indexes that actually get used, and find the queries worth fixing. - Chapter 1415 min readStart
Security & User Management
Create users, grant least-privilege access with roles, and defend against SQL injection — the non-negotiables of running a database. - Chapter 1515 min readStart
Backup, Restore & Replication
Protect data against loss — logical and physical backups, point-in-time recovery with binary logs, and replication for scale and failover. - Chapter 1616 min readStart
Database Design & Best Practices
Bring it together — model a schema from requirements, normalise (and when to denormalise), and follow the habits of production databases.
