Skip to content Skip to sidebar Skip to footer

Java Sqlite For Dummies?

Ok I have read online about using SQLite with java and read the question on here titled Java and SQLite but I am so confused on how to actually create and use a database in my prog

Solution 1:

SQLite is a very special embedded database, not the most easy to use especially from the Java world.... But it works..... 1)You must first choose a driver zentus or xerial are 2 candidates (http://www.zentus.com or http://www.xerial.org)... I used Xerial with success finding some little bugs and given feedback to the main developer of this project... These drivers will hide the complexity of loading this database which is a native one (System.loadLibrary() and other stuff are handled by these drivers)

2) Load the driver class as any other JDBC driver

3) Use the standard JDBC API

Beware with SQLite which has a very oriented behaviour and is very quick but for its primary use case (embedded) , trying to use it as a TCP server is not a good idea...

But from my point of view H2 or Derby are more easy and powerful with many features not implemented in SQLite... So ensure to use it for its best use case

HTH Jerome


Solution 2:

Perhaps this tutorial will help you: http://sqljet.com/tutorial.html

It uses SQLJet API for accessing a SQLite database.


Post a Comment for "Java Sqlite For Dummies?"