Method and system for supporting XQuery trigger in XML-DBMS based on relational DBMS
First Claim
1. A method for supporting an XQuery trigger in XML-DBMS based on a relational DBMS, the method comprising:
- registering an XML schema, a relational DBMS schema, and a mapping rule of the XML schema and of the relational DBMS schema through an XML database layer so as to store, manage and search XML data in the relational DBMS schema;
creating a XQuery trigger using standard XML query language and using the registered XML schema as a XQuery target;
converting the XQuery trigger into a corresponding SQL trigger having the relational DBMS schema as a query target;
reading the mapping rule of the XML schema and of the relational DBMS schema to initially build a memory data structure;
storing the SQL trigger into a trigger table;
recording a SQL result set into a temporary table;
mapping the recorded SQL result set in the temporary table to a corresponding XML result set so that the user can access the latest result set of the automatically executed XQuery trigger;
requesting to store XML data into the relational DBMS schema;
making a Document Object Model (DOM) tree wherein the DOM tree is made in a standard format of an XML document object model of the XML data;
loading the mapping rule of the XML schema and of the relational DBMS schema;
adding the XML data into the memory data structure;
converting the DOM tree into an INSERT statement of the SQL trigger;
executing the SQL trigger in the relational DBMS schema which changes the trigger and temporary tables associated with the relational DBMS schema and the XML schema; and
informing the user that a change of the XML database and a change in the execution of the XQuery trigger has occurred whenever the XML data in the memory data structure is changed wherein the user can gain access to the latest execution result of the XQuery trigger through the XML result set that is returned when the XQuery trigger is created, whereby a query is automatically executed depending on the change of the XML data, and its result is monitored.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for supporting an XQuery trigger in XML-DBMS based on relational DBMS is provided. In an Ubiquitous environment where XML data are incessantly generated by an enormous number of objects, so as to overcome inconvenience and its resultant reduction of performance in which a user should query after checking a change of XML-DBMS one by one, in XML-DBMS based on relational DBMS, the present invention supports an XQuery trigger technique based on SQL trigger automatically executing insert, update and delete statements, and a storage or external procedure related with the change of data when a change of data is generated at a specific table in a conventional relational DBMS.
-
Citations
13 Claims
-
1. A method for supporting an XQuery trigger in XML-DBMS based on a relational DBMS, the method comprising:
-
registering an XML schema, a relational DBMS schema, and a mapping rule of the XML schema and of the relational DBMS schema through an XML database layer so as to store, manage and search XML data in the relational DBMS schema; creating a XQuery trigger using standard XML query language and using the registered XML schema as a XQuery target; converting the XQuery trigger into a corresponding SQL trigger having the relational DBMS schema as a query target; reading the mapping rule of the XML schema and of the relational DBMS schema to initially build a memory data structure; storing the SQL trigger into a trigger table; recording a SQL result set into a temporary table; mapping the recorded SQL result set in the temporary table to a corresponding XML result set so that the user can access the latest result set of the automatically executed XQuery trigger; requesting to store XML data into the relational DBMS schema; making a Document Object Model (DOM) tree wherein the DOM tree is made in a standard format of an XML document object model of the XML data; loading the mapping rule of the XML schema and of the relational DBMS schema; adding the XML data into the memory data structure; converting the DOM tree into an INSERT statement of the SQL trigger; executing the SQL trigger in the relational DBMS schema which changes the trigger and temporary tables associated with the relational DBMS schema and the XML schema; and informing the user that a change of the XML database and a change in the execution of the XQuery trigger has occurred whenever the XML data in the memory data structure is changed wherein the user can gain access to the latest execution result of the XQuery trigger through the XML result set that is returned when the XQuery trigger is created, whereby a query is automatically executed depending on the change of the XML data, and its result is monitored. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
-
10. A system for supporting an XQuery trigger in XML-DBMS based on a relational DBMS, the system having a processor and a memory coupled to the processor, the system comprising:
-
a metadata manager for registering an XML schema, a relational DBMS schema, and a mapping rule of the XML schema and of the relational DBMS schema through an XML database layer so as to store, manage and query XML data in the relational DBMS schema an XML data processor for creating a XQuery trigger using standard XML query language and using the registered XML schema as a XQuery target, for converting the XQuery trigger into a corresponding SQL trigger having the relational DBMS schema as a query target, for reading the mapping rule of the XML schema and of the relational DBMX schema to initially build a memory data structure, for storing the SQL trigger into a trigger table, for recording a SQL result set into a temporary table, and for mapping the recorded SQL result set in the temporary table to a corresponding XML result set so that the user can access the latest result set of the automatically executed XQuery trigger; and an XQuery trigger processor for requesting to store XML data into the relational DBMS schema, for making a Document Object Model (DOM) tree wherein the DOM tree is made in a standard format of an XML document object model of the XML data, for loading the mapping rule of the XML schema and of the relational DBMX schema, for adding the XML data into the memory data structure; for converting the DOM tree into an INSERT statement of the SQL trigger, for executing the SQL trigger in the relational DBMS schema which changes the trigger and temporary tables associated with the relational DBMS schema and the XML schema, and for informing the user that a change of the XML database and a change in the execution of the XQuery trigger has occurred whenever the XML data in the memory data structure is changed wherein the user can gain access to the latest execution result of the XQuery trigger through the XML result set that is returned when the XQuery trigger is created, whereby a query is automatically executed depending on the change of the XML data, and its result is monitored. - View Dependent Claims (11, 12, 13)
-
Specification