Design a library management system
PremiumLow-level designEasy
- State machine
- Observer pattern
- Reservation queue
Quick answer
This low-level design interview question asks you to design a library management system. Aim for a design that is modelled as clear classes, interfaces and relationships that can handle new requirements without a rewrite. Interviewers want to see how you name responsibilities, keep classes small and reason about change.
The problem
Library management system low level design: build the object model for a public library with 200,000 books and 500,000 copies. Members search, borrow, return, renew and reserve books, and pay fines for late returns. The hard parts are copy states, a fair hold queue and fast catalog search.
The catalog has many books, and each book has several physical copies. The library tells a member when a reserved book becomes available. Librarians add and remove copies and block members who owe too much.
What must a library management system do?
- Borrow: A member borrows an available copy for 14 days. Refuse if the member is blocked, at the limit, or has unpaid fines above 100.
- Reserve: Place a hold on a book when no copy is available; holds are served in order.
How well must it do it?
- Consistent: A copy can be on loan to at most one member at a time, and a member's loan count must match the loans on record.
- Fast search: Searching 200,000 books by title or author should not scan every book.
What scale should you design for?
Use these numbers in your estimates.
The scale numbers unlock with this questionUnlock
Key concepts
- State machine
- Observer pattern
- Reservation queue
- Fine calculation
- Search indexing
- Object oriented design
How you’ll practise
- Requirements
- Core objects
- Class relationships
- Key flows
- Extensibility
- Wrap-up
Lala, personalized to you, gives a hint when you ask and reviews your design when you are ready.
What do interviewers look for?
In any low-level design round.
- Lists the use cases before writing classes
- Gives each class one clear responsibility
- Uses interfaces where behaviour is likely to change
- Applies a design pattern only when it solves a real problem
- Handles edge cases and invalid states explicitly
- Walks through one use case end to end with the model
Questions people ask about this interview question
- Which design type is this question?
- It is a low-level design question. You design a library management system and explain your choices the way you would in an interview.
- Is this question asked at entry level?
- It is marked Easy, so it suits engineers who are new to low-level design interviews. It is also a good warm-up before harder questions.
- What should I cover first?
- Start with the use cases and the core entities, then the responsibilities of each one. Agree on scope with the interviewer before you design anything.
- Can I practise it for free?
- It is a premium question. Sign up and unlock it once for 10 credits; it then stays unlocked. When you finish, Lala, your personalized AI mentor, can review your design for 30 credits.
Related questions
Updated · Written by the SevyDevy team