flat schema

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • varun aggarwal
    New Member
    • Feb 2007
    • 26

    flat schema

    Hi can anyone tell me
    what is a "flat schema" i am quite clear with the hierarchical shema. But confused about the flat ones.
    Thanks
  • dorinbogdan
    Recognized Expert Contributor
    • Feb 2007
    • 839

    #2
    Welcome to TheScripts TSDN...

    I understand that a flat XML structure is the opposite of the hierarchical model that is a tree-like structure.
    While the hierarchical structure allows child nodes with the same name as the parent node, the flat structure does not.
    I think that it's something similar to Flat file systems.
    So, if the flat file would be:
    [html]<record_set>
    <record>
    <house_id>h1</house_id>
    <room_id>r1</room_id>
    </record>
    <record>
    <house_id>h1</house_id>
    <room_id>r2</room_id>
    </record>
    <record>
    <house_id>h2</house_id>
    <room_id>r3</room_id>
    </record>
    </record_set>[/html]

    then the hierarchical structure could look like:

    [html]<house_list>
    <house>
    <id>h1</id>
    <rooms>
    <room>
    <id>r1</id>
    </room>
    <room>
    <id>r2</id>
    </room>
    </rooms>
    </house>
    <house>
    <id>h2</id>
    <rooms>
    <room>
    <id>r3</id>
    </room>
    </rooms>
    </house>
    </house_list>[/html]

    I hope this helps, if not please let us know.

    God bless you,
    Dorin.

    Comment

    • varun aggarwal
      New Member
      • Feb 2007
      • 26

      #3
      Originally posted by dorinbogdan
      Welcome to TheScripts TSDN...

      I understand that a flat XML structure is the opposite of the hierarchical model that is a tree-like structure.
      While the hierarchical structure allows child nodes with the same name as the parent node, the flat structure does not.
      I think that it's something similar to Flat file systems.
      So, if the flat file would be:
      [html]<record_set>
      <record>
      <house_id>h1</house_id>
      <room_id>r1</room_id>
      </record>
      <record>
      <house_id>h1</house_id>
      <room_id>r2</room_id>
      </record>
      <record>
      <house_id>h2</house_id>
      <room_id>r3</room_id>
      </record>
      </record_set>[/html]

      then the hierarchical structure could look like:

      [html]<house_list>
      <house>
      <id>h1</id>
      <rooms>
      <room>
      <id>r1</id>
      </room>
      <room>
      <id>r2</id>
      </room>
      </rooms>
      </house>
      <house>
      <id>h2</id>
      <rooms>
      <room>
      <id>r3</id>
      </room>
      </rooms>
      </house>
      </house_list>[/html]

      I hope this helps, if not please let us know.

      God bless you,
      Dorin.
      Hi Dorin
      thanks for your reply. But as more and more i am reading i am getting more into confusion. Anyways i think the best way is the practice and thats what i am going to do.
      Thanks for your help. If i get stuck somewhere i will be needing your help again.
      Thanks again

      Comment

      • dorinbogdan
        Recognized Expert Contributor
        • Feb 2007
        • 839

        #4
        You're always welcome.
        I also could not find any clear reference about the flat structure.
        It is your decision to define the XML structure as needed.

        God bless you,
        Dorin.

        Comment

        Working...