- create users
INSERT INTO users(username,email) VALUES(YOUR_VALUES)
- Borrow a book
INSERT INTO book_transactions(borrowed_book_id,borrower_user_id) VALUES(YOUR_VALUES)
- Return a book
UPDATE book_transactions SET return_date = YOUR_VALUE WHERE id = YOUR_VALUE
- View Your fines if any
SELECT * FROM fines WHERE fined_user_id = YOUR_VALUE
- Collect Fine
UPDATE fines SET collection_status = true WHERE id = YOUR_VALUE
- Search For books with criterias:id, title, author, rack_number, publication_date,subject_category
SELECT * FROM book WHERE YOUR_CRITERIA = YOUR_VALUE
- Reserve a book if not available
INSERT INTO reserve_book_requests(book_id,requested_by) VALUES(YOUR_VALUES);
The system has following features:
- Search based upon various criterias
- User cannot borrow a reserved or currently unavailable book
- User cannot borrow more than 5 books before they are returned
- User cannot return an already reserved book
- If the user returns the book after 15 days, fine is automatically generated
- User can reserve a book if it is not available currently
- User cannot reserve an already available book