teacher
Sign in

Library Management System

Design a library with books and physical copies, members, loans, reservations, fines and search, with clear rules for each.

45 min4 interactive

Requirements

A library looks like CRUD (create, read, update, delete) on books. The interesting part is the rules around lending. Ask questions, then write the rules down.

Clarifying questions:

  • Does the library own several physical copies of the same title? (Yes. This shapes the whole model.)
  • Who can borrow? (Registered members.)
  • How many books at a time, and for how long? (Say 2 books for 14 days here; make both configurable.)
  • What if a book is out? (A member can reserve it: join a queue and get the next free copy.)
  • Fines for late returns? (Yes, per day late.)
  • Search by what? (Title or author, case-insensitive.)

Scope for this lesson:

  • Add books and copies; register members.
  • Search by title or author, showing how many copies are free.
  • Check out a copy and return it. Late returns create a fine.
  • A member with an unpaid fine cannot borrow. A member at the loan limit cannot borrow.
  • Reserve a title when no copy is free. A returned copy is held for the first member in the queue, who is notified.

Out of scope: payments (we just mark a fine as paid), email and SMS delivery, barcodes printing, a database, librarians with different roles.

1 of 9