Library Lending System with Overdue Fines
Design a relational schema for a library that tracks books, members, and loans, then write queries to compute overdue fines based on due dates and daily rates. Learners practice schema design, foreign keys, date arithmetic, and conditional aggregation.
- Estimate
- ~7.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
PostgreSQL · pgAdmin
Project roadmap
- 01
Design the schema
~1.5hCreate tables for books, members, and loans with appropriate primary and foreign keys.
- 02
Insert sample data
~1hPopulate the tables with realistic sample books, members, and loan records.
- 03
Query currently overdue loans
~1.5hWrite a query that lists all loans past their due date and not yet returned.
- 04
Compute overdue fines
~2hUse date arithmetic and CASE expressions to calculate fines based on days overdue and a daily rate.
- 05
Report most-borrowed books
~1.5hWrite a GROUP BY query ranking books by number of times borrowed.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack