PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

SQL · Theory

Storage Engines

← All stacks

Theory

318/439

Storage Engines

A storage engine is how the table is stored. SHOW ENGINES; InnoDB is default (transactions, FKs). MyISAM: old, table locks. MEMORY: RAM, lost on restart. CSV: CSV files, little use in apps.

CREATE TABLE … ENGINE=InnoDB; Usually omit it and take the default.

Trap — MEMORY for data you cannot lose. Trap: mixing engines then expecting FKs between them.

On the example next to this theory: Storage Engines: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Exam tip

InnoDB default. SHOW ENGINES; to list.

Storage Engines — sample query

-- Storage Engines
CREATE TABLE demo (
  id INTEGER PRIMARY KEY,
  label TEXT NOT NULL,
  qty INTEGER DEFAULT 0
);
INSERT INTO demo (id, label, qty) VALUES
  (1, 'alpha', 2),
  (2, 'beta', 5);
SELECT label, qty FROM demo WHERE qty >= 2 ORDER BY qty DESC;

Storage Engines: create two demo rows, then SELECT qty >= 2 ordered. Say which labels come back.

Short notes

  • DefEngine = storage/locking/transaction style of a table.
  • RuleInnoDB default. SHOW ENGINES;
  • TrapMyISAM/MEMORY for important data.

Questions

1

Default engine?

318 / 439

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.