DSV SU
YASQLT – Yet Another SQL Tutor
1
Ilia Bider & David Rogers
4th Symposium on
Conceptual Modeling
Education, Gifu, Japan
2016 (part of ER 2016)
A Pragmatic Approach
DSV SU
A Goal with Presentation
Present and discuss motivation, rational, ideas and result
from a pragmatic project of creating an automated
assessment tool for an introductory database course
2
DSV SU
Motivation
Context:
• a short introductory database course with 2-3 rounds a year with around
200 students: 5 weeks, 7,5 ECT points
• SQL assignment done in groups 4-6 persons
• Too much work spent on assessing assignments
• The feedback to the students comes too late, after the written exam
Needed
• A tool for automated assessment so that the students get early feedback
and submitted somewhat tested SQL
3
DSV SU
Details: Database Scheme
Example of Query:
Get the national Id, name and city of students who have participated in at least three
different courses. (group by or self-join)
4
DSV SU
Details: Typical Errors
List national ID numbers and names of students who have participated in a course with
code Java1
SELECT DISTINCT S.nationalidnumber, S.name FROM Student AS S, Participation AS P
WHERE P.course = ‘JAVA2’ (no connection between the tables)
List national ID numbers of students who have participated in a course in room Jupiter
SELECT DISTINCT student FROM Participation P, Courseround C, Room R WHERE
P.course = C.course AND C.room = R.id AND R.name='Jupiter'. (segmented key error)
5
List national ID numbers of students who
have participated in a course with code
Java1
SELECT student FROM Participation
WHERE course= 'Java1‘ (missing
DISTINCT)
DSV SU
Why to do on our own
Tried to find something in the
outer world:
Message to AISworld list – no
result
Contacting some authors of
published work – not available
After several tries decided to do
on our own
6
“I wonder whether anybody has a tool in operation for automated assessment of
assignments in a database course. In particular, we would be interested to have such a
tool for assessing assignments related to SQL, though other tools like converting UML
into Relational scheme, or assessing assignments in the area of Relational Algebra
would be also good to have. In connection to SQL, assessing assignments connected to
learning SELECT has a priority. The tool does not need to make a sophisticated
analysis of SQL statements, and it does not need to insure 100% correctness - it can
miss some incorrect statements, but shouldn't mark as incorrect correct statements. The
following scheme would do. A database is created in some popular DBMS, like
SQLserver, or MySQL, or even Access. A teacher creates a textual question, and a
corresponding SQL SELECT. The statement is run and the set of records it gives is
saved. The students are not allowed to change the content of the database. When a
student creates his/her own SELECT to answer the question, it is run against the same
database and the set produced is compared with the one stored when the teacher ran
his/her version of SELECT. If the data sets differ, the tool marks the student's SELECT
as incorrect. Any help in acquiring such a tool would be much appreciated. As
customary, a summary of responses will be reported back to the list.”
DSV SU
Pragmatic principles
• No syntax control (use standard DBMS)
• Only SELECT and CREATE VIEW (intro course)
• No semantic or optimization checks. Checks are done only (a)
whether the result of the query is correct and on typical errors
• No generic approach to semantic analysis
• Agile approach to development
7
DSV SU
Presumptions about students SQL
• Students are using “classical” SQL without inner joins, though
inner joins are not prohibited.
• Tables listed in the FROM clause are to be joined by conditions in
the WHERE clause, no Cartesian products are expected.
• Tables are joined based on foreign key - primary key
relationships, directly or indirectly (transitively). Self-join can be
used based on one or several columns with the same names.
8
DSV SU
User interface
9
DSV SU
Technical implementation
Server
• Linux (Debian), Tomcat 8 webserver (from Apache)
• UCanAcess library (MS Acess) (from Marco Amadei)
• Jackcess (from Health Market Science),
• HyperSQL (from The HSQL Development Group)
• Commons Lang, Apache Commons Logging (from Apache)
• JSqlPArser (from R. Manning)
Client
• HTML, CSS, Javascript and jQuery (from jQuery Foundation)
10
DSV SU
Preliminary results
Quality of submissions
11
Course round Passed on first submission
Spring 2015 – 1st round. No YASQLT 17% (5 of 30 groups)
Spring 2015 – 2nd round. No YASQLT 0% (0 of 21 groups)
Autumn 2015. No YASQLT 0% (0 of 11 groups)
Spring 2016 – 1st round. First edition of YASQLT 43% (13 of 30 groups)
Spring 2016 – 2nd round. Second edition of YASQLT 48% (13 of 27 groups)
DSV SU
Preliminary results
Students’ opinions on Likert scale (based on 30 answers)
12
YASQLT 5 - agree 4 3 2 1 - disagree
helped me to prepare for the exams 20.0% 26.7% 36.7% 0.0% 16.7%
helped me to learn SQL 46.7% 26.7% 13.3% 6.7% 6.7%
motivated me to test more SQL 33.3% 26.7% 13.3 20% 6.7%
DSV SU
Learning by failing
Principle: Try - Fail - Learn (from failure)
Requires: Prompt feedback and explanation of failures
Context: Large classes and short calendar time
Requires: Automated tools to discover and explain errors
Focus: On typical, often encountered errors (rather than full analysis)
YASQLT – an example of such a tool
Other areas: Errors in conceptual modeling (e.g. multiplicity), Translation
from conceptual model to relational database model
13
DSV SU
Q & A
Thank you for your patience
Questions and comments
Contact ilia@dsv.su.se
14

