Applying Constraint Logic Programming to SQL Semantic Analysis

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 sol...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Theory and practice of logic programming Jg. 19; H. 5-6; S. 808 - 825
1. Verfasser: SÁENZ-PÉREZ, FERNANDO
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Cambridge, UK Cambridge University Press 01.09.2019
Schlagworte:
ISSN:1471-0684, 1475-3081
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Abstract 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.
AbstractList 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.
Author SÁENZ-PÉREZ, FERNANDO
Author_xml – sequence: 1
  givenname: FERNANDO
  orcidid: 0000-0001-6075-4398
  surname: SÁENZ-PÉREZ
  fullname: SÁENZ-PÉREZ, FERNANDO
  email: fernan@sip.ucm.es
  organization: Complutense University of Madrid, 28040 Madrid, Spain (e-mail: fernan@sip.ucm.es)
BookMark eNp9kE9LxDAQxYOs4O7qB_BW8FydadO0uQjL4j8oqKyeS9omJUub1KR72G9v6y4Iip5mmPd-w-MtyMxYIwm5RLhGwPRmgzRFYBlFDgARsBMyH09JGEOGs68dw0k_IwvvtwDI4ojOye2q79u9Nk2wtsYPTmgzBLltdBW8ONs40XWTONhg85oHG9kJM4zayoh277U_J6dKtF5eHOeSvN_fva0fw_z54Wm9ysMqxnQIeVkjg5oLEfGIKVaVlUKq6kqWZcQoA55JmtZZkihFS8pprWpAhCpKEs54Fi_J1eFv7-zHTvqh2NqdG0P4IooBGGYxJqMLD67KWe-dVEXvdCfcvkAoppqKXzWNTPqDqfQgBm3NVEb7LxkfSdGVTteN_A71N_UJk2N7Ig
CitedBy_id crossref_primary_10_1016_j_fss_2022_02_001
Cites_doi 10.1109/ICTAI.2013.155
10.1007/s11257-011-9105-9
10.14778/3151113.3151116
10.1145/321992.321996
10.1145/1026487.1008055
10.1007/978-3-319-63139-4_17
10.1007/3-540-45349-0_42
10.1016/j.jss.2005.06.028
10.1145/232616.232692
10.1017/S1471068409003780
10.14778/3402755.3402805
10.1016/j.eswa.2017.09.056
10.1017/CBO9780511615320
ContentType Journal Article
Copyright Cambridge University Press 2019
Copyright_xml – notice: Cambridge University Press 2019
DBID AAYXX
CITATION
3V.
7SC
7XB
8AL
8FD
8FE
8FG
8FK
ABUWG
AFKRA
ARAPS
AZQEC
BENPR
BGLVJ
CCPQU
DWQXO
GNUQQ
HCIFZ
JQ2
K7-
L7M
L~C
L~D
M0N
P5Z
P62
PHGZM
PHGZT
PKEHL
PQEST
PQGLB
PQQKQ
PQUKI
PRINS
Q9U
DOI 10.1017/S1471068419000206
DatabaseName CrossRef
ProQuest Central (Corporate)
Computer and Information Systems Abstracts
ProQuest Central (purchase pre-March 2016)
Computing Database (Alumni Edition)
Technology Research Database
ProQuest SciTech Collection
ProQuest Technology Collection
ProQuest Central (Alumni) (purchase pre-March 2016)
ProQuest Central (Alumni)
ProQuest Central UK/Ireland
Advanced Technologies & Computer Science Collection
ProQuest Central Essentials
ProQuest Central
ProQuest Technology Collection
ProQuest One
ProQuest Central Korea
ProQuest Central Student
SciTech Premium Collection
ProQuest Computer Science Collection
Computer Science Database
Advanced Technologies Database with Aerospace
Computer and Information Systems Abstracts – Academic
Computer and Information Systems Abstracts Professional
Computing Database
Advanced Technologies & Aerospace Database
ProQuest Advanced Technologies & Aerospace Collection
ProQuest Central Premium
ProQuest One Academic (New)
ProQuest One Academic Middle East (New)
ProQuest One Academic Eastern Edition (DO NOT USE)
ProQuest One Applied & Life Sciences
ProQuest One Academic (retired)
ProQuest One Academic UKI Edition
ProQuest Central China
ProQuest Central Basic
DatabaseTitle CrossRef
Computer Science Database
ProQuest Central Student
Technology Collection
Technology Research Database
Computer and Information Systems Abstracts – Academic
ProQuest One Academic Middle East (New)
ProQuest Advanced Technologies & Aerospace Collection
ProQuest Central Essentials
ProQuest Computer Science Collection
Computer and Information Systems Abstracts
ProQuest Central (Alumni Edition)
SciTech Premium Collection
ProQuest One Community College
ProQuest Central China
ProQuest Central
ProQuest One Applied & Life Sciences
ProQuest Central Korea
ProQuest Central (New)
Advanced Technologies Database with Aerospace
Advanced Technologies & Aerospace Collection
ProQuest Computing
ProQuest Central Basic
ProQuest Computing (Alumni Edition)
ProQuest One Academic Eastern Edition
ProQuest Technology Collection
ProQuest SciTech Collection
Computer and Information Systems Abstracts Professional
Advanced Technologies & Aerospace Database
ProQuest One Academic UKI Edition
ProQuest One Academic
ProQuest Central (Alumni)
ProQuest One Academic (New)
DatabaseTitleList
CrossRef
Computer Science Database
Database_xml – sequence: 1
  dbid: BENPR
  name: ProQuest Central
  url: https://www.proquest.com/central
  sourceTypes: Aggregation Database
