论文标题
SQLCHECK:SQL抗模式的自动检测和诊断
SQLCheck: Automated Detection and Diagnosis of SQL Anti-Patterns
论文作者
论文摘要
数据库-AS-A-Service平台的出现使部署数据库应用程序比以前更容易。现在,开发人员可以快速创建可扩展的应用程序。但是,设计性能,可维护和准确的应用程序具有挑战性。开发人员可能会在应用程序的SQL语句中在不知不觉中引入反模式。这些反图案是旨在解决问题的设计决策,但通常通过违反基本设计原则导致其他问题。 在本文中,我们提出了SQLCheck,这是一种整体工具链,用于自动查找和修复数据库应用程序中的反模式。我们介绍了自动(1)检测具有高精度和回忆的反图案的技术,(2)根据其对应用程序的性能,可维护性和应用的影响,对抗模式进行排名,(3)提出对数据库设计的替代性查询和更改,以修复这些抗Patterns。我们在开源存储库收集的大量查询和数据库中证明了这些反图案的普遍性。我们介绍了一种抗模式检测算法,该算法通过数据分析来增强查询分析。我们提出了一个排名模型,用于表征经常发生的抗模式的影响。我们讨论了SQLCheck如何使用基于规则的查询重构技术为高影响力的抗模式提出修复。我们的实验表明,SQLCheck使开发人员能够创建更多的性能,可维护和准确的应用程序。
The emergence of database-as-a-service platforms has made deploying database applications easier than before. Now, developers can quickly create scalable applications. However, designing performant, maintainable, and accurate applications is challenging. Developers may unknowingly introduce anti-patterns in the application's SQL statements. These anti-patterns are design decisions that are intended to solve a problem, but often lead to other problems by violating fundamental design principles. In this paper, we present SQLCheck, a holistic toolchain for automatically finding and fixing anti-patterns in database applications. We introduce techniques for automatically (1) detecting anti-patterns with high precision and recall, (2) ranking the anti-patterns based on their impact on performance, maintainability, and accuracy of applications, and (3) suggesting alternative queries and changes to the database design to fix these anti-patterns. We demonstrate the prevalence of these anti-patterns in a large collection of queries and databases collected from open-source repositories. We introduce an anti-pattern detection algorithm that augments query analysis with data analysis. We present a ranking model for characterizing the impact of frequently occurring anti-patterns. We discuss how SQLCheck suggests fixes for high-impact anti-patterns using rule-based query refactoring techniques. Our experiments demonstrate that SQLCheck enables developers to create more performant, maintainable, and accurate applications.