-3

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 program.

Will someone give me a "for dummies" guide on how to get started and figure this out please?

Community
  • 1
  • 1
user1113827
  • 69
  • 1
  • 2
  • 9

2 Answers2

4

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

romje
  • 650
  • 3
  • 4
0

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

It uses SQLJet API for accessing a SQLite database.

fkerber
  • 1,032
  • 9
  • 24