Related Experiment Video
Updated: Jan 21, 2026

Executing Complexity-Increasing Queries in Relational MySQL and NoSQL MongoDB and EXist Size-Growing ISO/EN 13606 Standardized EHR Databases
Published on: March 19, 2018
RATest: Explaining Wrong Relational Queries Using Small Examples
Zhengjie Miao1, Sudeepa Roy1, Jun Yang1
1Duke University.
Abstract:
We present a system called RATEST, designed to help debug relational queries against reference queries and test database instances. In many applications, e.g., classroom learning and regression testing, we test the correctness of a user query Q by evaluating it over a test database instance D and comparing its result with that of evaluating a reference (correct) query Q 0 over D. If Q(D) differs from Q 0(D), the user knows Q is incorrect. However, D can be large (often by design), which makes debugging Q difficult. The key idea behind RATEST is to show the user a much smaller database instance D' ⊆ D, which we call a counterexample, such that Q(D') ≠ Q 0(D'). RATEST builds on data provenance and constraint solving, and employs a suite of techniques to support, at interactive speed, complex queries involving differences and group-by aggregation. We demonstrate an application of RATEST in learning: it has been used successfully by a large undergraduate database course in a university to help students with a relational algebra assignment.
Related Concept Videos
Newton's Third Law: Examples
Free Body Diagrams: Examples
Relative Risk
Relative Velocity in One Dimension
Relation of DFT to z-Transform
To understand how the DFT works, it's helpful to consider the z-transform, which is a method for representing discrete sequences in the complex frequency domain. The z-transform involves summing the...
Maxwell's Thermodynamic Relations
All thermodynamic potentials are exact differentials. Therefore, their second-order...