DeliveryMethod fulltext_linktorsrc
Discipline Computer Science
DocumentTitleAlternate F. Sáenz-Pérez
Applying CLP to SQL Semantic Analysis
EISSN 1475-3081
EndPage 825
ExternalDocumentID 10_1017_S1471068419000206
GroupedDBID -E.
.FH
09C
09E
0E1
0R~
123
29Q
3V.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646098e47d855ff4b494dfd0110c25596983
IEDL.DBID K7-
ISICitedReferencesCount 2
ISICitedReferencesURI http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=000487090500012&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
ISSN 1471-0684
IngestDate Fri Jul 25 22:35:25 EDT 2025
Sat Nov 29 04:58:36 EST 2025
Tue Nov 18 21:08:29 EST 2025
Tue Jan 21 06:25:19 EST 2025
IsPeerReviewed true
IsScholarly true
Issue 5-6
Keywords Datalog Educational System
Semantic Checking
Constraint Logic Programming
SQL
Language English
License https://www.cambridge.org/core/terms
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-c317t-9bd160d9aa2926f6cbcf14fdcebb2646098e47d855ff4b494dfd0110c25596983
Notes ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 14
ORCID 0000-0001-6075-4398
PQID 2300618315
PQPubID 43613
PageCount 18
ParticipantIDs proquest_journals_2300618315
crossref_primary_10_1017_S1471068419000206
crossref_citationtrail_10_1017_S1471068419000206
cambridge_journals_10_1017_S1471068419000206
PublicationCentury 2000
PublicationDate 20190900
2019-09-00
20190901
PublicationDateYYYYMMDD 2019-09-01
PublicationDate_xml – month: 09
  year: 2019
  text: 20190900
PublicationDecade 2010
PublicationPlace Cambridge, UK
PublicationPlace_xml – name: Cambridge, UK
– name: Cambridge
PublicationTitle Theory and practice of logic programming
PublicationTitleAlternate Theory and Practice of Logic Programming
PublicationYear 2019
Publisher Cambridge University Press
Publisher_xml – name: Cambridge University Press
References S1471068419000206_ref24
S1471068419000206_ref26
S1471068419000206_ref21
S1471068419000206_ref23
Ullman (S1471068419000206_ref27) 1988
S1471068419000206_ref3
Correas (S1471068419000206_ref7) 2018; 92
S1471068419000206_ref1
Gatterbauer (S1471068419000206_ref10) 2011; 12
Estévez-Martín (S1471068419000206_ref9) 2009; 9
Guagliardo (S1471068419000206_ref11) 2017; 1
S1471068419000206_ref14
S1471068419000206_ref13
S1471068419000206_ref15
S1471068419000206_ref18
Sáenz-Pérez (S1471068419000206_ref22) 2017
Burstall (S1471068419000206_ref5) 1977; 1
S1471068419000206_ref19
Sadiq (S1471068419000206_ref20) 2004; 3
Sterling (S1471068419000206_ref25) 1994
S1471068419000206_ref6
Mitrovic (S1471068419000206_ref17) 2012; 1
Javid (S1471068419000206_ref16) 2012
S1471068419000206_ref8
Guo (S1471068419000206_ref12) 1996; 21
Brass (S1471068419000206_ref4) 2006; 5
Apt (S1471068419000206_ref2) 2003
References_xml – ident: S1471068419000206_ref1
– volume-title: Principles of Database and Knowledge-Base Systems
  year: 1988
  ident: S1471068419000206_ref27
