Evaluation method, system and equipment for database practical operation
By using temporary databases and third-party tools in the database practical operation assessment, the problem that DDL operations cannot be rolled back is solved, database security and assessment accuracy are improved, and the independence of each candidate is ensured.
Patent Information
- Application Number
- CN202410916320.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2024-10-15
AI Technical Summary
Existing database practical operation evaluation methods cannot effectively roll back data definition language (DDL) operations, which threatens database security and affects evaluation accuracy.
Adopt an assessment method based on a temporary database, use third-party tools to execute database operation statements written by candidates in the target database, and use preset assessment statements to score the results to avoid directly executing candidates' statements in the target database to ensure that each candidate Exclusively own a database instance.
It effectively guarantees the security of the database, improves the accuracy of assessment, prevents one candidate's wrong operation from affecting other candidates, and ensures the independence and accuracy of each candidate's assessment results.
Smart Images

Figure CN118779331A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of database practical operation evaluation, and in particular to a database practical operation evaluation method, system and device, and also to a computer-readable storage medium and a computer program product. Background Art
[0002] Databases can store large amounts of data information. By executing database operation statements written by users in the database, operations such as adding, deleting, modifying and querying data information can be performed. The automatic evaluation system for database practical operations is widely used in the examination phase of database practical operation courses.
[0003] At present, there is a lack of research on the evaluation methods of database practical operations. Existing evaluation methods for database practical operations usually rely on the database used for practical operations for evaluation operations. The database includes all database tables and data records used for practical operations. All database operation statements written by candidates are executed in the database, and after execution, the database is restored to its initial state through rollback operations to facilitate the evaluation of other candidates. This evaluation method has a significant defect, that is, the data definition language (DDL) operations cannot be effectively rolled back. This problem seriously threatens the security of the database. If the candidate accidentally operates and misuses the data definition language to delete key information in the database, it will have a serious impact on the subsequent evaluation of other candidates, resulting in misjudgment of the evaluation, such as: mistakenly judging other candidates' originally correct questions as 0 points.
[0004] Therefore, how to effectively ensure the security of the database and improve the accuracy of the evaluation is an urgent problem to be solved in the current database practical operation evaluation. Summary of the invention
[0005] The present invention mainly ensures the security of the target database in the database practical operation evaluation and improves the evaluation accuracy.
[0006] In a first aspect, an embodiment provides an evaluation method for database practice operations, comprising: obtaining data to be evaluated, the data to be evaluated comprising at least one of database operation statements and database operation results written by an examinee, the database operation result being the result returned after the examinee uses a preset third-party tool to perform a database practice operation in a preset target database and then runs a preset first evaluation statement, each of the database operation statements / each of the database practice operations corresponds to a preset scoring point, the first evaluation statement is used to evaluate the database practice operations, the target database is a database that needs to be actually connected as required by the scoring point, and each of the examinees corresponds to one target database; identifying the database operation statements and / or the database operation results included in the data to be evaluated, and each of the examinees corresponds to one target database; evaluating the database operation statements based on a temporary database, the temporary database comprising database tables and data records required for the scoring point; and evaluating the database operation results according to a preset reference operation result.
[0007] In some embodiments, each of the scoring points corresponds to a set of scoring point data, the scoring point data at least includes an expected result and a second evaluation statement, the second evaluation statement at least includes a temporary database construction statement for constructing the temporary database and a database query statement for querying the database operation result; the evaluation of the database operation statement based on the temporary database includes: responding to the candidate's command to submit the database operation statement, constructing the temporary database according to the temporary database construction statement; initializing the temporary database; executing the database operation statement in the initialized temporary database; executing the database query statement in the initialized temporary database to obtain a temporary database result; obtaining an evaluation result based on the expected result and the temporary database result; and destroying the temporary database.
[0008] In some embodiments, obtaining the temporary database result includes: inserting the database operation statement into a preset position of the second evaluation statement to obtain an updated second evaluation statement; executing the updated second evaluation statement in the initialized temporary database to obtain the temporary database result.
[0009] In some embodiments, the scoring point data also includes a score; obtaining the evaluation result based on the expected result and the temporary database result includes: comparing the expected result with the temporary database result; determining whether the comparison result meets a preset condition; if so, scoring the scoring point according to the score; otherwise, the scoring point is scored as zero.
[0010] In some embodiments, each of the scoring points corresponds to a set of scoring point data, and the scoring point data includes at least a first evaluation statement; the evaluating the database operation result according to the preset reference operation result includes: obtaining the examinee's instructions for performing database practice operations based on the third-party tool, and the instructions include at least the name of the target database and practice operation instructions; connecting to the target database according to the name; executing the practice operation instructions in the target database; executing the first evaluation statement in the target database to obtain the database operation result; and evaluating the database operation result according to the reference operation result.
[0011] In some embodiments, the scoring point data also includes a score; the evaluating the database operation result based on the reference operation result includes: comparing the reference operation result with the database operation result; determining whether the comparison result meets a preset condition; if so, scoring the scoring point according to the score; otherwise, the scoring point is scored as zero.
[0012] In a second aspect, another embodiment provides an evaluation system for database practical operations, including:
[0013] A data acquisition module is used to acquire data to be evaluated, wherein the data to be evaluated includes at least one of database operation statements and database operation results written by the examinee, wherein the database operation result is the result returned after the examinee uses a preset third-party tool to perform database practice operations in a preset target database and then runs a preset first evaluation statement, each of the database operation statements / each of the database practice operations corresponds to a preset scoring point, the first evaluation statement is used to evaluate the database practice operations, the target database is a database that needs to be actually connected as required by the scoring point, and each of the examinees corresponds to one target database; a data identification module is used to identify the database operation statements and / or the database operation results included in the data to be evaluated; an evaluation module is used to evaluate the database operation statements based on a temporary database, wherein the temporary database includes database tables and data records required for the scoring point; and the database operation results are evaluated according to preset reference operation results.
[0014] In a third aspect, another embodiment provides an evaluation device for database practice operations, including: a memory for storing a computer program; and a processor for implementing the aforementioned method by executing the computer program stored in the memory.
[0015] In a fourth aspect, another embodiment provides a computer-readable storage medium, on which a computer program is stored, and the computer program can be executed by a processor to implement the method as described above.
[0016] In a fifth aspect, another embodiment provides a computer program product, comprising a computer program and / or instructions, which implement the aforementioned method when executed by a processor.
[0017] According to the evaluation method for database practice operation in the above-mentioned embodiment, in the evaluation of database practice operation, the database operation statements are evaluated based on the temporary database. In the evaluation, there is no need to execute the database operation statements written by the examinee in the target database, which effectively ensures the security of the target database in the evaluation of database practice operation and improves the evaluation accuracy. The database operation results are evaluated according to the preset reference operation results. The database operation results are the results of the examinee running the preset first evaluation statement after executing the database practice operation in the preset target database using a preset third-party tool. Each examinee corresponds to a target database. The erroneous operation of one examinee will not affect the target databases of other examinees, which further ensures the accuracy of the evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of the evaluation method for the practical operation of the database provided by the present invention;
[0019] Figure 2 A flowchart of an embodiment of evaluating a database operation statement based on a temporary database;
[0020] Figure 3 A flowchart of obtaining a temporary database result according to an embodiment;
[0021] Figure 4 A flowchart of an embodiment of obtaining an evaluation result based on an expected result and a temporary database result;
[0022] Figure 5 A flowchart of an embodiment of evaluating a database operation result according to a preset reference operation result;
[0023] Figure 6 A flowchart of an embodiment of obtaining an evaluation result based on a reference operation result and a database operation result;
[0024] Figure 7 A structural diagram of the evaluation system for database practical operations provided by the present invention;
[0025] Figure 8 A structural diagram of the evaluation device for the practical operation of the database provided by the present invention;
[0026] Fig. 9 A structural diagram of a computer-readable storage medium provided for the present invention. DETAILED DESCRIPTION
[0027] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.
[0028] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.
[0029] The serial numbers assigned to the components in this article, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning.
[0030] Please refer to Figure 1 An embodiment of the present invention provides a method for evaluating a database practice operation, comprising:
[0031] S10: Obtain the data to be evaluated, which includes at least one of the database operation statements and database operation results written by the examinee. The database operation result is the result returned after the examinee uses a preset third-party tool to perform database practical operations in a preset target database and then runs a preset first evaluation statement. Each database operation statement / each database practical operation corresponds to a preset scoring point. The first evaluation statement is used to evaluate the database practical operation. The target database is a database that needs to be actually connected as required by the scoring point. Each examinee corresponds to a target database.
[0032] In some embodiments, the database is a relational database, which refers to a database that uses a relational model to organize data. It stores data in the form of rows and columns to facilitate user understanding. This series of rows and columns of a relational database is called a table, and a group of tables constitutes a database. By executing database operation statements written by the user in the relational database, operations such as adding, deleting, modifying and querying data information can be performed.
[0033] In some embodiments, the scoring points are set by the question setter, and one scoring point corresponds to a database practice operation question. When setting the scoring points, the question setter may require the examinee to store the written database operation statements and / or database operation results to a specified location. For example: a database practice operation question is: add a student record to the student table student in the database db_exmp (target database), with the following content: student number: s911, name: Zhang Min, gender: female; Note: please save the statement in the examination folder with the file name gf2.txt, otherwise no score will be awarded.
[0034] In some embodiments, the database is SQL server, which is a scalable, high-performance database management system designed for distributed client / server computing. Database operation statements and database practical operations are SQL statements (Structured Query Language).
[0035] In some embodiments, the question setter can also set whether the scoring points require or do not require uploading of database operation statements. When it is set to require uploading of database operation statements, the database operation statements are evaluated based on a temporary database. When it is set to not require uploading of database operation statements, the database operation results are evaluated based on preset reference operation results.
[0036] In some embodiments, when a scoring point is set to not require uploading of database operation statements, the examinee uses a third-party tool to perform database practice operations in a preset target database. The third-party tool can be any one of the existing database management tools (such as: Navicat, DBeaver, DMExpress, Chat2DB, SQL Studio, and database terminal command line, etc.).
[0037] In some embodiments, the database is a SQL server, and the first assessment statement may be a SELECT statement, the purpose of which is to query the results of the examinee using a third-party tool to operate the target database, such as:
[0038] (1) If the examinee uses a third-party tool to "add" a data record to a database table in the target database, the first assessment statement is to "query" whether the data added by the examinee exists, and the database operation result is the "added" data record;
[0039] (2) If the examinee uses a third-party tool to "delete" a data record from a database table in the target database, the first assessment statement is to "query" whether the data deleted by the examinee exists. The database operation result does not include the "deleted" data (because the data has been deleted and cannot be queried).
[0040] In some embodiments, the ability of candidates to use database management tools can be examined by evaluating the results of database operations, thereby expanding the evaluation scope of database practical operations. In addition, since each candidate corresponds to a target database, the target database operated by each candidate is unique. The erroneous operation of one candidate will not affect the target databases of other candidates, and therefore will not affect the evaluation results of other candidates, thereby effectively ensuring the accuracy of the evaluation.
[0041] S20: Identify database operation statements and / or database operation results included in the data to be evaluated.
[0042] S30: Evaluate the database operation statements based on the temporary database, where the temporary database includes database tables and data records required for the scoring points.
[0043] The present invention adopts a temporary database-based assessment of database operation statements. There is no need to execute the database operation statements written by candidates in the target database. The assessment of each scoring point is independent and will not affect each other, which effectively ensures the security of the target database in the database practice operation assessment.
[0044] In some embodiments, each scoring point corresponds to a set of scoring point data, the scoring point data includes at least an expected result and a second evaluation statement, the second evaluation statement includes at least a temporary database construction statement for constructing a temporary database and a database query statement for querying a database operation result; the database operation statement is evaluated based on the temporary database, such as Figure 2 As shown, including:
[0045] S31: In response to the candidate's command to submit a database operation statement, a temporary database is constructed according to a temporary database construction statement.
[0046] In some embodiments, when the examinee is required to upload a database operation statement, a temporary database can be created through a second evaluation statement; the creation of a temporary database can also be set as a scoring point, that is, the examinee needs to write the database operation statement to create a temporary database by himself.
[0047] S32: Initialize the temporary database.
[0048] S33: Execute database operation statements in the initialized temporary database.
[0049] In some embodiments, a temporary database result is obtained, such as Figure 3 As shown, including:
[0050] S330: Inserting the database operation statement into the preset position of the second evaluation statement to obtain an updated second evaluation statement.
[0051] In some embodiments, the position where the database operation statement is inserted into the second evaluation statement is set by the question setter based on the question information.
[0052] S331: Execute the updated second evaluation statement in the initialized temporary database to obtain the temporary database result.
[0053] In some embodiments, after obtaining the command for the examinee to submit a database operation statement, the updated second assessment statement is executed, a temporary database is first built according to the temporary database construction statement, database practice operations are performed according to the database operation statement, and database query statements are executed in the temporary database to obtain temporary database results.
[0054] In some embodiments, the database is a SQL server, and the database query statement may be a SELECT statement, the purpose of which is to query the database results after the database operation statement written by the candidate is executed in the temporary database, for example:
[0055] (1) If the examinee "adds" a data record to a database table in the temporary database, the database query statement is to "query" whether the data record added by the examinee exists, and the temporary database result is the "added" data record;
[0056] (2) If the examinee "deletes" a data record from a database table in the temporary database, the database query statement is to "query" whether the data record deleted by the examinee exists. The temporary database result does not contain the "deleted" data (because the data has been deleted and cannot be queried).
[0057] S34: Execute a database query statement in the initialized temporary database to obtain a temporary database result.
[0058] S35: Obtain evaluation results based on expected results and temporary database results.
[0059] In some embodiments, the scoring point data also includes a score; based on the expected result and the temporary database result, the evaluation result is obtained, such as Figure 4 As shown, including:
[0060] S341: Compare the expected result with the temporary database result.
[0061] S342: Determine whether the comparison result meets a preset condition.
[0062] In some embodiments, the preset condition is that the expected result is completely consistent with the temporary database result, and the scoring point data also includes a score. For example, the score of scoring point 1 is 6 points. When the expected result corresponding to scoring point 1 is completely consistent with the temporary database result, scoring point 1 is scored as 6 points, otherwise it is scored as 0 points. Other preset conditions can be set when applying, and this article does not limit them.
[0063] S343: If yes, score the scoring point according to the score.
[0064] S344: Otherwise, the scoring point is counted as zero.
[0065] S36: Destroy the temporary database.
[0066] In some embodiments, the temporary database is destroyed after the evaluation of the scoring point is completed, and no unnecessary data or information will be left, thereby keeping the evaluation system clean and tidy.
[0067] In some embodiments, the scoring point data also includes scoring point names, which are preset by the question setter to identify each scoring point.
[0068] The following uses SQL server as an example to illustrate the evaluation method of obtaining evaluation results based on expected results and temporary database results. The details are as follows:
[0069] 1. The database practice operation topic is: The constructed target database db_exam1 includes two database tables, one of which is the score table score, which includes four fields: id (number), stuid (student number), cname (course name) and grade (score); the other is the student table student, which includes three fields: stuid (student number), name (name), and sex (gender); please write an SQL statement to add a student record to the student table student, the content is as follows: student number: s911, name: Zhang Min, gender: female; Note: please save the statement in the examination folder with the file name gf2.txt, otherwise no score will be given.
[0070] 2. The preset scoring points corresponding to the above database practice operation questions are as follows:
[0071] "Scoring point name: add a student record to the student table student
[0072] Do you need to upload SQL statements: Yes, upload to SQL file gf2.txt
[0073] Second evaluation statement:
[0074] CREATE TABLE student(stuid varchar(20),name varchar(20),sex char(1)); -- SQL statement for creating a temporary database
[0075] INSERT INTO student -- SQL statement for adding data records
[0076] VALUES
[0077] ('s901','Zhang','Male'),
[0078] ('s902','Guan','Male'),
[0079] ('s903','Xiaofang','Female'),
[0080] ('s904','Liu','Male'),
[0081] ('s905','Song','Female'),
[0082] ('s906','Zhao','Male);
[0083] #(STUDENT_SQL); -- Database operation statement inserted into the position of the assessment statement
[0084] SELECT * FROM student WHERE stuid ='s911'; -- Database query statement
[0085] Expected result:
[0086] stuid|name|sex
[0087] s911|Zhang Min|Female
[0088] Score: 6;
[0089] 3. The database operation statement submitted by the candidate is:
[0090] insert into student(stuid,name,sex) values('s911','Zhang Min','Male');
[0091] 4. After obtaining the database operation statement submitted by the candidate, the updated second assessment statement is as follows:
[0092] CREATE TABLE student(stuid varchar(20),name varchar(20),sex char(1)); -- SQL statement to create a temporary database
[0093] INSERT INTO student -- SQL statement to add data records
[0094] VALUES
[0095] ('s901','Zhang','Male'),
[0096] ('s902','Guan','Male'),
[0097] ('s903','Xiaofang','Female'),
[0098] ('s904','Liu','Male'),
[0099] ('s905','Song','Female'),
[0100] ('s906','Zhao','Male);
[0101] insert into student(stuid,name,sex)values('s911','Zhang Min','Male); -- Database operation statement submitted by the candidate
[0102] SELECT*FROM student WHERE stuid='s911' -- Database query statement
[0103] 3. After executing the second evaluation statement after the above update, the result of the temporary database returned is:
[0104] "stuid|name|sex
[0105] s911|Zhang Min|Male";
[0106] 4. If the expected result is not exactly the same as the result of the temporary database, this scoring point is counted as 0 points.
[0107] S40: Evaluate the database operation result according to the preset reference operation result.
[0108] In some embodiments, the examinee uses a third-party tool to connect to and operate the target database. After the operation is completed, the first assessment statement is executed in the target database to obtain the database operation result, and then the assessment result is obtained by comparing the database operation result with the preset reference operation result. Since the target database operated by each examinee is unique, the erroneous operation of one examinee will not affect the target database of other examinees, which effectively ensures the security of the target database in the database practice operation assessment.
[0109] In some embodiments, each scoring point corresponds to a set of scoring point data, and the scoring point data at least includes an evaluation statement; the database operation result is evaluated according to a preset reference operation result, such as Figure 5 As shown, including:
[0110] S41: Obtaining instructions for the examinee to perform practical operations on the database based on the third-party tool, where the instructions at least include the name of the target database and practical operation instructions.
[0111] In some embodiments, the practice operation instructions are automatically generated by a third-party tool in response to the candidate's database practice operation.
[0112] S42: Connect to the target database according to the name.
[0113] S43: Execute the practice operation instruction in the target database.
[0114] S44: Execute the first evaluation statement in the target database to obtain a database operation result.
[0115] S45: Evaluate the database operation results according to the reference operation results.
[0116] In some embodiments, the scoring point data also includes a score; the database operation result is evaluated according to the reference operation result, such as Figure 6 As shown, including:
[0117] S430: Compare the reference operation result with the database operation result.
[0118] S431: Determine whether the comparison result meets a preset condition.
[0119] In some embodiments, the preset condition is that the reference operation result is completely consistent with the database operation result, and the scoring point data also includes a score. For example, the score of scoring point 2 is 6 points. When the reference operation result corresponding to scoring point 2 is completely consistent with the database operation result, scoring point 2 is scored as 6 points, otherwise it is scored as 0 points. Other preset conditions can be set during application, which are not limited in this article.
[0120] S432: If yes, score the scoring point according to the score.
[0121] S433: Otherwise, the scoring point is counted as zero.
[0122] The following uses SQL server as an example to illustrate the evaluation method for obtaining evaluation results based on reference operation results and database operation results. The details are as follows:
[0123] 1. The database practice operation topic is: Create a department table dept in the target database db_exmp, which includes three fields: deptno (department number (integer, primary key)), dname (department name (fixed-length string, length 20, cannot be empty)) and addr (department address (variable-length string, maximum length 50));
[0124] 2. The scoring data corresponding to the above database practical operation questions are as follows:
[0125] Scoring point name: Create a new department table dept
[0126] Do you need to upload SQL statements: No
[0127] First review statement:
[0128] SELECT column_type,column_key FROM information_schema.`COLUMNS`WHERETABLE_NAME='dept'and column_name='deptno';
[0129] Reference operation results:
[0130] column_type|column_key
[0131] int(11)|PRI
[0132] Score: 2;
[0133] 3. After the examinee uses a third-party tool to complete the database practice operation of creating a department table dept in the target database db_exmp, the database operation result obtained after executing the first assessment statement above is:
[0134] column_type|column_key
[0135] int(11)|PRI;
[0136] 4. If the reference operation result is completely consistent with the database operation result, 2 points will be awarded for this scoring point.
[0137] Please refer to Figure 7Another embodiment of the present invention provides an evaluation system for database practice operations, including: a data acquisition module 10, used to acquire data to be evaluated, the data to be evaluated include at least one of database operation statements and database operation results written by the examinee, the database operation result is the result returned after the examinee uses a preset third-party tool to perform a database practice operation in a preset target database and then runs a preset first evaluation statement, each database operation statement / each database practice operation corresponds to a preset scoring point, the first evaluation statement is used to evaluate the database practice operation, the target database is a database that needs to be actually connected as required by the scoring point, and each examinee corresponds to a target database; a data identification module 20, used to identify the database operation statements and / or database operation results included in the data to be evaluated; an evaluation module 30, used to evaluate the database operation statements based on a temporary database, the temporary database includes database tables and data records required by the scoring point; and the database operation results are evaluated according to the preset reference operation results.
[0138] In some embodiments, the system further includes a question setting module 40 , through which a question setter sets database practice operation questions and scoring point data.
[0139] In some embodiments, the system further includes a data storage module 50, which is used to store information such as scoring point data, question setting records, answering records, and scoring results, and to visualize the results based on the information stored in the data storage module 50.
[0140] In some embodiments, the system further includes a question answering module 60, which is used for examinees to answer questions and submit them.
[0141] The specific implementation of the database practical operation evaluation system provided by the present invention is the same as the specific implementation of the aforementioned database practical operation evaluation method, which will not be repeated herein.
[0142] Please refer to Figure 8 Another embodiment of the present invention provides an evaluation device for database practice operations, including: a memory 70 for storing computer programs; a processor 80 for implementing the aforementioned method by executing the computer program stored in the memory 70.
[0143] Please refer to Fig. 9 Another embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. The computer program can be executed by the processor 80 to implement the aforementioned method.
[0144] Another embodiment of the present invention provides a computer program product, including a computer program and / or instructions, and the computer program and / or instructions implement the aforementioned method when executed by a processor.
[0145] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.
Claims
1. A method for evaluating database practical operations, characterized in that: include: Acquire data to be evaluated, the data to be evaluated including at least one of a database operation statement and a database operation result written by the examinee, the database operation result being a result returned after the examinee uses a preset third-party tool to perform a database practice operation in a preset target database and then runs a preset first evaluation statement, each of the database operation statements / each of the database practice operations corresponds to a preset scoring point, the first evaluation statement is used to evaluate the database practice operations, the target database is a database that needs to be actually connected as required by the scoring point, and each of the examinees corresponds to one target database; Identifying the database operation statement and / or the database operation result included in the data to be evaluated; Evaluating the database operation statements based on a temporary database, wherein the temporary database includes database tables and data records required for the scoring points; The database operation results are evaluated according to preset reference operation results.
2. The method according to claim 1, characterized in that Each of the scoring points corresponds to a set of scoring point data, the scoring point data at least includes an expected result and a second evaluation statement, the second evaluation statement at least includes a temporary database construction statement for constructing the temporary database and a database query statement for querying a database operation result; The step of evaluating the database operation statement based on the temporary database includes: In response to the candidate submitting a command for the database operation statement, the temporary database is constructed according to the temporary database construction statement; Initializing the temporary database; Execute the database operation statement in the initialized temporary database; Execute the database query statement in the initialized temporary database to obtain the temporary database result; Obtaining an evaluation result according to the expected result and the temporary database result; Destroy the temporary database.
3. The method according to claim 2, characterized in that The step of obtaining the temporary database result includes: Inserting the database operation statement into a preset position of the second evaluation statement to obtain an updated second evaluation statement; The updated second evaluation statement is executed in the initialized temporary database to obtain the temporary database result.
4. The method according to claim 2, characterized in that The scoring point data also includes scores; The obtaining of the evaluation result according to the expected result and the temporary database result includes: comparing the expected result with the temporary database result; Determine whether the comparison result meets the preset conditions; If yes, score the point according to the score; Otherwise, the score will be counted as zero.
5. The method according to claim 1, characterized in that Each of the scoring points corresponds to a set of scoring point data, and the scoring point data at least includes a first evaluation statement; The step of evaluating the database operation result according to the preset reference operation result includes: Obtaining instructions for the examinee to perform database practice operations based on the third-party tool, wherein the instructions at least include the name of the target database and practice operation instructions; Connecting to the target database according to the name; Execute the practical operation instruction in the target database; Execute the first evaluation statement in the target database to obtain the database operation result; The database operation result is evaluated according to the reference operation result.
6. The method according to claim 5, characterized in that The scoring point data also includes scores; The evaluating the database operation result according to the reference operation result includes: comparing the reference operation result with the database operation result; Determine whether the comparison result meets the preset conditions; If yes, score the point according to the score; Otherwise, the score will be counted as zero.
7. A database practical operation evaluation system, characterized in that: include: A data acquisition module, used for acquiring data to be evaluated, wherein the data to be evaluated includes at least one of a database operation statement and a database operation result written by the examinee, wherein the database operation result is a result returned after the examinee uses a preset third-party tool to perform a database practice operation in a preset target database and then runs a preset first evaluation statement, each of the database operation statements / each of the database practice operations corresponds to a preset scoring point, the first evaluation statement is used to evaluate the database practice operations, the target database is a database that needs to be actually connected as required by the scoring point, and each of the examinees corresponds to one target database; A data identification module, used to identify the database operation statement and / or the database operation result included in the data to be evaluated; An evaluation module, used for evaluating the database operation statement based on a temporary database, wherein the temporary database includes database tables and data records required for the scoring point; The database operation results are evaluated according to preset reference operation results.
8. A database practical operation evaluation device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 6 by executing the computer program stored in the memory.
9. A computer-readable storage medium, characterized in that: A computer program is stored on the medium, and the computer program can be executed by a processor to implement the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program and / or instructions, characterized in that: When the computer program and / or the instructions are executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Automatic scoring system and method based on intelligent power grid dispatching control system
CN110704440A
Database operation statement testing method and device, equipment and storage medium
CN117215895A
System and method for providing SQL quality analysis and SQL optimization in relational database
US20230130738A1
