Java database client for a cruise management system. The program connects to an Apache Derby database using JDBC, runs SQL queries with prepared statements, and displays cruise, ship, passenger, and cabin information in the console.
- Connects to a local Apache Derby database with JDBC
- Uses prepared statements for SQL queries
- Displays cruises with assigned ships
- Displays passengers for a selected cruise
- Demonstrates SQL joins across related database tables
- Keeps database credentials out of the source code by using environment variables
- Java
- JDBC
- Apache Derby
- SQL
- PreparedStatement
- Console output
The program expects a local Derby database.
Set these environment variables before running the program: DB_USER=your_database_username DB_PASS=your_database_password
This project helped me practice Java database programming, JDBC connections, SQL joins, prepared statements, database security practices, and working with relational data across multiple tables.