– ident: S1471068419000206_ref3
– ident: S1471068419000206_ref24
  doi: 10.1109/ICTAI.2013.155
– ident: S1471068419000206_ref26
– volume: 1
  start-page: 39
  year: 2012
  ident: S1471068419000206_ref17
  article-title: Fifteen years of constraint-based tutors: what we have achieved and where we are going
  publication-title: User Modeling and User-Adapted Interaction 22
  doi: 10.1007/s11257-011-9105-9
– ident: S1471068419000206_ref21
– volume: 1
  start-page: 27
  year: 2017
  ident: S1471068419000206_ref11
  article-title: A Formal Semantics of SQL Queries, Its Validation, and Applications
  publication-title: Proceedings of the VLDB Endowment 11
  doi: 10.14778/3151113.3151116
– volume: 1
  start-page: 44
  year: 1977
  ident: S1471068419000206_ref5
  article-title: A transformation system for developing recursive programs
  publication-title: Journal of the ACM 24
  doi: 10.1145/321992.321996
– volume: 3
  start-page: 223
  year: 2004
  ident: S1471068419000206_ref20
  article-title: SQLator: An Online SQL Learning Workbench
  publication-title: SIGCSE Bulletin 36
  doi: 10.1145/1026487.1008055
– start-page: 293
  volume-title: Logic-Based Program Synthesis and Transformation
  year: 2017
  ident: S1471068419000206_ref22
  doi: 10.1007/978-3-319-63139-4_17
– ident: S1471068419000206_ref14
– ident: S1471068419000206_ref13
  doi: 10.1007/3-540-45349-0_42
– ident: S1471068419000206_ref18
– volume: 5
  start-page: 630
  year: 2006
  ident: S1471068419000206_ref4
  article-title: Semantic Errors in SQL Queries: A Quite Complete List
  publication-title: The Journal of Systems and Software 79
  doi: 10.1016/j.jss.2005.06.028
– volume-title: The Art of Prolog (2nd Ed.): Advanced Programming Techniques
  year: 1994
  ident: S1471068419000206_ref25
– start-page: 239
  volume-title: Diagnosing faults in embedded queries in database applications
  year: 2012
  ident: S1471068419000206_ref16
– volume: 21
  start-page: 270
  year: 1996
  ident: S1471068419000206_ref12
  article-title: Solving satisfiability and implication problems in database systems
  publication-title: ACM Transactions on Database Systems
  doi: 10.1145/232616.232692
– volume: 9
  start-page: 415
  year: 2009
  ident: S1471068419000206_ref9
  article-title: On the Cooperation of the Constraint Domains, and in
  publication-title: Theory and Practice of Logic Programming
  doi: 10.1017/S1471068409003780
– ident: S1471068419000206_ref23
– ident: S1471068419000206_ref19
– volume: 12
  start-page: 1498
  year: 2011
  ident: S1471068419000206_ref10
  article-title: Databases will Visualize Queries too
  publication-title: Proceedings of the VLDB Endowment 4
  doi: 10.14778/3402755.3402805
– ident: S1471068419000206_ref6
– volume: 92
  start-page: 485
  year: 2018
  ident: S1471068419000206_ref7
  article-title: Enhancing set constraint solvers with bound consistency
  publication-title: Expert Systems with Applications
  doi: 10.1016/j.eswa.2017.09.056
– ident: S1471068419000206_ref8
– ident: S1471068419000206_ref15
– volume-title: Principles of Constraint Programming
  year: 2003
  ident: S1471068419000206_ref2
  doi: 10.1017/CBO9780511615320
SSID ssj0016324
Score 2.1875052
Snippet 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...
SourceID proquest
crossref
cambridge
SourceType Aggregation Database
Enrichment Source
Index Database
Publisher
StartPage 808
SubjectTerms 35th International Conference on Logic Programming
Constraint modelling
Domains
Logic programming
Original Article
Queries
Query languages
Semantics
Title Applying Constraint Logic Programming to SQL Semantic Analysis
URI https://www.cambridge.org/core/product/identifier/S1471068419000206/type/journal_article
https://www.proquest.com/docview/2300618315
Volume 19
WOSCitedRecordID wos000487090500012&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
journalDatabaseRights – providerCode: PRVPQU
  databaseName: Advanced Technologies & Aerospace Database
  customDbUrl:
  eissn: 1475-3081
  dateEnd: 20241207
  omitProxy: false
  ssIdentifier: ssj0016324
  issn: 1471-0684
  databaseCode: P5Z
  dateStart: 20010101
  isFulltext: true
  titleUrlDefault: https://search.proquest.com/hightechjournals
  providerName: ProQuest
