I love to learn the hard way i.e with real world examples. I thought to make MP3 Player, but I changed mind and now I want to make small SQLIte driven app. How do you manipulate SQLite with Java?

I'm googling to see if I will catch noobish things :-/

Well, then, Google for SQLite JDBC Driver. There is one out there. It is not a Type 4.0 Driver (AFAIK), however.

Well, then, Google for SQLite JDBC Driver. There is one out there. It is not a Type 4.0 Driver (AFAIK), however.

I found a lot of confusing things. I don't understand what you mean by type 4. Can you link me to the best option? Google seems to confuse me on this :confused:

Did you search for exactly "SQLite JDBC Driver". If so, the very first link works, but there are many others, and the third link (the one from sqlite.org) has a list of possible drivers. Take your choice.

Ok I have the .jar file. How do I add to easy eclipse and call imports? Just as I will do for SWT? I decided to take the first option. How I go about getting documentantion?

> How I go about getting documentantion?

Any JDBC tutorial out there should be good enough to get you started. The only difference would be the way the SQL driver is loaded. This would be a good start.

> How I go about getting documentantion?

Any JDBC tutorial out there should be good enough to get you started. The only difference would be the way the SQL driver is loaded. This would be a good start.

So If I have understand well, JDBC is standard and doesn't differ that is MYSQL JDBC code can be used in PostGreSQL JDBC except they will differ in the way you load driver right? If so, Java designers won hands down :)

That depends. If you use SQL that is specifc to that DB, then no, 100% compatable it is not. And since not all DBs implement the entire range of SQL98 you can't even be sure of being compatable when sticking to that. But, for the most part, sticking to SQL98 will make the program about 99% compatable. It's only when you get into complicated statements and/or optimizing statements that you get into real problems.

Unfortunately for you, SQLite is one of the least compliant DBs.

IMO, if you are planning to work both in embedded and server modes, Derby would be a good choice for a beginner database. It supports almost all SQL features which you might need along with support for user defined procedures and functions. Also, it's a pure Java database with a type 4 JDBC driver which is easily available.

Of course, if it were some "enterprisy" project, I would have recommended PostgreSQL or Oracle[if you have the moolah]. :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.