OpenAI·Backend Engineer·Onsite - System Design / Architecture
Apr 2026
OpenAI backend interview that went deep on database internals. They asked me to design a mini SQL engine from scratch, which sounds like a system design question but quickly turned into a very low-level implementation discussion about parsing, execution, and storage.
- Design a simplified SQL execution engine that supports CREATE TABLE, INSERT, and SELECT with WHERE, ORDER BY, GROUP BY, and basic aggregates like COUNT, SUM, AVG, MIN, and MAX. Walk through how you'd implement tokenization, parsing into an AST, a logical plan, and execution.
- How would you design the in-memory storage layout for this engine, and what kind of simple indexing would you support?
- How would you extend this engine to support JOIN operations?
“I started with the high-level pipeline and they kept pushing me down each layer.” The rest of the author's notes on Backend Engineer interview at OpenAI, Onsite - System Design / Architecture round, covers how they worked through the question, what the panel pushed back on, and what they would do differently.
View Post