Re: [xml-dbms] two questions: order info and DOM2DBMS
- charleyli@... wrote:
>That's it exactly. If you want to see some diagrams, see section 188.8.131.52
> 1. What is order information? is it used to keep track of the
> sequence info of the repeatable subelements within a parent element?
In 1.0, order information must be stored in separate columns in the
database. In 2.0, you'll be able to store order information in the
mapping, which is sufficient for many data-centric applications. For
more information, see the 2.0 DTD on the CVS.
> Is the order number also generated by calling the generateKey() ofNo. The key generator just generates keys. (Note that it is optional.
> the KeyGenerator object?
You can also you values from the XML document as keys.)
DOMToDBMS automatically generates order values by simply counting where
a child node is within its parent.
> 2. Can anyone please give me some general idea about how the SQLThere's no documentation, but it's pretty simple. Basically, a 1.0 map
> INSERT statements in DOM2DBMS are put together? Any documentation I
> can read to better understand this?
document includes implicit table definitions. That is, a class map gives
the name of a table and the property maps in that class map give the
names of the columns in the table. (In the 2.0 mapping language, table
definitions are explicit.)
When MapFactory_MapDocument compiles a map document, it builds a Table
object for each table. This contains an array of Column objects. When
DOMToDBMS needs an insert statement, it calls Map.checkOutInsertStmt and
passes the Table object from the current ClassMap object. This
eventually leads to a call to Map.buildInsertString, which does the
obvious -- gets the table name from the Table object and the column
names from the Column objects and builds an INSERT statement.