SQLancer
← All Database Flashcards Library / Flashcards / MySQL
🐬 MySQL Knowledge Base

MySQL Study Flashcards

The world's most popular open-source transactional relational database powering web applications. Click any card to flip and test your knowledge.

Card 1 of 10 Storage Engine

What is the default storage engine in MySQL?

Click Card to Reveal Answer ↷
Answer MySQL

InnoDB is the default storage engine, offering ACID transactions, foreign keys, and row-level locking.

Click to Flip Back ↶
Card 2 of 10 Engine Types

What is the difference between InnoDB and MyISAM?

Click Card to Reveal Answer ↷
Answer MySQL

InnoDB supports transactions, row locking, and foreign keys. MyISAM supports table-level locking only and has no transaction support.

Click to Flip Back ↶
Card 3 of 10 DML

How does ON DUPLICATE KEY UPDATE work in MySQL?

Click Card to Reveal Answer ↷
Answer MySQL

When an INSERT statement causes a primary or unique key duplicate, MySQL executes an UPDATE on the existing row instead.

Click to Flip Back ↶
Card 4 of 10 Aggregations

What is GROUP_CONCAT used for?

Click Card to Reveal Answer ↷
Answer MySQL

GROUP_CONCAT aggregates multiple non-null row values into a single concatenated string per group.

Click to Flip Back ↶
Card 5 of 10 Architecture

What is the function of the Redo Log in InnoDB?

Click Card to Reveal Answer ↷
Answer MySQL

The Redo Log records page changes to ensure crash recovery (durability) before changes are written to tablespace data files.

Click to Flip Back ↶
Card 6 of 10 Performance

What does EXPLAIN in MySQL show?

Click Card to Reveal Answer ↷
Answer MySQL

EXPLAIN displays how MySQL executes a query, including key usage, join types (ALL, ref, eq_ref), and rows examined.

Click to Flip Back ↶
Card 7 of 10 Data Types

How do AUTO_INCREMENT columns work?

Click Card to Reveal Answer ↷
Answer MySQL

AUTO_INCREMENT automatically generates sequential unique numeric keys for new table rows.

Click to Flip Back ↶
Card 8 of 10 Replication

What is Master-Replica Replication in MySQL?

Click Card to Reveal Answer ↷
Answer MySQL

A topology where writes to a Primary database are recorded in binary logs (binlog) and replayed on Secondary replica instances.

Click to Flip Back ↶
Card 9 of 10 Indexing

What is a Covering Index in MySQL?

Click Card to Reveal Answer ↷
Answer MySQL

An index that contains all columns required by a query, enabling MySQL to return results directly from the index without reading table pages.

Click to Flip Back ↶
Card 10 of 10 Transactions

What is the default isolation level in InnoDB?

Click Card to Reveal Answer ↷
Answer MySQL

REPEATABLE READ is InnoDB's default isolation level, preventing non-repeatable reads using multi-versioning.

Click to Flip Back ↶

Need practical SQL queries for MySQL?

Explore our ready-to-use copy-paste query recipes in the Cookbook.

View MySQL Cookbook →