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

Re: [xml-dbms] Recursive definitions in DTDs

Expand Messages
  • Anar Daswani
    Thanks, once again for the quick and informative response. I have another question. If you take the example product.dtd that you provide with xml-dbms
    Message 1 of 9 , Nov 7, 2000
    • 0 Attachment
      Thanks, once again for the quick and informative response.

      I have another question. If you take the example product.dtd that you
      provide with xml-dbms software, the table Link that corresponds to the
      element Link, has 2 possible parent tables - Item or Para. The table
      definition for Link does not have a natural primary key. Is there a
      flag/option that can be set while generating the mapping that will create an
      artificial key mapping, LinkPK for tables like Link? Or do most people not
      create a primary key, because the records in the table are not likely to be
      accessed by the primary key?

      Anar



      _________________________________________________________________________
      Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

      Share information about yourself, create your own public profile at
      http://profiles.msn.com
    • Ronald Bourret
      This is a design bug in XML-DBMS. In particular, XML-DBMS cannot currently generate primary keys for leaf tables -- that is, tables at the leaves of the table
      Message 2 of 9 , Nov 8, 2000
      • 0 Attachment
        This is a design bug in XML-DBMS. In particular, XML-DBMS cannot
        currently generate primary keys for leaf tables -- that is, tables at
        the leaves of the table hierarchy, which have no children. This will be
        fixed in 2.0.

        For more information, see section 2.2 of the version 2 spec:

        http://www.rpbourret.com/xmldbms/specs/version2.htm

        -- Ron

        Anar Daswani wrote:
        >
        > I have another question. If you take the example product.dtd that you
        > provide with xml-dbms software, the table Link that corresponds to the
        > element Link, has 2 possible parent tables - Item or Para. The table
        > definition for Link does not have a natural primary key. Is there a
        > flag/option that can be set while generating the mapping that will create an
        > artificial key mapping, LinkPK for tables like Link? Or do most people not
        > create a primary key, because the records in the table are not likely to be
        > accessed by the primary key?

        --
        Ronald Bourret
        Programming, Writing, and Training
        XML, Databases, and Schemas
        http://www.rpbourret.com
      • Anar Daswani
        Thanks, again for the response. I have one more question. Will the 2.0 version create another primary key for tables like ItemPCDATA which have a composite
        Message 3 of 9 , Nov 8, 2000
        • 0 Attachment
          Thanks, again for the response. I have one more question.

          Will the 2.0 version create another primary key for tables like ItemPCDATA
          which have a composite primary key (ItemFK, ItemPCDATAOrder)?

          Anar


          >From: Ronald Bourret <rpbourret@...>

          >
          >This is a design bug in XML-DBMS. In particular, XML-DBMS cannot
          >currently generate primary keys for leaf tables -- that is, tables at
          >the leaves of the table hierarchy, which have no children. This will be
          >fixed in 2.0.
          >
          >For more information, see section 2.2 of the version 2 spec:
          >
          > http://www.rpbourret.com/xmldbms/specs/version2.htm
          >
          >-- Ron
          >
          >Anar Daswani wrote:
          > >
          > > I have another question. If you take the example product.dtd that you
          > > provide with xml-dbms software, the table Link that corresponds to the
          > > element Link, has 2 possible parent tables - Item or Para. The table
          > > definition for Link does not have a natural primary key. Is there a
          > > flag/option that can be set while generating the mapping that will
          >create an
          > > artificial key mapping, LinkPK for tables like Link? Or do most people
          >not
          > > create a primary key, because the records in the table are not likely to
          >be
          > > accessed by the primary key?
          >

          _________________________________________________________________________
          Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

          Share information about yourself, create your own public profile at
          http://profiles.msn.com
        • Ronald Bourret
          It will be pretty much like CandidateKey is today -- you can either ask XML-DBMS to generate a key for you or you can specify any column or columns to use as
          Message 4 of 9 , Nov 8, 2000
          • 0 Attachment
            It will be pretty much like CandidateKey is today -- you can either ask
            XML-DBMS to generate a key for you or you can specify any column or
            columns to use as the key.

            Two note:
            1) If you ask XML-DBMS to generate the key, you can provide your own
            routine to generate the key. This is what the KeyGenerator interface is
            for; KeyGeneratorImpl is a routine I wrote to show how this is used.

            2) In version 2.0, the map factory that creates a map from a DTD will
            generate a primary key column for all nodes, including leaf nodes.
            However, you don't have to use this if you don't want to, or you can
            just use it as a starting point. That is the nice thing about the
            mapping language -- you can modify a map document to do a fairly wide
            range of things. Therefore, if you want to use the composite key you
            mention below, you can modify the map document to do that.

            -- Ron

            Anar Daswani wrote:
            >
            > Thanks, again for the response. I have one more question.
            >
            > Will the 2.0 version create another primary key for tables like ItemPCDATA
            > which have a composite primary key (ItemFK, ItemPCDATAOrder)?

            --
            Ronald Bourret
            Programming, Writing, and Training
            XML, Databases, and Schemas
            http://www.rpbourret.com
          Your message has been successfully submitted and would be delivered to recipients shortly.