YASQLT – Yet Another SQL Tutor. A Pragmatic Approach

  • 1.
    DSV SU YASQLT –Yet Another SQL Tutor 1 Ilia Bider & David Rogers 4th Symposium on Conceptual Modeling Education, Gifu, Japan 2016 (part of ER 2016) A Pragmatic Approach
  • 2.
    DSV SU A Goalwith Presentation Present and discuss motivation, rational, ideas and result from a pragmatic project of creating an automated assessment tool for an introductory database course 2
  • 3.
    DSV SU Motivation Context: • ashort introductory database course with 2-3 rounds a year with around 200 students: 5 weeks, 7,5 ECT points • SQL assignment done in groups 4-6 persons • Too much work spent on assessing assignments • The feedback to the students comes too late, after the written exam Needed • A tool for automated assessment so that the students get early feedback and submitted somewhat tested SQL 3
  • 4.
    DSV SU Details: DatabaseScheme Example of Query: Get the national Id, name and city of students who have participated in at least three different courses. (group by or self-join) 4
  • 5.
    DSV SU Details: TypicalErrors List national ID numbers and names of students who have participated in a course with code Java1 SELECT DISTINCT S.nationalidnumber, S.name FROM Student AS S, Participation AS P WHERE P.course = ‘JAVA2’ (no connection between the tables) List national ID numbers of students who have participated in a course in room Jupiter SELECT DISTINCT student FROM Participation P, Courseround C, Room R WHERE P.course = C.course AND C.room = R.id AND R.name='Jupiter'. (segmented key error) 5 List national ID numbers of students who have participated in a course with code Java1 SELECT student FROM Participation WHERE course= 'Java1‘ (missing DISTINCT)
  • 6.
    DSV SU Why todo on our own Tried to find something in the outer world: Message to AISworld list – no result Contacting some authors of published work – not available After several tries decided to do on our own 6 “I wonder whether anybody has a tool in operation for automated assessment of assignments in a database course. In particular, we would be interested to have such a tool for assessing assignments related to SQL, though other tools like converting UML into Relational scheme, or assessing assignments in the area of Relational Algebra would be also good to have. In connection to SQL, assessing assignments connected to learning SELECT has a priority. The tool does not need to make a sophisticated analysis of SQL statements, and it does not need to insure 100% correctness - it can miss some incorrect statements, but shouldn't mark as incorrect correct statements. The following scheme would do. A database is created in some popular DBMS, like SQLserver, or MySQL, or even Access. A teacher creates a textual question, and a corresponding SQL SELECT. The statement is run and the set of records it gives is saved. The students are not allowed to change the content of the database. When a student creates his/her own SELECT to answer the question, it is run against the same database and the set produced is compared with the one stored when the teacher ran his/her version of SELECT. If the data sets differ, the tool marks the student's SELECT as incorrect. Any help in acquiring such a tool would be much appreciated. As customary, a summary of responses will be reported back to the list.”
  • 7.
    DSV SU Pragmatic principles •No syntax control (use standard DBMS) • Only SELECT and CREATE VIEW (intro course) • No semantic or optimization checks. Checks are done only (a) whether the result of the query is correct and on typical errors • No generic approach to semantic analysis • Agile approach to development 7
  • 8.
    DSV SU Presumptions aboutstudents SQL • Students are using “classical” SQL without inner joins, though inner joins are not prohibited. • Tables listed in the FROM clause are to be joined by conditions in the WHERE clause, no Cartesian products are expected. • Tables are joined based on foreign key - primary key relationships, directly or indirectly (transitively). Self-join can be used based on one or several columns with the same names. 8
  • 9.
  • 10.
    DSV SU Technical implementation Server •Linux (Debian), Tomcat 8 webserver (from Apache) • UCanAcess library (MS Acess) (from Marco Amadei) • Jackcess (from Health Market Science), • HyperSQL (from The HSQL Development Group) • Commons Lang, Apache Commons Logging (from Apache) • JSqlPArser (from R. Manning) Client • HTML, CSS, Javascript and jQuery (from jQuery Foundation) 10
  • 11.
    DSV SU Preliminary results Qualityof submissions 11 Course round Passed on first submission Spring 2015 – 1st round. No YASQLT 17% (5 of 30 groups) Spring 2015 – 2nd round. No YASQLT 0% (0 of 21 groups) Autumn 2015. No YASQLT 0% (0 of 11 groups) Spring 2016 – 1st round. First edition of YASQLT 43% (13 of 30 groups) Spring 2016 – 2nd round. Second edition of YASQLT 48% (13 of 27 groups)
  • 12.
    DSV SU Preliminary results Students’opinions on Likert scale (based on 30 answers) 12 YASQLT 5 - agree 4 3 2 1 - disagree helped me to prepare for the exams 20.0% 26.7% 36.7% 0.0% 16.7% helped me to learn SQL 46.7% 26.7% 13.3% 6.7% 6.7% motivated me to test more SQL 33.3% 26.7% 13.3 20% 6.7%
  • 13.
    DSV SU Learning byfailing Principle: Try - Fail - Learn (from failure) Requires: Prompt feedback and explanation of failures Context: Large classes and short calendar time Requires: Automated tools to discover and explain errors Focus: On typical, often encountered errors (rather than full analysis) YASQLT – an example of such a tool Other areas: Errors in conceptual modeling (e.g. multiplicity), Translation from conceptual model to relational database model 13
  • 14.
    DSV SU Q &A Thank you for your patience Questions and comments Contact ilia@dsv.su.se 14