title: Best way to create a DB-tablestructure
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/467176/generating-sql-server-db-from-xsd">Generating SQL Server DB from XSD</a><br>
    <a href="https://stackoverflow.com/questions/263836/generating-sql-schema-from-xml">Generating SQL Schema from XML</a></p>
  </blockquote>
  
  <p>I have loads and loads of xml files with data, and a schema-file (.xsd) which describes the structure of the xml.</p>
  
  <p>I want to store the data in a MSSQL-database so that I can query it later and display it on a web-site.</p>
  
  <p>I must now create the db-structure, and have so far thought of 3 ways of creating the tables:</p>
  
  <ol>
  <li>Using xmlspy I could load the xsd and use the "create DB from xsd" there. The "trouble" is that I have to manually add the relations between the tables, and also add the columns that is used for these relations.</li>
  <li>Using Microsoft SQL Management Studio I could graphically create the tables and relations. The "trouble" here is that the xsd describes about 100 tables and the thought of manually doing this in a GUI way is scary. I would loose track of where I was somewhere in there.</li>
  <li>Handwriting the sql in notepad or something. Boring, but then I could do it in small steps, something I could not do with the two other options.</li>
  </ol>
  
  <p>Is there any other way I havent't thought of?</p>