All questions
Showing of 42What is MySQL and what are its key features?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MySQL is an open-source relational database management system (RDBMS) that you query with Structured Query Language (SQL). Oracle develops it and releases it under the GNU General Public License (GPL).
Its key features:
- ACID compliance through the default InnoDB storage engine. ACID stands for atomicity, consistency, isolation and durability, the guarantees that keep data intact even after a crash.
- Storage engines chosen per table, such as InnoDB, MyISAM and Memory.
- Replication from a source server to replicas, and Group Replication, whose multi-primary mode lets every member accept writes.
- Horizontal partitioning, which splits a large table by rows.
- Triggers and stored procedures for logic on the server.
- Full-text indexes for text search.
- It runs on Linux, Windows and macOS.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the different storage engines in MySQL?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MySQL's main storage engines are InnoDB, the default, and MyISAM. A storage engine stores and reads a table's data, and you choose one per table. Oracle recommends InnoDB except for specialized cases.
- InnoDB: ACID transactions with crash recovery. It also locks rows, not tables, and enforces foreign keys.
- MyISAM: table-level locking, with no transactions or foreign keys, for read-mostly data.
- Memory, formerly HEAP: rows kept in RAM, very fast for single-value lookups, but lost at shutdown.
- Archive: compressed storage for archival data. It supports
INSERTandSELECT, but notUPDATEorDELETE. - CSV: rows stored as comma-separated text, for data exchange.
- Federated: remote MySQL tables used as local ones.
- NDB: the clustered engine of MySQL NDB Cluster.
SHOW ENGINES lists the engines your server supports. To check one table's engine:
SHOW TABLE STATUS WHERE Name = 'table_name';
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the difference between DELETE, DROP, and TRUNCATE.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
DELETE removes chosen rows, TRUNCATE TABLE empties the whole table at once, and DROP TABLE removes the table itself along with its data.
DELETEremoves the rows itsWHEREclause matches, firesON DELETEtriggers and can be rolled back. It is slower because it deletes rows one by one.TRUNCATEdrops and re-creates the table, which is much faster thanDELETEon large tables. In MySQL it causes an implicit commit, so it cannot be rolled back. It does not fireON DELETEtriggers, and it resets theAUTO_INCREMENTcounter.DROPremoves the table definition, all its data and its triggers. It also causes an implicit commit and is very fast.
For InnoDB, TRUNCATE fails if a foreign key in another table references the table.
-- DELETE specific rows
DELETE FROM users WHERE age < 18;
-- TRUNCATE all data
TRUNCATE TABLE users;
-- DROP entire table
DROP TABLE users;
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between CHAR and VARCHAR?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
CHAR(n) is a fixed-length string and VARCHAR(n) is a variable-length string. In both, n counts characters, not bytes.
CHARpads values with spaces to the full length when stored, and MySQL strips trailing spaces on read. The length can be 0 to 255. It is a little faster for fixed-size values such as country codes, but wastes space on shorter ones.VARCHARstores only the characters used, plus a length prefix, so it is more storage efficient.
You can declare a VARCHAR length up to 65,535, but the real limit is lower. All columns share a 65,535-byte row size limit, and the character set decides how many bytes each character takes. The prefix is 1 byte when values need at most 255 bytes, and 2 bytes otherwise. With the default utf8mb4, a character can take up to 4 bytes, so a VARCHAR(255) value can need 1,020 bytes and a 2-byte prefix.
-- CHAR(10) always holds 10 characters, padded with spaces
name CHAR(10)
-- VARCHAR(255) stores only the characters used, plus a length prefix
name VARCHAR(255)
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the numeric data types in MySQL?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
MySQL has exact integer types, the exact fixed-point type DECIMAL, and the approximate floating-point types FLOAT and DOUBLE.
Integer types, with their signed ranges:
TINYINT: 1 byte, from -128 to 127SMALLINT: 2 bytes, from -32,768 to 32,767MEDIUMINT: 3 bytes, from -8,388,608 to 8,388,607INT: 4 bytes, from -2,147,483,648 to 2,147,483,647BIGINT: 8 bytes, from-2^63to2^63 - 1
UNSIGNED allows only nonnegative values, so an INT UNSIGNED column holds 0 to 4,294,967,295.
Decimal and floating-point types:
DECIMAL, also calledNUMERIC, stores exact values, for financial data.FLOATuses 4 bytes for single precision, andDOUBLEuses 8 bytes for double precision, soDOUBLEis more precise. Both are approximate, so exact comparisons can fail.
CREATE TABLE products (
id INT AUTO_INCREMENT PRIMARY KEY,
price DECIMAL(10,2),
weight FLOAT,
quantity SMALLINT UNSIGNED
);
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain AUTO_INCREMENT in MySQL.
What are aggregate functions in MySQL?
Explain the LIMIT clause and its use with OFFSET.
Explain the difference between HAVING and WHERE clauses.
Explain different types of JOINs in MySQL.
What is database normalization and its forms?
What is a subquery and what are its types?
What is a self-join and when would you use it?
Explain foreign key constraints.
What is an index and why is it important?
What are the different types of indexes in MySQL?
Explain the EXPLAIN statement and its importance.
What are stored procedures and their advantages?
Explain triggers in MySQL.
What are views and their benefits?
Explain transactions and ACID properties.
How do you backup and restore MySQL databases?
What is the difference between MyISAM and InnoDB?
What are MySQL's JSON data type capabilities?
How do you implement database connection pooling?
What are character sets and collations in MySQL, and why use utf8mb4?
What is the InnoDB buffer pool and why does its size matter?
What is the difference between a clustered index and a secondary index in InnoDB?
What is query optimization and how do you optimize slow queries?
What are common MySQL performance tuning strategies?
How does INSERT ... ON DUPLICATE KEY UPDATE work in MySQL?
What are isolation levels in MySQL?
Explain deadlocks and how to handle them.
Explain MySQL replication.
What is partitioning and when would you use it?
How do you monitor MySQL performance?
What are the key MySQL configuration parameters?
Explain MySQL's query cache and why it was removed.
How do you handle large table operations efficiently?
How does MVCC work in InnoDB?
What are the redo log and undo log in InnoDB?
What locking mechanisms does InnoDB use?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
MySQL in pictures.
A quick recap of MySQL in 32 short animated pictures, one idea at a time. About 8 min to get the whole topic back in your head before you walk in. Pause any picture, slow it down, or step through it.
Pro The first chapter is free to play. The other 30 pictures come with Pro.
MySQL cheatsheet
- InnoDB & storage engines01
- Column types & keys02
- Indexes & EXPLAIN03
- Grouping, joins & subqueries04
- Transactions & locking05
- Logs, backups & replication06
- Tuning & monitoring07
- Delete, alter & partition08
- Views, procedures & triggers09
- The model10
- + 4 more inside
This picture is part of Pro. The first chapter is free to play; the other 30 pictures come with Pro.
Get Pro · $10/mo Already Pro? Sign in37 of 42 MySQL answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.