arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1305.2103cs.DB
收藏

将关系数据转换为数据表

Translating Relational Queries into Spreadsheets

Jacek Sroka, Adrian Panasiuk, Krzysztof Stencel, Jerzy Tyszkiewicz

摘要:

电子表格是数据管理和分析最常用的应用程序之一。也许它们甚至是所有类型中使用最广泛的计算机应用程序之一。它们以自然和直观的方式将数据处理与各种补充功能相结合:统计功能,可视化工具,数据透视表,数据透视图,线性规划求解器,定期从外部来源下载数据的Web查询等。在这篇文章中,我们演示了一个电子表格可以实现所有的数据转换定义在SQL中,没有任何使用宏或内置的程序设计语言,仅仅通过利用电子表格公式。我们提供了一个查询编译器,它将任何给定的SQL查询转换为相同语义的工作表,包括NULL值。因此,数据库操作对于不想迁移到数据库的用户变得可用。他们可以使用高级语言定义查询,然后在普通的电子表格中获得执行计划。无需复杂的数据库系统,无需电子表格插件或宏。电子表格中可用的函数对可以实现的算法施加了严格的限制。在本文中,我们提供了$O(n\log^2n)$排序电子表格,但使用一个非常数的行数,以前已知的$O(n^2)$的改进。因此,令人惊讶的是,电子表格可以实现,正如我们所展示的,深度优先搜索和广度优先搜索的图形,从而超越SQL-92中定义的查询。

英文摘要:

Spreadsheets are among the most commonly used applications for data management and analysis. Perhaps they are even among the most widely used computer applications of all kinds. They combine in a natural and intuitive way data processing with very diverse supplementary features: statistical functions, visualization tools, pivot tables, pivot charts, linear programming solvers, Web queries periodically downloading data from external sources, etc. However, the spreadsheet paradigm of computation still lacks sufficient analysis. In this article we demonstrate that a spreadsheet can implement all data transformations definable in SQL, without any use of macros or built-in programming languages, merely by utilizing spreadsheet formulas. We provide a query compiler, which translates any given SQL query into a worksheet of the same semantics, including NULL values. Thereby database operations become available to the users who do not want to migrate to a database. They can define their queries using a high-level language and then get their execution plans in a plain vanilla spreadsheet. No sophisticated database system, no spreadsheet plugins or macros are needed. The functions available in spreadsheets impose severe limitations on the algorithms one can implement. In this paper we offer $O(n\log^2n)$ sorting spreadsheet, but using a non-constant number of rows, improving on the previously known $O(n^2)$ ones. It is therefore surprising, that a spreadsheet can implement, as we demonstrate, Depth-First-Search and Breadth-First-Search on graphs, thereby reaching beyond queries definable in SQL-92.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