| |
XISS/R ― Relational Schemas
We investigated several key issues that can affect the
storage and query performance:
|
How to store element and attribute nodes. |
|
How to store tag name values. |
|
How to store value string information for text and
attribute nodes. |
|
For different schema, what kind of index is needed. |
Before answering those questions, let us first have a
look at the information we need to store in the relational database and the two
schemas we have chosen for demonstration. XISS requires storing up to five
pieces of information for each node (i.e. element, attribute, or text) in the
system:
|
The document to which a node belongs. |
|
The XISS Order value which uniquely identifies a
node in an XML document. |
|
The XISS Size value, when used with Order, can
quickly determine ancestor-descendant relationships. |
|
Tag-Name of a node if it is an attribute or element. |
|
The text value of a node if it is an attribute or
text node. |
In addition to this required information, we store the
following information for each node to assist in loading and unloading xml
documents, and in processing queries.
|
Depth: The depth of a node in a document tree. |
|
Parent_ID: The Order of a node's parent if this node
is not the root. |
|
Next_ID: The Order of a node's first sibling node
(closest to this node in pre-order traversal) if it exists. |
|
Child_ID: The Order of a node's first child node
(closest to this node in pre-order traversal) if any. |
|
Attribute_ID: The Order of a node's first attribute
(closest to this node in pre-order traversal) corresponding to this element
node if any. |
Using these 10 values we have created two relational
schemas that are best suited to storing and querying XISS data and indexes.
Those two schemas are named Schema A and Schema B respectively.
Schema A:
Schema B:
|