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
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:
This 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:
You 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.
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...
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...
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...
ERD Diagram Based solely on the description of library operations below (without making up any additional facts/requirements) design a data model that avoids update anomalies. You can use text to describe your model if you want. If so be clear as to what columns have primary and foreign keys, as well as what table a FK refers to. You can sketch it out on paper and scan it. You can use Visio. You can use some other tool if you...
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...
In this assignment you will implement software for your local library. The user of the software will be the librarian, who uses your program to issue library cards, check books out to patrons, check books back in, send out overdue notices, and open and close the library. class Calendar We need to deal with the passage of time, so we need to keep track of Java. Declare this variable as private int date within the class itself, not within any...
The primary keys are underlined. The foreign keys are denoted by asterisks (*). Description of the schema: • person — keeps track of the people who borrow books from the library. The attributes contain personal and contact information. • author — keeps track of personal information about authors. • publisher — keeps track of the publisher information. To keep it simple, most of the attributes have been truncated in the sample database. 1 trivial dependencies are things like X→X or...
DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed April 8 Introduction to Coursework You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database...
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...
Use the case study description and list of requirements below to create an entity-relationship diagram showing the data requirements of the All You Need Are Toys Library database. Your ERD should be able to be implemented in a relational DBMS. Toy libraries operate in a manner similar to book libraries, with members able to borrow a toy for a number of weeks then return it. As with book libraries, toy libraries enable families to have access to a wider range...
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...