Question Title: Library Database System Basics
- What is the main purpose of the βSchool Library Systemβ database shown above?
- Why was βBookIDβ chosen as the primary key in the βBooksβ table?
- Why is βCopiesAvailableβ set as a Number data type instead of Text in the βBooksβ table?
- How does the βBookIDβ field connect the βBooksβ and βBorrowersβ tables?
- How would you set up the relationship between βBooksβ and βBorrowersβ in a DBMS like Microsoft Access?
Question Title: Advanced Library Database Operations
- Based on the sample data, which book has been borrowed more than once, and how can the database confirm this?
- What would happen in the DBMS if you tried to add a record to βBorrowersβ with a BookID that doesnβt exist in βBooksβ (e.g., BookID 4)?
Ruwan Suraweera Changed status to publish 7 days ago
Answers and Descriptions:
- Answer: The main purpose is to track books and their borrowers, ensuring efficient management of library resources.
Description: This database helps librarians know which books are available, who has borrowed them, and when, reducing manual tracking errors and improving efficiency. - Answer: βBookIDβ is unique for each book, ensuring no two books have the same identifier, which prevents duplication.
Description: A primary key like βBookIDβ (e.g., 1, 2, 3) uniquely identifies each record. Titles or authors could repeat (e.g., multiple books by Tolkien), but βBookIDβ cannot. - Answer: βCopiesAvailableβ is a numeric value (e.g., 5, 3) that may need calculations (e.g., subtracting when borrowed), which requires a Number data type.
Description: If it were Text, you couldnβt perform math operations like reducing stock when a book is borrowed. Number ensures functionality in an electronic system. - Answer: βBookIDβ is the primary key in βBooksβ and a foreign key in βBorrowers,β linking each borrowed book to its details in the βBooksβ table.
Description: For example, BorrowerID 101 (Alice) has BookID 1, which matches βThe Hobbitβ in the βBooksβ table, showing what she borrowed. - Answer: In the DBMS, drag βBookIDβ from the βBooksβ table to βBookIDβ in the βBorrowersβ table in the Relationships window to create a one-to-many link.
Description: One book (e.g., BookID 1) can be borrowed by many students (e.g., Alice and Clara), and the DBMS enforces this link to maintain data integrity.
Β
Β
Question Title:Β Advanced Library Database Operations
Answers and Descriptions:
- Answer: βThe Hobbitβ (BookID 1) has been borrowed twice (by Alice and Clara), confirmed by checking the βBookIDβ in the βBorrowersβ table.
Description: The relational link shows BookID 1 appears in two records (BorrowerID 101 and 103), proving its popularity without needing manual counts. - Answer: The DBMS would reject the record or show an error because the foreign key βBookIDβ must match an existing primary key in βBooksβ to maintain referential integrity.
Description: If BookID 4 isnβt in βBooks,β adding it to βBorrowersβ would break the relationship (e.g., no book details exist), so the system prevents this.
Β
Ruwan Suraweera Changed status to publish May 22, 2025