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

Re: [xml-dbms] A basic question about XML-DBMS

Expand Messages
  • Dongling Ding
    I will look at DOMToDBMS and DBMSToDOM. But the reason for me to look at XML-DBMS is that it can support more types of actions comparing to others. I still
    Message 1 of 6 , Aug 27, 2002
    • 0 Attachment
      I will look at DOMToDBMS and DBMSToDOM. But the reason
      for me to look at XML-DBMS is that it can support more
      types of actions comparing to others.

      I still think XML-DBMS can combine some of properties
      files together and have better structure to be
      understood.

      Thanks

      Dongling

      --- Ronald Bourret <rpbourret@...> wrote:
      > Good question. I'll try to answer. And please point
      > out if I've made any
      > mistakes about JAXB -- it's been a long time since
      > I've looked at it.
      >
      > 1) The property files are only used by the Transfer
      > class. If you write
      > directly to DOMToDBMS, DBMSToDOM, etc., you don't
      > need property files.
      >
      > 2) JAXB transfers data between objects and XML
      > documents, while XML-DBMS
      > transfers data between relational databases and XML
      > documents. Both are
      > based on (roughly) the same model, but they do
      > different things.
      >
      > 3a) I suspect a map file is equivalent to an
      > annotated schema in JAXB.
      > However, XML-DBMS does not understand annotated
      > schema files.
      > Furthermore, it is not possible to use them because
      > they don't (?)
      > contain information needed by XML-DBMS (table and
      > column names, key
      > definitions, etc.)
      >
      > 3b) It should be possible to generate a map file
      > from an annotated
      > schema using XSLT. However, the XSLT file will have
      > to guess at some
      > things (such as table names, keys, etc.), since the
      > annotated schema
      > doesn't contain this information.
      >
      > 4a) Action documents are not required if you: (a)
      > write directly to
      > DOMToDBMS instead of using Transfer, and (b) want to
      > take the same
      > action for the entire document (e.g. only insert, or
      > only update).
      >
      > 4b) JAXB doesn't need action documents because it
      > only has two actions
      > (create objects from XML and create XML from
      > objects) and these are
      > implemented at the API level. XML-DBMS not only
      > supports more types of
      > actions (insert, update, delete, soft
      > insert/update/delete), it also
      > allows you to mix actions within a single method
      > call.
      >
      > 5) JAXB doesn't need filter documents because it
      > doesn't query the
      > database, which is what filters are for.
      >
      > -- Ron
      >
      > Dongling Ding wrote:
      > >
      > > Hi,
      > >
      > > I am new to this group. After spending several
      > hours
      > > on XML-DBMS, I am kind of wondering why XML-DBMS
      > is
      > > using so many properties files (Map, filter,
      > action,
      > > and so on). Can we just have a schema file to
      > follow
      > > JAXB?
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! Finance - Get real-time stock quotes
      http://finance.yahoo.com
    • Ronald Bourret
      ... DOMToDBMS supports updates and inserts. DBMSDelete supports deletes. DBMSToDOM supports selects. That should cover everything. ... Can you explain further?
      Message 2 of 6 , Aug 28, 2002
      • 0 Attachment
        Dongling Ding wrote:
        >
        > I will look at DOMToDBMS and DBMSToDOM. But the reason
        > for me to look at XML-DBMS is that it can support more
        > types of actions comparing to others.

        DOMToDBMS supports updates and inserts. DBMSDelete supports deletes.
        DBMSToDOM supports selects. That should cover everything.

        > I still think XML-DBMS can combine some of properties
        > files together and have better structure to be
        > understood.

        Can you explain further? Note that part of the problem with v2 right now
        is lack of documentation, which will be written before the final
        release.

        -- Ron
      • Dongling Ding
        ... The first thing I can think of is to combine action and filter xml files together. In that case users only need to manage one file instead of two.
        Message 3 of 6 , Aug 28, 2002
        • 0 Attachment
          > > I still think XML-DBMS can combine some of
          > properties
          > > files together and have better structure to be
          > > understood.
          >
          > Can you explain further? Note that part of the
          > problem with v2 right now
          > is lack of documentation, which will be written
          > before the final
          > release.
          >

          The first thing I can think of is to combine action
          and filter xml files together. In that case users only
          need to manage one file instead of two.

          Currently, the map file in XML-DBMS is DTD type. Do we
          have a plan to move into XML schema compliant?

          Dongling


          __________________________________________________
          Do You Yahoo!?
          Yahoo! Finance - Get real-time stock quotes
          http://finance.yahoo.com
        • Ronald Bourret
          ... I disagree here. Actions and filters are largely separate, so there seems to be little advantage in combining them. Actions are used by DOMToDBMS and
          Message 4 of 6 , Aug 29, 2002
          • 0 Attachment
            Dongling Ding wrote:
            > The first thing I can think of is to combine action
            > and filter xml files together. In that case users only
            > need to manage one file instead of two.

            I disagree here. Actions and filters are largely separate, so there
            seems to be little advantage in combining them. Actions are used by
            DOMToDBMS and DBMSDelete for inserts, updates, and deletes. Filters are
            used by DBMSDelete and DBMSToDOM for controlling what data is deleted /
            retrieved.

            It would be possible to combine map documents and filters. The map
            document is equivalent to join clauses in an SQL statement and the
            filter document is equivalent to WHERE clauses. The advantage of this is
            that it would probably be a lot clearer (I find filter files very ugly).
            The disadvantage (and why I didn't do this) is that it would mean a lot
            of duplicated information. For example, if you wanted two different
            filters over the same set of data, all the map information would be
            duplicated.

            The real solution is to ditch maps, filters, and actions completely and
            write an XQuery engine over JDBC. Don't count on this any time soon :)

            > Currently, the map file in XML-DBMS is DTD type. Do we
            > have a plan to move into XML schema compliant?

            I'm not sure what you mean by "DTD type".

            1) If you mean that the map is validated by a DTD, then there is no plan
            to change to an XML schema, as the DTD provides everything we need. You
            can certainly do this yourself, as there are certainly tools to generate
            an XML schema from a DTD.

            2) If you mean that there is a way to generate maps from DTDs but not
            from schemas, then there are plans to do this. Another user wrote a
            MapFactory_W3CSchema class, but it works with an early version of 2.0
            and I don't currently have time to update it.

            3) Version 2.0 maps were designed with XML Schemas in mind and support
            many of the constructs from XML Schemas. For example, the UseClassMap
            element is designed to support complex types and the TokenList attribute
            is designed to support enumerated types. The main feature of XML Schemas
            that is not supported is inheritance of complex types. I had planned to
            do this, but ran into technical difficulties.

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