In order to use SQLite 3 with Java, you need to do the following steps on your Linux or Windows box. I have deliberately kept off specific commands.
- Install SQLite3 from your Linux distribution repository. You can also download the Windows edition if you use Windows.
- Visit https://bitbucket.org/xerial/sqlite-jdbc and download the JDBC driver. I downloaded the sqlite-jdbc-3.7.2.jar file as that was the latest one available for download.
- Copy it to your project’s folder.
- Install libsqliteodbc onto your computer.
- Now, you can try to use the library in your SQLite3 JDBC programs to connect to SQLite databases.
- Try to key in the sample java program on the xerial page to see if it worked.
The key advantage of using SQLite3 is that it is light, simple and good for small projects. It is also the main database tool in-built on an Android phone. For larger projects, you should use MySQL or PostgreSQL or even Java’s Derby. Maybe if you have the budget, Oracle or others.
You can also refer to this link http://en.wikibooks.org/wiki/Category:Java_JDBC_using_SQLite for a great book on using SQLite and JDBC.