title: How to create a table into SQLite from a CSV file in Java?
body: <p>I have to read the headers of the file in order to create a table in a database with the name of the columns specified on the CSV file.</p>
  
  <p>For instance:
  <img src="https://i.stack.imgur.com/ZUSRr.jpg" alt="enter image description here"></p>
  
  <p>the program has to create a table on the database like this:</p>
  
  <pre><code>create table csv_ejemplo (
  unit varchar(255),
  line varchar(255),
  total_time varchar(255),
  ocurrences varchar(255),
  text varchar(255)
  );
  </code></pre>
  
  <p>Finally, I have to iterate over every column and insert that value into the recently created table.</p>
  
  <p>How could I do this? Should I use reflection? I'm confused because I don't know if the database must be created first outside Java (I mean, through SQLite). </p>
  
  <p>I would appreciate any help.</p>