Commit 6178d89
committed
chore(deps): add sqlite-jdbc-3.50.3.0.jar for database connectivity
What
- Added `sqlite-jdbc-3.50.3.0.jar` dependency.
- This JAR provides the JDBC driver implementation for SQLite databases.
- Enables Java programs to connect to `.db` files (`test.db`, `univ.db`) and run SQL queries via JDBC.
Why
- JDBC requires a driver to translate Java API calls into database-specific operations.
- SQLite JDBC driver is lightweight, self-contained, and does not require a separate DB server.
- Makes all JDBC examples in Section28 runnable without extra setup.
How to use
1. Add the JAR to your project classpath.
- For manual compilation:
```bash
javac -cp .:sqlite-jdbc-3.50.3.0.jar YourClass.java
java -cp .:sqlite-jdbc-3.50.3.0.jar YourClass
```
- Or add as a dependency in build tools like Maven/Gradle.
2. Load the driver in your Java code:
```java
Class.forName("org.sqlite.JDBC");
3. Establish a connection:
Connection con = DriverManager.getConnection("jdbc:sqlite:/path/to/univ.db");
Real-life Applications
• Enables Java apps to use SQLite for lightweight data storage.
• Common in embedded apps, desktop apps, and prototypes where a serverless DB is ideal.
• Used in mobile apps, IoT devices, and local analytics tools where simplicity and portability matter.
Notes
• This is a Type-4 JDBC driver (thin driver) written in pure Java.
• Fully portable across platforms (Windows, macOS, Linux).
• No additional libraries or configurations required beyond the JAR file.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>1 parent 24fa9b5 commit 6178d89
1 file changed
+0
-0
lines changedBinary file not shown.
0 commit comments