Giter Site home page Giter Site logo

newrepo's Introduction

Library_Management_System

This is a Library Management Application where a user will be able to borrow books and can also return it. If a user is using a certain book then it will be available to the other user only after the first user returns it.

Features

  • Add User
  • Borrow Book
  • Return Book

Tech Stack

  • SPRING BOOT
  • SPRING DATA JPA
  • SPRING BOOT DEVTOOLS
  • MySQL DATABASE

ASSUMPTIONS

  • Fine_Per_Day = Rs 2.
  • User should return the book within five days.

FLOW

  • ADD USERS IN THE DATABASE.
  • ADD BOOKS IN THE DATABASE.
  • BORROW BOOKS FOR A USER.USER CAN HAVE ATMOST FIVE BOOKS.
  • RETURN BOOK WITHIN FIVE DAYS OTHERWISE GIVE FINE OF RS 2 PER DAY.

DATABASE DETAILS

  • I have used port 8320 , and the name of my database is "Library" with three tables namely - book , user , user_borrowed_books .

QUERIES TO INSERT BOOK DATA IN DATABASE

insert into  Book(book_id,author,title,borrowing_amount,is_issued,issued_date,return_date) values(1,'premchand','IdGah',120,false,null,null);
insert into  Book(book_id,author,title,borrowing_amount,is_issued,issued_date,return_date) values(2,'jayshankar Prasad','Ansu',100,false,null,null);
insert into  Book(book_id,author,title,borrowing_amount,is_issued,issued_date,return_date) values(3,'Hariwans rai bacchan','Madhusala',120,false,null,null);
insert into  Book(book_id,author,title,borrowing_amount,is_issued,issued_date,return_date) values(4,'APJ','Ignited Minds',124,false,null,null);
insert into  Book(book_id,author,title,borrowing_amount,is_issued,issued_date,return_date) values(5,'Rs Agarwal','Quantative maths',180,false,null,null);

API Reference

Borrow Book

  borrowBook/{bookId}/{userId}

| Parameter | Type | Description |

| :-------- | : --------- | :-------------- |

| bookId | Integer | Required. |

| userId | Integer | Required. |

Return Book

  returnBook/{bookId}/{userId}

| Parameter | Type | Description |

| :-------- | : --------- | :-------------- |

| bookId | Integer | Required. |

| userId | Integer | Required. |

borrowBook(bookId, userId)

  • It finds the Book associated with bookId and the User associated with user Id and adds that book into the List of Books of User.
  • User won't be able to borrow more than five books.

returnBook(bookId, userId)

  • It finds the book from the List of Books of User and removes it.
  • User should return within a span of five days otherwise there is a fine of Rs 2 per day.

newrepo's People

Contributors

akash-github-25 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.