title: How should i implement a DB in my java application locally
body: <p>I'm trying to build a simple java application for my school project, and I want to be able to use a simple DB, in order to insert, update, delete and ask queries on my DB.</p>
  
  <p>I need my application to run everywhere  on installation, so I want to use a local DB that ships with my application, and will be accessible from inside the project, without different DB dependencies</p>
  
  <p>what would be the best way to implement a local DB?</p>
  
  <p>I thought of using JDBC for .csv files, which is a lot of work(?)
  or using HSQLDB, and create an embedded DB?</p>
  
  <p>how would you implement this?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>ok great, so I've read a little and found this <a href="http://www.sqlitetutorial.net/sqlite-java/sqlite-jdbc-driver/" rel="nofollow noreferrer">SQLite tutorial</a>,</p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args) {
          try{
              Connection conn = DriverManager.getConnection("jdbc:sqlite: (how to set this path?)");
              Statement statement = conn.createStatement();
              statement.execute("CREATE TABLE CUSTOMERS (name TEXT,phone INTEGER,email TEXT)");
  
  
          } catch(SQLException el){
              System.out.println("somting went wrong" + el.getMessage());
          }
      }
  
  }
  
  </code></pre>
  
  <p>now I want to set a relative path to the user folder, and set the connection on the user computer.
  I've noticed it's written :</p>
  
  <pre><code>o connect to an in-memory database, you use the following connection string:
  jdbc:sqLite::memory
  </code></pre>
  
  <p>so, after setting the first connection, on my end, the DB will initialize, and then I should use the memory path when I deploy the project?</p>