eQsplain

A deep learning approach for generating natural language explanations of SQL queries

Try it out!   eQsplain is now live, feel free to test it!

Motivation

In the age of the data revolution, more and more human activities, from business operations to medical research are dependant on data. At the same time, immense amounts of information are stored in relational databases, which remain inaccessible without the knowledge of certain query languages is required. While many research efforts are being made towards the translation of text to SQL, this does not suffice in order to create a complete Natural Language Interface (NLI) for Databases. The reverse process (SQL-to-text) is of equal importance in order for the user to seamlessly use a database with only their native language.


eQsplain generates query explanations, facilitating the use of databases by users without technical knowledge

About eQsplain

Model and Capabilities

The system is based on the T-5 Transformer-based Pre-trained Language Model, taking advantage of its capabilities to generate fluent and human-like natural language. eQsplain can learn to generate explanations for multiple query languages, such as SQL and SPARQL, as it is also demonstrated in our live demo.

Examples

Here are some SQL examples from the usecases of the INODE project, along with explanations generated by eQsplain, that help the user understand the intent of the query.

Research Project Management

SELECT m.title
FROM people p, projects pr, project_programmes pm, programmes m
WHERE p.unics_id = pr.principal_investigator
    AND pr.unics_id = pm.project
    AND pm.programme = m.code
    AND p.full_name = 'Georgia Koutrika'
Find programmes of projects, for projects led by people whose full name is Georgia Koutrika.

Astronomy

SELECT p.u, p.g, p.r, p.i, p.z
FROM specobj s, photoobj p
WHERE s.bestobjid = p.objid
    AND s.class = 'QSO'
Find the magnitude u, magnitude g, magnitude r, magnitude i and magnitude z of photometric objects, for photometric objects corresponding to spectroscopic objects. Consider only spectroscopic objects whose class is QSO.

Cancer Research

SELECT DISTINCT  d.name , pvalue,  expression_change_direction
FROM differential_expression AS de
	JOIN disease AS d ON d.id = de.doid
WHERE gene_symbol in ('A1CF')
    AND pvalue < 0.01;
Obtain a list of the cancer types that gene 'A1CF' is differentially expressed in with a p value cut off of < 0.01

Key Persons