This project is a simple Java application using SQLite for a car service shop database. It creates tables for Customers, Mechanics, Bays, Vehicles, Services, and Schedule, and displays their contents.
- Java (JDK 8 or higher)
- SQLite JDBC Driver (download from here)
-
Place
DBTest.java
and the downloadedsqlite-jdbc-<version>.jar
in the same folder. -
Open a terminal in that folder.
-
Compile the Java code:
javac DBTest.java
-
Run the program:
java -classpath ".:sqlite-jdbc-3.50.3.0.jar" --enable-native-access=ALL-UNNAMED DBTest
- On first run, creates all necessary tables in
SQLiteTest1.db
. - Inserts sample data for Mechanics, Bays, and Services.
- Displays the contents of all tables in the console.
- If you see errors about missing classes, ensure the JDBC jar is in the same folder and the classpath is set correctly.
- If tables do not appear, delete
SQLiteTest1.db
and rerun the program to recreate the database.