Skip to content
Permalink
f264d8c92b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

Library Loans

The University library allows staff and students to locate and borrow books for pre-determined periods of time.


Testing

You are required to create the following accounts to allow the system to be tested. All accounts should have the password p455w0rd:

  1. student1
  2. student2
  3. librarian1
  4. librarian2

Each librarian account should have ben used to add at least 3 book titles to the system and each student account should have between 2 and 4 books checked out.


Feature 1

This will allow librarians to add books to the system. In a library books database there are likely to be more than one book with the same ISBN number. For this reason each book needs to have its own record in the database and have a unique identifier. The identifier needs to be a Universal Unique Identifier (UUID). MySQL has a UUID() function that can generate this for you.

When a librarian logs in they should see an Add book link or button on the homepage. Clicking this takes them to the Add Book screen where they can add books to the library. This will ask for the following:

  1. The name of the book.
  2. The primary author.
  3. The ISBN-13 number.
  4. The Dewey Classification number.
  5. The quantity to add as a slider with a range of 1-10.
  6. A dropdown list to pick the loan period (how long the book can be borrowed for) in days. This should give options of 24 hours, 2 days, 1 week, 2 weeks and a month with the default option being 1 week.

This should add one record for each individual book, so for example if the quantity was set to 3 this will add three records to the database, each with a different UUID.

In addition to the data from the form, the following extra information needs to be added (without asking the user).

  1. The librarian adding the books.
  2. The current date and time.
  3. The UUID.

To demonstrate this feature and to prove that the form works correctly you will need to show that the data is being persisted correctly, either by running a database query or an API call depending on the platform and technology you are using.

Feature 2

If the librarian is logged in they should see a book stock list on their home page. This should list all the books stocked by the library. This should display the following:

  1. The book title.
  2. The primary author.
  3. The quantity of this book in stock (based on the ISBN number).

Feature 3

The librarian should see a button labelled Manage user. Clicking on this takes them to a screen that lists all the students showing their name and the number of books they are currently borrowing. Clicking on a student name displays the student borrowing record (what they currently have booked out). This should display the following information on each borrowed book:

  1. The book title.
  2. When it is due to be returned, displaying the date as DD/MM/YYYY but not the time (overdue books need to be highlighted). You can choose how long books can be borrowed.

There should be a Return link or button next to each book. Clicking this returns the book to stock so another user can borrow it.

There should be a textbox where the librarian can enter the UUID of a book the user wants to borrow. This adds the book to the user's borrowing record and prevents the book being booked by a different user.

Feature 4

When the user logs in they can see their borrowing record (title and return date but not the time). They should see a search box where they can search for books by entering a partial book title or author. The search results should display the following:

  1. The book title.
  2. The primary author.
  3. The number stocked.
  4. The number currently available.

Extras

Sensors

Rather than entering the ISBN numbers into the system manually use either a USB barcode scanner or a smartphone camera to scan the barcode on the back of the book.

Data

The Google Books API allows you to retrieve book data based in the ISBN number.