PLSQLBench: Benchmarking LLM Systems for Executable Procedural Database Programming

Marianne Menglin Liu, Leonid Boytsov, Daniel W. Peterson, Pramuditha Perera, Rongguang Wang, Sai Ashish Somayajula, Syed Hamza Rafique, Rohit Saini, Shubham Pathak, Sujeeth Bharadwaj, Tao Sheng, Graham Horwood, Ankan Bansal, Fahad Shah, Sujith Ravi, Dan Roth


Abstract
We present PLSQLBench, to our knowledge the first benchmark for evaluating whether LLMs can write executable PL/SQL programs, with correctness measured through execution-based tests. Existing LLM evaluations largely target general-purpose code generation or declarative text-to-SQL, leaving procedural database programming underexplored. PLSQLBench contains 2,865 instances: 2,594 single-turn tasks and 271 multi-turn conversations spanning 978 turns. The benchmark combines complex schema-grounded tasks over enterprise-style Spider 2 databases, simpler schema-grounded tasks derived from Spider, and MBPP-derived procedural problems, covering varying levels of database grounding and procedural complexity. Experiments with eight LLMs reveal recurring difficulties in schema grounding, PL/SQL dialect fidelity, procedural control flow, exception handling, and cross-turn consistency. Tool-augmented LLM agents improve performance on several schema-grounded evaluations, although substantial gaps remain. These results highlight procedural database-programming capabilities not directly assessed by conventional code-generation or text-to-SQL benchmarks. Our code is available at https://github.com/oracle-samples/plsqlbench.
Anthology ID:
2026.emnlp-industry.155
Volume:
Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track
Month:
October
Year:
2026
Address:
Budapest, Hungary
Editors:
Pepa Atanasova, Gholamreza Haffari, Minghan Wang
Venue:
EMNLP
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
2625–2646
Language:
URL:
https://aclanthology.org/2026.emnlp-industry.155/
DOI:
Bibkey:
Cite (ACL):
Marianne Menglin Liu, Leonid Boytsov, Daniel W. Peterson, Pramuditha Perera, Rongguang Wang, Sai Ashish Somayajula, Syed Hamza Rafique, Rohit Saini, Shubham Pathak, Sujeeth Bharadwaj, Tao Sheng, Graham Horwood, Ankan Bansal, Fahad Shah, Sujith Ravi, and Dan Roth. 2026. PLSQLBench: Benchmarking LLM Systems for Executable Procedural Database Programming. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing: Industry Track, pages 2625–2646, Budapest, Hungary. Association for Computational Linguistics.
Cite (Informal):
PLSQLBench: Benchmarking LLM Systems for Executable Procedural Database Programming (Liu et al., EMNLP 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.emnlp-industry.155.pdf