Recent studies have focused on using natural language (NL) to automatically retrieve useful data from database (DB) systems. As an important component of autonomous DB systems, the NL-to-SQL ...technique can assist DB administrators in writing high-quality SQL statements and make persons with no SQL background knowledge learn complex SQL languages. However, existing studies cannot deal with the issue that the expression of NL inevitably mismatches the implementation details of SQLs, and the large number of out-of-domain (OOD) words makes it difficult to predict table columns. In particular, it is difficult to accurately convert NL into SQL in an end-to-end fashion. Intuitively, it facilitates the model to understand the relations if a "bridge" transition representation (TR) is employed to make it compatible with both NL and SQL in the phase of conversion. In this article, we propose an automatic SQL generator with TR called GTR in cross-domain DB systems. Specifically, GTR contains three SQL generation steps: 1) GTR learns the relation between questions and DB schemas; 2) GTR uses a grammar-based model to synthesize a TR; and 3) GTR predicts SQL from TR based on the rules. We conduct extensive experiments on two commonly used datasets, that is, WikiSQL and Spider. On the testing set of the Spider and WikiSQL datasets, the results show that GTR achieves 58.32% and 71.29% exact matching accuracy which outperforms the state-of-the-art methods, respectively.
Using a traditional e-learning system, when teaching structured query language (SQL) queries in classical classrooms help instructors, to improve the students' SQL skills and learning effectiveness. ...However several problems in using e-learning as a teaching and learning assistant remain - such as difficulties in differences in learning ability and knowledge level. We solved these problems by applying an adaptation module to our e-learning system. However, we still found it required considerable effort to create enough exercises to make the adaptation effective enough. So, we developed a novel automatic question generating algorithm, named Reverse SQL Question Generation Algorithm (RSQLG), to automatically generate exercises (including both answer and question) from a source database. RSQLG reverses the traditional manual process used previously by instructors. Instead of creating questions and answers for them, RSQLG creates the answers first. The generated exercises are presented to students by applying question adaptation methodology based on student knowledge level in each supported learning objective. We evaluated the learning effectiveness of our approach by using outcome-based learning. After post-test to pre-test scores were compared, we found students using our system improved their scores by 26%. Consequently, the adaptive e-learning framework using RSQLG could be applied in any adaptive or traditional e-learning for a database course to benefit the instructors leading to less effort in exercise management and to improve the learning outcome from the students allowing as much practice as they need.
Today's software industry requires individuals who are proficient in as many programming languages as possible. Structured query language (SQL), as an adopted standard, is no exception, as it is the ...most widely used query language to retrieve and manipulate data. However, the process of learning SQL turns out to be challenging. The need for a computer-aided solution to help users learn SQL and improve their proficiency is vital. In this study, we present a new approach to help users conceptualize basic building blocks of the language faster and more efficiently. The adaptive design of the proposed approach aids users in learning SQL by supporting their own path to the solution and employing successful previous attempts, while not enforcing the ideal solution provided by the instructor. Furthermore, we perform an empirical evaluation with 93 participants and demonstrate that the employment of hints is successful, being especially beneficial for users with lower prior knowledge.