Font Size: a A A

Research On Automatic Scoring Algorithm For SQL Code Of A Relational Database

Posted on:2019-11-24Degree:MasterType:Thesis
Country:ChinaCandidate:J J WuFull Text:PDF
GTID:2428330548987421Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the increasing demand for data,it becomes more and more important to manipulate data.Because Structured Query Language(SQL)is an important practical language of the database,learning and understanding SQL code is beneficial for understanding the database,and providing better technical assistance for other tools which require database technology.Therefore,the understanding and skilled operating of SQL code can improve the quality of database course teaching effectively.In order to improve the efficiency and accuracy of evaluating the SQL code,it is necessity to study a set of automatic scoring models of SQL code and to develop the supporting system based on the models.In this thesis,based on studying some automatic scoring algorithms and systems of computer program code in home and abroad,two kinds of SQL code automatic scoring models are proposed in view of the structure measurement technology:the SQL code scoring model by LCS and the SQL code scoring model based on the weighted hierarchical node matching.An automatic evaluation system is designed and implemented based on the two models above.The students' scores and comments can be obtained by comparing the reference answer and the SQL code which is uploaded by students.Then,teacher and students can view the results in the system.The SQL code scoring model based on LCS is as follows:firstly,the SQL code is preprocessed,and the characteristics of the code is extracted by analyzing the semantic structure of SQL code paragraph and the word segment is executed at the same time.Secondly,a synonymous library of SQL code is built and the code snippet after the word segmentation is synonymy transformed.And then the longest common substring algorithm is used to calculate the similarity of code fragments and the impact factor of each fragment is set,which can be used for obtaining the total similarity between the SQL code paragraph and the referenced code.Finally,the scores and comments of the SQL code is assessed by the corresponding automatic scoring strategy which is developed by analyzing the manual scoring data.The SQL code scoring model based the weighted hierarchical node matching also removes and processes some SQL code statements.Secondly,the model analyzes the lexical structure of SQL code,tags the feature,and inherits the synonymous library based on the LCS model.Then according to the tags,the tree nodes from the SQL code are extracted for building the SQL statement tree.The weights of tree nodes and sub-tree of the SQL statement are determined,and the similarity of the tree is matched and obtained,which actually is the similarity between the provided SQL code and referenced code.Finally,according to the manual scoring data,the approximate data is handled by polynomial fitting which is used for formulating the corresponding scoring strategy and the final score result of the SQL code can be obtained.
Keywords/Search Tags:Code Automatic Scoring, Structured Query Language, Weight hierarchy, Longest Common Substring, Synonymous library
PDF Full Text Request
Related items