Elucidating Type Conversions in SQL Engines


연구 분야: Databases



학회: European Symposium on Programming


초록

Practical SQL engines differ in subtle ways in their handling of typing constraints and implicit type casts. These issues, usually not considered in formal accounts of SQL, directly affect the portability of queries between engines. To understand this problem, we present a formal typing semantics for SQL, named , that explicitly captures both static and dynamic type behavior. The system is expressed in terms of abstract operators that provide the necessary leeway to precisely model different SQL engines (PostgreSQL, MS SQL Server, MySQL, SQLite, and Oracle). We show that this formalism provides formal guarantees regarding the handling of types. We provide practical conditions on engines to prove type safety and soundness of queries. In this regard, can serve as precise documentation of typing in existing engines and potentially guide their evolution, as well as provide a formal basis to study type-aware query optimizations, and design provably-correct query translators. Additionally, we test the adequacy of the formalism, implementing in Python for these five engines, and tested them with thousands of randomly-generated queries.


Author Profile
Wenjia Ye

National University of Singapore Singapore Singapore

Singapore
Author Profile
Matías Toro

The University of Hong Kong Hong Kong China

China
Author Profile
Claudio Gutierrez

Computer Science Department University of Chile and IMFD Santiago Chile

Andorra

📄 논문 정보

발행 연도 2025년
인용수 0
출판 국가 Singapore, Andorra, China
사이트 Springer
좋아요 수 0

연관 논문 목록 (199건)