Applying Constraint Logic Programming to SQL Semantic Analysis

07/25/2019
by   Fernando Sáenz-Pérez, et al.
0

This paper proposes the use of Constraint Logic Programming (CLP) to model SQL queries in a data-independent abstract layer by focusing on some semantic properties for signalling possible errors in such queries. First, we define a translation from SQL to Datalog, and from Datalog to CLP, so that solving this CLP program will give information about inconsistency, tautology, and possible simplifications. We use different constraint domains which are mapped to SQL types, and propose them to cooperate for improving accuracy. Our approach leverages a deductive system that includes SQL and Datalog, and we present an implementation in this system which is currently being tested in classroom, showing its advantages and differences with respect to other approaches, as well as some performance data. This paper is under consideration for acceptance in TPLP.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/07/2022

Integration of Skyline Queries into Spark SQL

Skyline queries are frequently used in data analytics and multi-criteria...
research
05/04/2019

An experiment with denotational semantics

The paper is devoted to showing how to systematically design a programmi...
research
04/23/2020

QueryVis: Logic-based diagrams help users understand complicated SQL queries faster

Understanding the meaning of existing SQL queries is critical for code m...
research
03/09/2022

CUBES: A Parallel Synthesizer for SQL Using Examples

In recent years, more and more people see their work depend on data mani...
research
02/10/2021

SQLRepair: Identifying and Repairing Mistakes in Student-Authored SQL Queries

Computer science educators seek to understand the types of mistakes that...
research
12/24/2020

Handling SQL Nulls with Two-Valued Logic

The design of SQL is based on a three-valued logic (3VL), rather than th...
research
07/09/2018

Execution-Guided Neural Program Decoding

We present a neural semantic parser that translatesnatural language ques...

Please sign up or login with your details

Forgot password? Click here to reset