SQL Server Developer Center > SQL Server Forums > SQL Server XML > Design of Uploading XML Documents to SQL Server 2008
Ask a questionAsk a question
 

QuestionDesign of Uploading XML Documents to SQL Server 2008

  • Friday, October 30, 2009 11:02 PMblairv Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I have a web application that needs the ability to upload an XML document to a table and then insert the contents of the XML document into a two tables with a parent-child relationships with further relationships pointing to lookup types of tables.  I have an XSD for the XML document that not only shows schema but whether certain elements contain predetermined values...  such as, status can only contain "Submitted" or "Correction Pending"--these are the values that associated with the lookup tables.

    Here are my questions.

    1.  What's the ideal method of validating an XML file against it's XSD?  I prefer to validate the XML first before uploading the XML file to the database table and before inserting rows into the other tables. Is this the normal practice?

    2. What's the best approach to handle load balancing the inserting data into tables from the XML file? I want to be able to spread out the XML insert process so that they database can handle it.

    3. What's the best approach of shredding the XML document into the parent and child tables with other lookup table relationships?

    4. Overall what's the industry standard in dealing with XML data transmissions into another web-based application?

    Thanks!