title: How to convert data stored in XML files into a relational database (MySQL)?
body: <p>I have a few XML files containing data for a research project which I need to run some statistics on. The amount of data is close to 100GB.</p>
  
  <p>The structure is not so complex (could be mapped to perhaps 10 tables in a relational model), and given the nature of the problem, this data will never be updated again, I only need it available in a place where it's easy to run queries on.</p>
  
  <p>I've read about XML databases, and the possibility of running XPATH-style queries on it, but I never used them and I'm not so comfortable with it. Having the data in a relational database would be my preferred choice.</p>
  
  <p>So, I'm looking for a way to covert the data stored in XML into a relational database (think of a big .sql file similar to the one generated by <code>mysqldump</code>, but anything else would do).
  The ultimate goal is to be able to run SQL queries for crunching the data.</p>
  
  <p>After some research I'm almost convinced I have to write it on my own.
  But I feel this is a common problem, and therefore there should be a tool which already does that.</p>
  
  <p>So, do you know of any tool that would transform XML data into a relational database?</p>
  
  <p><strong>PS1:</strong></p>
  
  <p>My idea would be something like (it can work differently, but just to make sure you get my point):</p>
  
  <ol>
  <li>Analyse the data structure (based on the XML themselves, or on a XSD)</li>
  <li>Build the relational database (tables, keys) based on that structure</li>
  <li>Generate SQL statements to create the database</li>
  <li>Generate SQL statements to create fill in the data</li>
  </ol>
  
  <p><strong>PS2:</strong></p>
  
  <p>I've seen <a href="https://stackoverflow.com/questions/748977/how-to-transform-huge-xml-files-into-relational-data-to-perform-queries">some</a> <a href="https://stackoverflow.com/questions/6213010/import-the-data-from-the-xml-files-into-a-mysql-database">posts</a> here in SO but still I couldn't find a solution.
  Microsoft's "<a href="http://support.microsoft.com/kb/316005" rel="noreferrer">Xml Bulk Load</a>" tool seems to do something in that direction, but I don't have a MS SQL Server.</p>