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

Re: [xml-dbms] Self referencing data to XML

Expand Messages
  • Ronald Bourret
    1) XML-DBMS supports self-referencing data. To map this, you simply create a RelatedMap within a ClassMap that points to itself -- that is, the same ClassMap.
    Message 1 of 2 , Oct 31, 2002
    • 0 Attachment
      1) XML-DBMS supports self-referencing data. To map this, you simply
      create a RelatedMap within a ClassMap that points to itself -- that is,
      the same ClassMap.

      2) I assume that both the folder and the leaf element types are mapped
      to the same table (e.g. the employee table). If this is the case,
      XML-DBMS does not allow them to have different names. That is, they must
      both be called folder or both be called leaf (or both be called
      employee, etc.). If you want them to have different names (such as
      manager and employee), you will need to first generate the file from the
      database, then use XSLT to change the name of the leaf elements.

      -- Ron

      mvbabu wrote:
      >
      > Hi,
      >
      > I am evaluating whether I can use this product for my project.
      > I have an empoyee table, which has a bunch of self-referencing
      > data (Employee->Manager relationship). I need to present that data
      > in an XMl file as follows : (hierarchial tree) :
      >
      > <tree title="Employee details">
      > <folder id="1" name="BigBoss_1">
      > <folder id="2" name="Manager_1_under_BigBoss_1">
      > <leaf id="3" name="Employee_3"/>
      > <leaf id="4" name="Employee_4"/>
      > <leaf id="5" name="Employee_5"/>
      > </folder>
      > <folder id="6" name="Manager_2_under_BigBoss_1">
      > <leaf id="7" name="Employee_7"/>
      > <leaf id="8" name="Employee_7"/>
      > <leaf id="9" name="Employee_8"/>
      > <leaf id="10" name="Employee_10"/>
      > <leaf id="11" name="Employee_11"/>
      > </folder>
      > <folder id="12" name="Manager_3_under_BigBoss_1">
      > <leaf id="13" name="Employee_13"/>
      > </folder>
      > <folder id="14" name="BigBoss_2">
      > <folder id="15" name="Manager_1_under_BigBoss_2">
      > <leaf id="16" name="Employee_16"/>
      > </folder>
      > </folder>
      > </tree>
      >
      > Is it possible for me to use this product ?
      > If not, can you pl suggest a different product that I can use ?
    Your message has been successfully submitted and would be delivered to recipients shortly.