主权项 |
1. A method of converting data of a database (DB) and creating an eXtensible Markup Language (XML) document, comprising:
designing a source XML document provided with user-defined tags; separating the source XML document into an XML document for normal data conversion which is used when converting normal data, among structural data of the source XML document, and an XML document for repetitive data conversion which is used when converting repetitive data; generating a Structured Query Language (SQL) query statement for data to be converted in a DB; executing the SQL query statement on the DB and thereafter storing resulting data obtained as a result of executing the SQL query statement in a storage sheet; mapping the structural data of the source XML document to the resulting data stored in the storage sheet; and creating a new XML document by replacing the structural data of the source XML document with the resulting data stored in the storage sheet; wherein at the generating the SQL query statement, the SQL query statement comprises:
a main query statement for loading primary keys of large-capacity data included in the DB;a main sub-query statement for connecting a plurality of pieces of table information using the primary keys and then loading the normal data; anda sub-query statement for connecting a plurality of pieces of table information using the primary keys and then loading the repetitive data; wherein at the storing the resulting data, the storage sheet comprises:
a normal data storage sheet for storing the normal data; anda repetitive data storage sheet for storing the repetitive data; wherein at the storing the resulting data, a method of storing the normal data of the resulting data comprises:
executing the main query statement and storing values of the primary keys and a number of results of execution of the main query statement in the normal data storage sheet; andexecuting the main sub-query statement a number of times identical to the number of results of the execution of the main query statement and storing resulting data obtained from the execution in the normal data storage sheet; and wherein at the storing the resulting data, a method of storing the repetitive data of the resulting data comprises:
executing the main query statement and storing values of the primary keys in the repetitive data storage sheet; andexecuting the sub-query statement and storing resulting data obtained from the execution in the repetitive data storage sheet. |