In this project, we created and implemented a database to provide a quick, convenient library catalog. We chose this project because libraries regularly use databases to store information about their books. The database that we designed would be able to automate typical library tasks and activities such as borrowing books, keeping track of rentals (borrowers), and book information. This database would provide/help librarians/borrowers with rentals, book storage, book information, and the like. The library would offer physical books and online books that are temporarily accessible to users. We were also hoping to develop different views for both the librarians and borrowers that used the web page UI. Through Python coding, we would allow users to access the books in the database using PostgreSQL commands. We hoped to create a simple, intuitive application of the topics that we learned in our course.
Through this project, we hoped to learn not just database design, but also webpage and UI design. Not only were we able to learn and use database commands in PostgreSQL, but we also learned how to use Python and HTML to call these commands and access the data in the database, through the creation and utilization of a user interface. Using PostgreSQL, Python, and HTML, we built a web page that accesses a library database containing both physical and virtual books that allows users to borrow, reserve, and add books to the database.
Just recently, a new local library has opened in Ewing Township, NJ. However, this library does not currently have a database in place to manage daily library activities, and only rely on a written system to keep track of book inventory, rentals, etc.
This database would be able to automate typical library tasks and activities such as borrowing books, keeping track of rentals (borrowers), and book information. This database would provide/help librarians/borrowers with rentals, book inventory, book information, and the like. There would be two interfaces to this database system: the librarian interface and the user interface. The librarian(s) would be responsible for adding and modifying new book inventories, book information, and borrowers (e.g. adding new members). Regarding books, the librarian would be able to check-in, reserve, and return books for the members. The borrowers would be able to search the database for books, check-in/out books, reserve, and renew books as well. Our database will give the option of renting either a physical or a digital copy of the book. Regarding the database system itself, librarians and borrowers will be able to search for books by using their title, author, or genre through joining the database tables. By reserving a book, there would be a reserve date and an expiration date, when you would have to return the book. Additionally, each book will have its own unique identification number(whether it is physical or virtual), so it will be able to be located when needed. Overall, as stated above, this database system will be able to perform the normal daily activities/tasks of a library.
The importance of this database is that it will create a more convenient, user-friendly experience for the borrower and the librarian. It addresses the problem statement because it will help alleviate the pressure of having to keep up with the daily book inventory with only a pen and paper system. By moving library activities online, there will be less hassle to maintain and keep track of the library inventory.
We will research library reading lists online and pass them into the database for testing purposes. If the database system would be implemented in an actual library, we would be putting in the actual book inventory in the database.
All public libraries have online databases used to keep track of borrowed books. Additionally, there are other businesses that have a similar system as ours, such as movie rental companies or video game rental companies. We will add the feature of having either online or physical copies of books, a feature that not every library has.
We will maximize the performance of our database by optimizing the query performance. This will allow our database to run quicker and smoother, and there will be less delay in retrieving information and checking out books.
Regarding security, the librarian/database administrator will have more freedom to access the full database. In order to keep from reporting and tracking an incorrect book inventory, borrowers will not be able to have full access to the database system. They will only be able to search for books, view availability/unavailability, etc.
We will back up a copy of the rental information of the books in the library every day. The information about the books available will be backed up weekly. This data could be backed up to a separate hard drive in a different location.
In order to complete this database system, we would need to learn web programming (Python) in order to create a sufficient user interface. Also, we would need to learn how to create the tables and the relationships between entities, including attributes as well. Additionally, learning database languages, such as SQL, would be a necessity, in order to be able to successfully communicate with the database.
The data we would be representing is keeping track of book inventory and the borrowers who borrow them. Each book will have the following properties: title, author, genre, ISBN number, and book/license ID number. If the rental books are overdue, reminders/notifications are sent to the borrower. Another aspect of data we can represent is enabling the borrower to see if a book is available or not.
This table is in BCNF form. Firstly, there are no multivalued values and/or nested relationships, so the table is in First Normal Form. Secondly, there are no keys that are functionally dependent on just one primary key, i.e. Address and Phone # can rely on Name and CustomerID; therefore the table is in Second Normal Form. Thirdly, this table does not have any transitive dependencies, and there are no non-trivial functional dependencies, so this table is in Third Normal Form and BCNF.
This table is in First, Second, and Third Normal Form for the same reasons as listed above, (instead of CustomerID, it is LibrarianID). Additionally, this table is also in BCNF form because there are no functional dependencies that involve a primary key.
This table, in order to be in Second Normal Form, has to be split into two different tables. Since the author, title, virtual, and genre attributes were determined by the ISBN, they had to be moved to another table, where ISBN would become the primary key.
SELECT inventory.book_id, book.title,book.genre FROM borrowsRIGHT JOIN inventory ON borrows.book_id=inventory.book_idNATURAL JOIN bookWHERE genre='History' AND borrows.book_id IS NULL AND inventory.book_id NOT IN(SELECT book_id FROM reserves);
SELECT inventory.book_id, book.title, book.virtual,book.genre FROM borrowsRIGHT JOIN inventory ON borrows.book_id=inventory.book_idNATURAL JOIN bookWHERE book.virtual=TRUE AND borrows.book_id IS null AND inventory.book_id NOT IN(select book_id from reserves);
c80f0f1006