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...

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 :) [ 2 tables ] one as example and one after anomaly update please

0 0
Add a comment Improve this question Transcribed image text
Answer #1

An update anomaly is a data inconsistency that results from data redundancy and a partial update. For example, each employee in a company has a department associated with them as well as the student group they participate in.

Suppose You have below entries in your table:
book id book title person_id due_date first_name 1 Bookl 2 Book2 3 Book3 last_name LName1 15/2/2007 Name2 15/2/2008 LNamel 15This is how the table looks like before anomaly.


Now suppose, later at point, you realise that the name of the person with person id 1 is wrong in the tables and his name is "NameX" instead of "Name1". Then you need to update the table whereever the "Name1" is present as the firstname corresponding to personId 1. If the person who is updating the data, don't know that the redundant data is lying around your table, he may just go and update a single occurence of firstname, which can cause data anomaly.

After Anomaly table may loook like below:
1 book_id book title person_id due_date first_name last_name returned_date late_fee 2 1 Bookl 2 Book2 3 Book3 1 12/2/2007 NamYou see that in one row, the first name corresponding to person_id 1 is "NameX" while in other it is "Name1". This is data anomaly and is caused by incorrect update operation, which was caused due to duplicate data lying in the table. Hence it is always recommended to keep the data at one place only and refer to data from there itself.

Add a comment
Know the answer?
Add Answer to:
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...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • schema book: book_id, book_name, author_id. Author: author_id, first_name, last_name. DOB, social. i am trying to write...

    schema book: book_id, book_name, author_id. Author: author_id, first_name, last_name. DOB, social. i am trying to write a query that lists the first and last name of each author and counts how many books they wrote if they wrote more than one. but i am having issue . this is what i have so far, select book_name, count(b.book_name) as "number of books" from book b join author a on (b.author_id = a.author_id) group by b.book_name having count (a.author_id) >1;

  • Given: Create table Book ( Book_id integer, Book_title varchar(50), Author varchar(50), Publish_date date, Type varchar(30), Edition...

    Given: Create table Book ( Book_id integer, Book_title varchar(50), Author varchar(50), Publish_date date, Type varchar(30), Edition number, Quantity number, Primary key (Book_id) ); insert into Book values (1,'The Old Man and the Sea','Hemingway' ,date '1978-1-1','hardcopy',3,2); insert into Book values (2,'The Old Man and the Sea','Hemingway' ,date '1979-1-1','hardcopy',4,1); insert into Book values (3,'The Old Man and the Sea','Hemingway' ,date '1980-1-1', 'hardcopy',5,10); insert into Book values (4,'A Farewell to Arms','Hemingway' ,date '1986-1-1','hardcopy',2,18); insert into Book values (5,'For Whom the Bell Tolls','Hemingway' ,date...

  • Eagle Promise Library carries many book titles, sometimes multiple copies of a title. For each title,...

    Eagle Promise Library carries many book titles, sometimes multiple copies of a title. For each title, the author(s), and call number are also recorded. The library will loan as many as five books to anyone with a borrower's card. Information kept on each loan is the book title, the specific copy lent, the borrower and the due date. Draw an ER diagram data model for this library system, showing relationships with minimum and maximum cardinalities. Also, list the fields in...

  • In this project, you will construct an Object-Oriented framework for a library system. The library must...

    In this project, you will construct an Object-Oriented framework for a library system. The library must have books, and it must have patrons. The patrons can check books out and check them back in. Patrons can have at most 3 books checked out at any given time, and can only check out at most one copy of a given book. Books are due to be checked back in by the fourth day after checking them out. For every 5 days...

  • How to write the insert, search, and remove functions for this hash table program? I'm stuck......

    How to write the insert, search, and remove functions for this hash table program? I'm stuck... This program is written in C++ Hash Tables Hash Table Header File Copy and paste the following code into a header file named HashTable.h Please do not alter this file in any way or you may not receive credit for this lab For this lab, you will implement each of the hash table functions whose prototypes are in HashTable.h. Write these functions in a...

  • Create a procedure to update the sales history table following the requirements below. A table creation...

    Create a procedure to update the sales history table following the requirements below. A table creation script is provided below. a) Call the procedure: UPDATE_SALES_HISTORY (The procedure name is important for our scripts to test and grade your code; please do not rename it (otherwise our scripts will not run and your score will be 0). b) The procedure takes 2 parameters: (4-digit-year, 2-digit-month). Both parameters will be numeric, e.g., (2019, 11) will denote 2019 (year) and November (month). The...

  • Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of...

    Using the book, write another paragraph or two: write 170 words: Q: Compare the assumptions of physician-centered and collaborative communication. How is the caregiver’s role different in each model? How is the patient’s role different? Answer: Physical-centered communication involves the specialists taking control of the conversation. They decide on the topics of discussion and when to end the process. The patient responds to the issues raised by the caregiver and acts accordingly. On the other hand, Collaborative communication involves a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT