Skip to main content
InterviewHubPRO
Section Overview
Q1

Question 1 of 50

Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

2%
MySQL & InnoDB (50 Qs)•Part 1: Basic & Foundational Concepts (Junior / Entry-Level)

What is the architecture of MySQL (Server Layer vs Storage Engine Layer)?

senior LevelMost AskedCode ExampleSystem DesignDatabases & SQLMySQL

In Simple Words: MySQL employs a modular, two-tier architecture:

  1. Server Layer: Universal across all engines. Handles client connections (connection pool), SQL parsing, query syntax analysis, query optimization (Cost-Based Optimizer), and built-in functions.
  2. Storage Engine Layer: Pluggable modules responsible for the physical storage, retrieval, indexing, and transactional locking of data on disk (e.g. InnoDB, MyISAM, Memory).
  • MySQL servers can run different storage engines for different tables in the same database!
text
MySQL Architecture:
[Client Connections (JDBC, ODBC, PHP, Node.js)]
                     │
┌────────────────────▼────────────────────┐
│              SERVER LAYER               │
│ Connection Pool | SQL Parser | Optimizer │
└────────────────────┬────────────────────┘
                     │ Storage Engine API
┌────────────────────▼────────────────────┐
│          STORAGE ENGINE LAYER           │
│   [InnoDB]   |   [MyISAM]   |  [Memory] │
└─────────────────────────────────────────┘