By Bikash Chandra

Grading student SQL queries is usually done by manually checking whether the SQL query submitted by the student matches the correct query or by comparing the results of student SQL queries with that of correct queries on fixed datasets. Manual checking is cumbersome and error-prone since students may write queries in a variety of different ways, while using fixed datasets (independent of the query) may fail to catch errors in student queries. Also for the purpose of grading, incorrect SQL queries should be awarded partial marks.

The XData system developed at IIT Bombay address the problem of grading student SQL queries in the following ways:

  • Instructors can specify one or more correct queries, and the system will automatically generate datasets that are designed to catch errors on the correct queries.
  • For each student query, the query results on these datasets are then compared with the results of the instructor query. Student queries that give different results from the instructor query are marked as incorrect.
  • In case the student query is incorrect, the XData system awards partial marks to the student query based the edit distance of the student query to a correct query.

The grading system has a number of useful features, including

  • Support for creating multiple assignments, with multiple schemas and multiple datasets.
  • Graded as well as self-learning modes in assignments.
  • Deadlines, and support for late submission with penalty.
  • Easy integration with learning management systems such as Moodle, Blackboard, Canvas, etc., based on the LTI standard.

Software: Grading system

Currently XData is only available as software for you to download and install on your server; you can do so either using Docker (recommended, since it can be used on any platform, without any configuration) or using an install shell script.

  • The grading system can be tried using the docker container available here. Documentation on setting up docker is available here
  • Documentation on installation and usage is available here.
  • The installer is available here. Prerequisite: Apache Tomcat (available for download from tomcat download link).
  • Source code is available at https://gitlab.com/xdata/xdata-web. Instructions on setting up the source code is available here
  • Contact: xdata@cse.iitb.ac.in


  • Test Data Generation for Database Applications Pooja Agrawal, Bikash Chandra, K. Venkatesh Emani, Neha Garg, S. Sudarshan

    34th IEEE International Conference on Data Engineering (ICDE), 2018

    (demo paper)

  • Partial Marking for Automated Grading of SQL Queries Bikash Chandra, Mathew Joseph, Bharath Radhakrishnan, Shreevidhya Acharya, S. Sudarshan

    42nd International Conference on Very Large Data Bases (VLDB), 2016

    (demo paper)

  • Data Generation for Testing and Grading SQL Queries Bikash Chandra,Bhupesh Chawda, Biplab Kar, K. V. Maheshwara Reddy, Shetal Shah, S. Sudarshan

    VLDB Journal, Volume 24, Issue 6, 2015

    (paper, Pre-print version)

  • The XDa-TA System for Automated Grading of SQL Query Assignments Amol Bhangdiya, Bikash Chandra, Biplab Kar, Bharath Radhakrishnan, K. V. Maheshwara Reddy, Shetal Shah, S. Sudarshan

    31st IEEE International Conference on Data Engineering (ICDE), 2015

    (demo paper)

  • Extending XData to kill SQL query mutants in the wild Bikash Chandra, Bhupesh Chawda, Shetal Shah, S. Sudarshan, Ankit Shah

    Procs. of the Sixth International Workshop on Testing Database Systems (DBTest), 2013

    (paper, talk, talk with audio recording)

  • Generating Test Data for killing SQL Mutants: A Constraint-based Approach Shetal Shah, S. Sudarshan, Suhas Kajbaje, Sandeep Patidar, Bhanu Gupta and Devang Vira

    27th IEEE International Conference on Data Engineering (ICDE), 2011

    (paper, talk, teaser slide)

  • X-Data: Generating Test Data for Killing SQL Mutants Bhanu Pratap Gupta, Devang Vira, S. Sudarshan

    26th IEEE International Conference on Data Engineering (ICDE), 2010 (Short paper)



XData has been developed by a number of students of the CSE Department, IIT Bombay, under the guidance of Prof. S. Sudarshan, over the course of several years.
Current Team Members: Bikash Chandra, Aarti Sharma, Ravi Shankar Karnam
Alumni: Ananyo Banerjee, Udbhas Hazra, Shreevidhya Acharya, Neha Garg, Mathew Joseph, Akshay Bhapat, Bharath Radhakrishnan, Shetal Shah, Amol Bhangdiya, K V Maheshwara Reddy, Biplab Kar, Ankit Shah, Bhupesh Chawda, Junaid Mohammed, Suhas Kajbaje, Sandeep Patidar, Bhanu Gupta, Devang Vira


The XData project has been partially funded by generous support from Tata Consultancy Services (TCS).