US 7,392,259 B2 | ||
Method and system for supporting XQuery trigger in XML-DBMS based on relational DBMS | ||
Myung Cheol Lee, Daejeon (Korea, Republic of); Mi Young Lee, Daejeon (Korea, Republic of); Jong Ho Won, Daejeon (Korea, Republic of); and Myung Joon Kim, Daejeon (Korea, Republic of) | ||
Assigned to Electronics and Telecommunications Research Institute, Daejon (Korea, Republic of) | ||
Filed on Oct. 27, 2005, as Appl. No. 11/260,073. | ||
Claims priority of application No. 10-2004-0105516 (KR), filed on Dec. 14, 2004; and application No. 10-2005-0036230 (KR), filed on Apr. 29, 2005. | ||
Prior Publication US 2006/0129575 A1, Jun. 15, 2006 | ||
Int. Cl. G06F 17/30 (2006.01) |
U.S. Cl. 707—101 [707/102; 707/203; 715/234; 715/239] | 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.
|