Doom Runs in an SQL Database, Rendering Hell at 35 FPS

A developer has pushed relational database queries to their absolute limit by implementing the classic shooter entirely in SQL.

Jason Bouwmeester
4 Min Read
Doom Runs in an SQL Database, Rendering Hell at 35 FPS
Code snippet showing sql queries rendering pixelated game graphics
Image source: Ars Technica – All content.

How DOOMQL Pushes SQL Beyond Its Traditional Role

A developer known as DOOMQL has successfully implemented the iconic first-person shooter DOOM entirely within a structured query language (SQL) environment. Using the CedarDB database engine, the project transforms standard relational database operations into a fully functional game loop. The implementation relies on roughly 1,300 lines of SQL querying to manage everything from player movement and enemy AI to texture rendering.

Shopping Gallery

Rather than using SQL for its intended purpose of data retrieval and storage, the code repurposes query execution to simulate 3D graphics. The system generates accurate bitmapped views of the game’s environments directly through database interactions. This technical feat demonstrates that modern SQL engines can handle complex computational loads far beyond simple table lookups, effectively turning a database server into a game console.

The Technical Limits of Relational Query Engines

This experiment highlights the surprising computational flexibility of contemporary database systems like CedarDB. While SQL is traditionally associated with business intelligence and transactional data, it proves capable of handling real-time graphical rendering when pushed to its extremes. The ability to maintain 35 frames per second indicates that the underlying query optimizer and execution engine are robust enough to support intensive, repetitive calculations without collapsing under the load.

For developers and database administrators, this serves as a stress test for query performance and memory management. It challenges the conventional wisdom that SQL is limited to static data analysis. However, it also underscores the inefficiency of using a database engine for general-purpose computing tasks. The project is a proof-of-concept rather than a practical application, illustrating where the boundaries of SQL syntax and engine capabilities currently lie.

- Advertisement -
Surfshark VPN app connected on smartphone promoting fast VPN for unlimited devicesSurfshark VPN app connected on smartphone promoting fast VPN for unlimited devices

What Remains Unknown About Future Implementations

While the current implementation successfully renders DOOM, it remains unclear if this approach scales to more complex or graphically demanding titles. The specific optimizations used to achieve 35 FPS may not translate to other games with different rendering requirements or larger asset sizes. Additionally, the long-term stability of such a heavy query load on production databases is unknown, as the system was likely designed for experimentation rather than sustained operational use.

The project stands as a unique intersection of retro gaming culture and modern database engineering. It offers no immediate commercial value but provides valuable insight into the raw processing power available within standard SQL interfaces. For now, DOOMQL remains a niche demonstration of what happens when you force a database to do something it was never meant to do.

Share This Article
Gaming and tech geek, part-time photographer, and aspiring guitar hero from Alberta, Canada, Jason is passionate about all things cutting-edge. He thrives on discovering the latest innovations and making sense of them for everyday users. A lifelong gamer, Jason spends most of his playtime on Xbox (Gamertag: JustAnotherJay), but he’s equally at home slaying demons in Diablo, hitting the tracks in Forza, or dropping into CoD: Warzone on PC.