(2/7/00) My Proposal of representation of XML Updates

Well-Formed XML Document:

bulletData Model (inspired from [XPath] Data Model):
bulletThree types of Nodes: Element, Attribute and Text.
bulletText and Element Nodes are ordered.
Type of Node
Properties of Node
Attribute Name, Value no Order
Element Type, Children List, Attribute List, Order with OID
Text Value, Order  
bulletLink has no names with: From, To.
bulletAn XML data model is a graph of {N, L}. N is the set of nodes, and L is the set of links between the nodes in set N.


bulletUpdate Node
bulletAdd Node
bulletDelete Node
bulletAdd Link
bulletRemove Link
bulletUpdate Link (From, To)

Valide XML document with DTD:


DTD Updates:

bulletElement Type Declaration:
bulletAdd New Element Type Declaration
bulletRename an Element Type Declaration (Type is concluded from its content. )
bulletDelete an Element Type Declaration
bulletCreate a Group
bulletDelete a Group
bulletAttribute Declaration:
bulletAdd New Attribute Declaration
bulletModify an Attribute Declaration (Name, Type, Default Value)
bulletRemove an Attribute Declaration
bulletAdd New Relationship
bulletModify a Relationship (From, To, Ratio, Optional, Index)
bulletRemove a Relationship



XML Updates:


Operations that will not violate the DTD.

(2/8/00) Relationship between XML and DTD Updates:

For well-formed XML documents, we don't need to figure out that relationship because there is no DTD exists.

For valid XML documents, understanding the relationship between XML and DTD updates is very useful when we want to figure out how to update DTD when the underlying XML is changed, and vice versa. When we want to map the XML changes into RDB, clearance of this relationship is essential.

(2/8/00) Mapping the XML updates and DTD updates into RDB:

We update the  XML documents after we load XML documents into RDB. How can we update the RDB accordingly?

Our mapping approach takes the advantage of DTD. In this case, we are going to discuss the valid XML documents with a DTD. For the case of well-formed XML documents we assume there is a DTD generate from it.

If a valid XML documents with a DTD is updated, there could be two types of changes: 1st: XML documents changed, but still valid under original DTD. 2nd: XML documents changed, and its DTD changed accordingly in order to still make it valid. It usually happened during the generation of DTD. Let's discuss the cases one by one.

1. XML documents changed but still under same DTD.

Because the mapping algorithm generates the relational schema from DTD, so the relational schema is not changed. Only the data of the tables will be changed accordingly.

Here is a list of possible updates in XML documents:

bulletAdd Node
bulletDelete Node
bulletUpdate Node
bulletAdd Link
bulletRemove Link
bulletUpdate Link

When we talk about updating, we have to have a way to locate the place we want to update in the existing tables. Here we use the "oid" of each element in the documents. The "oid" of each element is mapped to "iid" in the tables. Also, because we have the operations like distill attribute, some elements is eliminated and stored as attribute of other tables. This requires using the metadata table to locate the position of a specific element.

(to be continued.)

2. XML documents changed also the DTD.

Mapping the RDB updates back to XML updates and DTD updates: