Loading ...
Sorry, an error occurred while loading the content.

Re: [xml-dbms] two questions: order info and DOM2DBMS

Expand Messages
  • Ronald Bourret
    ... That s it exactly. If you want to see some diagrams, see section 3.4.2.1 of: http://www.xml.com/pub/a/2001/05/09/dtdtodbs.html In 1.0, order information
    Message 1 of 2 , Oct 19, 2001
    • 0 Attachment
      charleyli@... wrote:
      >
      > 1. What is order information? is it used to keep track of the
      > sequence info of the repeatable subelements within a parent element?

      That's it exactly. If you want to see some diagrams, see section 3.4.2.1
      of:

      http://www.xml.com/pub/a/2001/05/09/dtdtodbs.html

      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() of
      > the KeyGenerator object?

      No. The key generator just generates keys. (Note that it is optional.
      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 SQL
      > INSERT statements in DOM2DBMS are put together? Any documentation I
      > can read to better understand this?

      There's no documentation, but it's pretty simple. Basically, a 1.0 map
      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.

      -- Ron
    Your message has been successfully submitted and would be delivered to recipients shortly.