Загрузка...

SQL25-02 Towards Sanity in Query Languages. Viktor Leis and Thomas Neumann

Towards Sanity in Query Languages. Viktor Leis and Thomas Neumann Title: Towards a Saner Query Language: Critiques of SQL and Proposals for Improvement Speakers: Thomas Neumann & Viktor Leis (TU Munich) Key Points: Critique of SQL: Syntax Issues: SQL’s syntax is irregular, overly verbose, and unintuitive (e.g., arbitrary rules for CTEs, redundant GROUP BY clauses). Semantic Ambiguity: Query evaluation order (e.g., FROM before SELECT) is counterintuitive, and behaviors vary across database systems. Lack of Abstraction: SQL lacks reusable components (e.g., no parameterized views or higher-order functions). Compatibility Problems: No true "standard"—vendors deviate significantly (e.g., PostgreSQL vs. SQL Server vs. BigQuery semantics). Proposed Fixes: S-Expression Based Language ("S"): A declarative, functional-style language with regular syntax (no keywords, method chaining). Explicit semantics, composable operations (e.g., table.join(...).filter(...)). Supports higher-order functions for reusable query logic. Relational Intermediate Representation (IR): A formal, system-agnostic specification for relational algebra, scalar expressions, and type semantics. Goal: Enable interoperability across systems (e.g., transpilation to/from PostgreSQL). Challenges: Type System Fragmentation: Differing behaviors for numerics, timestamps, and NULL handling complicate standardization. Transpilation Limitations: Some SQL dialects may be irreconcilable without runtime patches. Adoption Barriers: Vendor lock-in and legacy test suites hinder competition. Vision: Decouple the relational model’s success from SQL by fostering innovation via a shared IR. Enable composable data systems, federated queries, and hardware acceleration through clear semantics. Q&A Highlights: Standardization: Lessons from past failures (e.g., QUEL, QBE) suggest focusing on semantics first, not syntax. Type Systems: Critical for storage and query layers (e.g., Parquet pruning fails if systems disagree on min/max values). Unnesting Correlated Subqueries: New research improves upon prior work for optimizing lateral joins. Conclusion: SQL’s flaws hinder progress in data systems. A well-defined IR ("S") could unify the ecosystem, akin to LLVM for databases, enabling innovation while preserving relational principles.

Видео SQL25-02 Towards Sanity in Query Languages. Viktor Leis and Thomas Neumann автора DatabaseInternals
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки