Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2009
    Posts
    5

    Storing flexible XML File in MS SQL Database

    Hello,

    i am currently developing a database to store a dynamic XML File. I dont have any experiences with that so I need a bit help.

    My concept so far:

    Table rootElement to store the firstElement of the file.

    Table subElement to store the subElements of the rootElement

    Table Item to store the values of the items and the name of the items (because the name of the Items can change daily) for the Elements

    I am not sure if this is a good concept because the amount of data is high (million of records) and as far as i know searching in an non numeric field like name is not so fast.

    Considering that many XML files contain the same combination of item name and item value i have changed the concept a bit.

    Table rootElement to store the firstElement of the file.

    Table subElement to store the subElements of the rootElement

    Table Item to store the values of the item and the name of the items. But store only once a set of name and value

    Table Element2Item which connects the Elements and Items

    May this work faster as concept number 1 or is none of these concepts good for storing a dynamic XML file?

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    XML is a format for storing EAV, and as such doesn't fit well in any relational database. You can take unstructured data like a text or an XML file and force it into a structured store like SQL, but there isn't a good "fit" any way that I've seen.

    Some databases incorporate an enhanced BLOB format specifically for coping with XML data. This is probably the best solution that I've seen for coping with XML within SQL.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Jul 2009
    Posts
    5
    Thx for your comment, i think a must run a few tests to find a good design.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •