LearnThatStack Ace your next interview
Database Technologies

MySQL.

Start free Change topic Change
Practice · Questions

All questions

Showing of 42
Beginner 10
01

What is MySQL and what are its key features?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

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.
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

02

What are the different storage engines in MySQL?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

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 INSERT and SELECT, but not UPDATE or DELETE.
  • 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';
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

03

Explain the difference between DELETE, DROP, and TRUNCATE.

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

DELETE removes chosen rows, TRUNCATE TABLE empties the whole table at once, and DROP TABLE removes the table itself along with its data.

  • DELETE removes the rows its WHERE clause matches, fires ON DELETE triggers and can be rolled back. It is slower because it deletes rows one by one.
  • TRUNCATE drops and re-creates the table, which is much faster than DELETE on large tables. In MySQL it causes an implicit commit, so it cannot be rolled back. It does not fire ON DELETE triggers, and it resets the AUTO_INCREMENT counter.
  • DROP removes 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;
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

04

What is the difference between CHAR and VARCHAR?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

CHAR(n) is a fixed-length string and VARCHAR(n) is a variable-length string. In both, n counts characters, not bytes.

  • CHAR pads 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.
  • VARCHAR stores 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)
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

05

What are the numeric data types in MySQL?

Beginner ·

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:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

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 127
  • SMALLINT: 2 bytes, from -32,768 to 32,767
  • MEDIUMINT: 3 bytes, from -8,388,608 to 8,388,607
  • INT: 4 bytes, from -2,147,483,648 to 2,147,483,647
  • BIGINT: 8 bytes, from -2^63 to 2^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 called NUMERIC, stores exact values, for financial data.
  • FLOAT uses 4 bytes for single precision, and DOUBLE uses 8 bytes for double precision, so DOUBLE is 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
);
Rewriting in plainer words…

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 ↓

Related concept

Tailored explanation · switch back to · ·
What should the new diagram focus on?
How well did you know this?
AI:

06

Explain AUTO_INCREMENT in MySQL.

Part of Pro
07

What are aggregate functions in MySQL?

Part of Pro Visual
08

Explain the LIMIT clause and its use with OFFSET.

Part of Pro
09

Explain the difference between HAVING and WHERE clauses.

Part of Pro
10

Explain different types of JOINs in MySQL.

Part of Pro
Intermediate 22
11

What is database normalization and its forms?

Part of Pro
12

What is a subquery and what are its types?

Part of Pro
13

What is a self-join and when would you use it?

Part of Pro Visual
14

Explain foreign key constraints.

Part of Pro
15

What is an index and why is it important?

Part of Pro Visual
16

What are the different types of indexes in MySQL?

Part of Pro
17

Explain the EXPLAIN statement and its importance.

Part of Pro
18

What are stored procedures and their advantages?

Part of Pro
19

Explain triggers in MySQL.

Part of Pro
20

What are views and their benefits?

Part of Pro
21

Explain transactions and ACID properties.

Part of Pro
22

How do you backup and restore MySQL databases?

Part of Pro
23

What is the difference between MyISAM and InnoDB?

Part of Pro
24

What are MySQL's JSON data type capabilities?

Part of Pro
25

How do you implement database connection pooling?

Part of Pro
26

What are character sets and collations in MySQL, and why use utf8mb4?

Part of Pro
27

What is the InnoDB buffer pool and why does its size matter?

Part of Pro
28

What is the difference between a clustered index and a secondary index in InnoDB?

Part of Pro
29

What is query optimization and how do you optimize slow queries?

Part of Pro
30

What are common MySQL performance tuning strategies?

Part of Pro
31

How does INSERT ... ON DUPLICATE KEY UPDATE work in MySQL?

Part of Pro
32

What are isolation levels in MySQL?

Part of Pro Visual
Expert 10
33

Explain deadlocks and how to handle them.

Part of Pro Visual
34

Explain MySQL replication.

Part of Pro
35

What is partitioning and when would you use it?

Part of Pro
36

How do you monitor MySQL performance?

Part of Pro
37

What are the key MySQL configuration parameters?

Part of Pro
38

Explain MySQL's query cache and why it was removed.

Part of Pro
39

How do you handle large table operations efficiently?

Part of Pro
40

How does MVCC work in InnoDB?

Part of Pro Visual
41

What are the redo log and undo log in InnoDB?

Part of Pro
42

What locking mechanisms does InnoDB use?

Part of Pro

No matches

Try a different filter or search term.

Know someone prepping for MySQL? Send them this set.
Quick recap

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.

Get Pro · $10/mo
Pro · $10/mo

37 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.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

Serverless on AWS

Serverless Architecture on AWS

Flutter Mobile

Flutter Cross-Platform Mobile Development

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

AI Engineer

LLMs, RAG, Agents, Evals

AI-Powered Developer

Claude Code, Copilot, Agentic Workflows

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git