SQLCheck: Automated Detection and Diagnosis of SQL Anti-Patterns

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/31/2021

Investigating Design Anti-pattern and Design Pattern Mutations and Their Change- and Fault-proneness

During software evolution, inexperienced developers may introduce design...
research
12/15/2022

Improving Developers' Understanding of Regex Denial of Service Tools through Anti-Patterns and Fix Strategies

Regular expressions are used for diverse purposes, including input valid...
research
09/05/2020

A Large Scale Empirical Study of the Impact of Spaghetti Code and Blob Anti-patterns on Program Comprehension

Context: Several studies investigated the impact of anti-patterns (i.e.,...
research
10/19/2020

Warrior1: A Performance Sanitizer for C++

This paper presents Warrior1, a tool that detects performance anti-patte...
research
07/22/2020

Detecting Quality Problems in Research Data: A Model-Driven Approach

As scientific progress highly depends on the quality of research data, t...
research
07/18/2021

IDEAL: An Open-Source Identifier Name Appraisal Tool

Developers must comprehend the code they will maintain, meaning that the...
research
03/10/2021

Anti-Counterfeiting for Polymer Banknotes Based on Polymer Substrate Fingerprinting

Polymer banknotes are the trend for printed currency and have been adopt...

Please sign up or login with your details

Forgot password? Click here to reset