For this assignment, you will build a small library database from a messy export. On top of it, you’ll write a small application showing you can interact with the database using the JDBC. You will:
You are given a single export table called borrowings_export (imagine it came from a spreadsheet).
Columns:
Joshua Bloch; Martin Fowler)java; best-practices)Here’s the full file:
Or you can find it on Github
Example rows:
| member_email | member_name | member_phone | member_address | card_number | card_issued_on | card_expires_on | book_isbn | book_title | publisher_name | author_names | tag_names | copy_barcode | shelf_code | borrowed_at | due_date | returned_at | fine_eur |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| [email protected] | Tom | +31645678901 | Biltstraat 88, Utrecht | C-1004 | 2023-11-20 | 2026-11-20 | 9780134685991 | Effective Java | Addison-Wesley | Joshua Bloch | java; best-practices | BC-0001 | A-01 | 2026-03-09 03:18 | 2026-03-30 03:18 | 2026-03-28 03:18 | 0.00 |
| [email protected] | Sam | +31612345678 | Oudegracht 10, Utrecht | C-1001 | 2024-01-10 | 2027-01-10 | 9780596009205 | Head First Java | O'Reilly | Kathy Sierra; Bert Bates | java; beginners | BC-0006 | B-03 | 2025-12-09 09:08 | 2025-12-30 09:08 | 2026-01-04 09:08 | 1.25 |
| [email protected] | Lena | +31656789012 | Voorstraat 3, Utrecht | C-1005 | 2024-04-05 | 2027-04-05 | 9780596009205 | Head First Java | O'Reilly | Kathy Sierra; Bert Bates | java; beginners | BC-0007 | B-03 | 2026-01-13 22:56 | 2026-02-03 22:56 | 2026-02-10 22:56 | 1.75 |
schema.sql)From the export above, design a normalized schema in 3NF. Write PostgreSQL DDL to create your schema.
Must include:
Include:
Then:
library_db)schema.sqlCreate a small Java program that demonstrates using JDBC to connect to the database and run few commands.
insertData() method:
fetchData() method:
insertData() and fetchData() from your main function and display the results in console.PreparedStatement everywhereFollow the Assignment submission guide to submit
The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

Built with ❤️ by the HackYourFuture community · Thank you, contributors
Found a mistake or have a suggestion? Let us know in the feedback form.