Question: Note: The previous problem is backward from how database design works. We do not start with data, we start by picking keys that implement the
Note: The previous problem is "backward" from how database design works. We do not start with data, we start by picking keys that implement the problem description.
Consider the Library database
from class. Pick the appropriate keys for each description of the Library's meaning below. Give your answers in the following form:
PKx y
UQi j
Where PK denotes the primary key, and UQ denotes additional candidate keys if necessary, and x y i and j are replaced with attribute names. Do not include any extra or unnecessary keys in your answer.
Note: ignore the instance data given in the Library example in the slides it will not necessarily match these problem descriptions. Instead, use the slide showing the schemas.
Problem a Give keys for the CheckedOut table such that a patron can only check out one book, and a book can only be checked out by one patron.
Problem b Give keys for the Titles table such that no two books can have the same ISBN, and an Author can publish multiple books, but not with the same Title, but different Authors can publish books with the same Title.
Problem c Give keys for the Titles table such that no two books can have the same ISBN, and an Author can publish multiple books, but not with the same Title, and different Authors can not publish books with the same Title.
Problem d Give keys for the Phones table such that a patron can have multiple different phone numbers, but multiple different patrons can not have the same phone number.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