– providerCode: PRVPQU
  databaseName: Computer Science Database
  customDbUrl:
  eissn: 1475-3081
  dateEnd: 20241207
  omitProxy: false
  ssIdentifier: ssj0016324
  issn: 1471-0684
  databaseCode: K7-
  dateStart: 20010101
  isFulltext: true
  titleUrlDefault: http://search.proquest.com/compscijour
  providerName: ProQuest
– providerCode: PRVPQU
  databaseName: ProQuest Central
  customDbUrl:
  eissn: 1475-3081
  dateEnd: 20241207
  omitProxy: false
  ssIdentifier: ssj0016324
  issn: 1471-0684
  databaseCode: BENPR
  dateStart: 20010101
  isFulltext: true
  titleUrlDefault: https://www.proquest.com/central
  providerName: ProQuest
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwpV3NS8MwFA-6efDi_MTpHD14EoP9SNvkoqhsCI5RncrwUpovENyHW_XvN69NN4awi5cekj5I815efs17eT-EzjM3VIKGEmeu9jGhSmNuUDLmQrucx8Yiiizft17c79PhkCX2wG1u0yorn1g4ajkRcEZ-ZaCy2Xpo4IU30y8MrFEQXbUUGpuo7vm-B3b-GONFFAFKkRe3i2LI7qGkimpCyWhohDaPFdG4ldoKq3vUqosu9p1u478j3kU7FnE6t6WJ7KENNd5HjYrNwbGL-wBdAyCFS08OkHgW1BG5A1TMwknKJK4RdOYTZ_DUcwZqZHRi-qqqJofotdt5uX_All0BC4MZcsy49CJXsizzmR_pSBj1eERLoTg3KClyGVUkljQMtSacMCK1BLAg4CckYjQ4QrXxZKyOkeORzBcyiEDC-ARKtQ7jQGShJtpnKmiiy8XcpnaNzNMyvyxO_6iiidxq-lNhK5XDV3-uE7lYiEzLMh3rXm5VCluOZqmtk_Xdp2jbgCabZ9ZCtXz2rc7QlvjJP-azNqrfdfrJc7swRPNMwvdf0pzfLA
linkProvider ProQuest
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMw1V3JTsMwEB2xSXChrGIp4ANcEBZZnMQ-AEIsArVUIBZxC4kXCYm2QAOIn-Ib8WQpqpB648DVzkR2ZjLzkhm_AdhMnEBLHiiaOMajjGtDU4uSaSqNk6aRtYi8yveuGbVa_P5eXI7AV3UWBssqK5-YO2rVlfiPfNdCZRt6uO8GB88vFLtGYXa1aqFRmEVDf37YT7be3vmx1e-W552e3Byd0bKrAJU2VmZUpMoNHSWSxBNeaEJpl-Uyo6ROU4sOQkdwzSLFg8AYljLBlFEYJCWC71Bw3953FMaZzyPk6m9EtJ-1QOrz_DRThNVEnFVZVKSoxkEcc0We_RvgchiMiYMhIY9zp7X_9oRmYLpE1OSweAVmYUR35qBWdasgpfOah30E3Hioi2CT0rw1Rkaw1bQkl0WRWhsnsy65vmqSa922NmfnKtaWBbj9k10swlin29FLQFyWeFL5IUpYn8e5MUHkyyQwzHhC-8uw09dlXPqAXlzUz0XxL9Uvg1OpO5YlEzvu-mmYyHZf5LmgIRl2cb0ykJ_V_FjHyvDpDZg8u7loxs3zVmMVpixALGvq6jCWvb7pNZiQ79lj73U9N34CD39tS9-LsDoR
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajournal&rft.genre=article&rft.atitle=Applying+Constraint+Logic+Programming+to+SQL+Semantic+Analysis&rft.jtitle=Theory+and+practice+of+logic+programming&rft.au=S%C3%81ENZ-P%C3%89REZ%2C+FERNANDO&rft.date=2019-09-01&rft.issn=1471-0684&rft.eissn=1475-3081&rft.volume=19&rft.issue=5-6&rft.spage=808&rft.epage=825&rft_id=info:doi/10.1017%2FS1471068419000206&rft.externalDBID=n%2Fa&rft.externalDocID=10_1017_S1471068419000206
thumbnail_l http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/lc.gif&issn=1471-0684&client=summon
thumbnail_m http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/mc.gif&issn=1471-0684&client=summon
thumbnail_s http://covers-cdn.summon.serialssolutions.com/index.aspx?isbn=/sc.gif&issn=1471-0684&client=summon