Given the following table: library(book_id,book_title,person_id,due_date,first_n
ID: 3889716 • Letter: G
Question
Given the following table:
library(book_id,book_title,person_id,due_date,first_name,last_name,returned_date,late_fee)
With the following assumptions: -
One copy of each book is held by the library -
Person_id is unique for each person, book_id is unique for each book -
The library table is meant to store information about loans of books made by the library.
Here are the functional dependencies for the above table:
Book_id book_title
Person_id first_name,last_name
Book_id,person_id,due_date returned_date,late_fee
Give an example of update anomaly for this table
ANY HELP PLEASE...ANY EXPLANATION WOULD BE REALLY HELPFUL :)
Explanation / Answer
Suppose we have the following entries in the library table-
The above relation follows all the assumptions and functional dependencies. Also there can be a possibility that the same person can loan many books because it is not mentioned that one person can loan only one book.
Now suppose if there is an error in the person's name or id then it must be updated in multiple entries in the table .
For example, if there is an error in the name of person with P1 id then his name must be updated 3 times as he has entries thrice since he has issued 3 books. So if the update is not performed correctly at all places then it will lead to inconsistent data.
Thus this is only update anomaly where we have inconsistent data due to improper or incorrect update operation of redundant data.
Please ask if any query regarding the answer.
Book_id Book_title Person_id Due_date First_name Last_name return_date Late_fee B1 Data Structures in C P1 12 sep 2017 Rohan Mehra 10 sep 2017 0 B2 Operating System concepts P3 23 aug 2017 Simran Jha 1 Sep 2017 8 B3 Data Communication and Networking P1 17 Aug 2017 Rohan Mehra 30 Aug 2017 13 B4 Digital Integrated Electronics P2 25 sep 2017 Maya Singh 15 sep 2017 0 B5 Automata and Computability P4 19 Aug 2017 Anuj Jain 21 aug 2017 2 B6 Computer Organization and Design P3 12 sep 2017 Simran Jha 28 sep 2017 16 B7 Programming in C P1 23 sep 2017 Rohan Mehra 15 sep 2017 0 B8 The Complete Reference of Java P6 10 aug 2017 Mitali Sen 5 Sep 2017 25Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.