Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

home / study / engineering / computer science / computer science questions and a

ID: 3890952 • Letter: H

Question

home / study / engineering / computer science / computer science questions and answers / given the following table: library(book_id,book_title,person_id,due_date,first_name,last_name,returned_date,late_fee)...

Your question has been answered

Let us know if you got a helpful answer. Rate this answer

Question: Given the following table: library(book_id,book_title,person_id,due_date,first_name,last_name,re...

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 :)

PLEASE NOTE THAT THERE ARE 3 CANDIDATE KEYS BOOK_ID, PERSON_IS AND DUE_DATE.

so how will this create a new update anamoly table? any explanation pleaseeeeeeee

Explanation / Answer

library(book_id,book_title,person_id,due_date,first_name,last_name,returned_date,late_fee)

THERE ARE 3 CANDIDATE KEYS BOOK_ID, PERSON_IS AND DUE_DATE

Update anomaly is the anomaly which causes the data redundancy and inconsistency in the database. I.e. If the user tried to update the data in one table that same attribute need to be updated across the database in other tables as well but that update will not happen due to anomaly that anomaly is called update anomaly. This happens because of bad normalization or there is no normalization happened on that database.

If we have normalized the database correctly by following all rules then there will no chance for anomaly.

Here the library database is not normalized i.e this database is not confined to normalization

Here in this we have 3 CANDIDATE KEYS BOOK_ID, PERSON_Id and DUE_DATE. But the other attributes is not fully dependent on all these candidate keys.

Here some attributes are dependent on some candidate keys only. Here in this database firstname and lastname are only depending upon PERSON_ID, and book_title is depending on book_id only and the return_date and late fee depends upon 3 CANDIDATE KEYS.

This is not satisfying 2 nd normal form if we make the database to satisfy all the normal forms then there will be no anomaly in this database.