Problem 1 (10 Points). Table Salelnfo records monthly revenue for a store and st
ID: 3873936 • Letter: P
Question
Problem 1 (10 Points). Table Salelnfo records monthly revenue for a store and store information. Given the functional dependencies identified below, identify the primary key. Do not assume any further functional primary key a. SalesInfo: (StoreName, Month-Year, Revenue, Location, ChiefManagerName, Phone) All FDs: StoreName Location Location®ChiefManagerName ChiefManagerNameBPhone StoreName+Month-Year®Revenue b. MedsAdmin: (MedAdmin, Nurseld, NurseName, dosage MedDate/Time, Rx#, Hospita!Admin#, Patient#) MedName, MedAdmín# ® Nurseld. MedDate/Time Nurseld ® NurseName Rx# ® MedName. Dosage, Hospita!Admin# Hospita!Admin# ® Patient# All FDs:
Explanation / Answer
Solution:
a)
Let's find the candidate keys first, we know that one of the candidate keys is the primary key.
The candidate key is StoreName+ Month-Year,
there is no such candidate key possible which drives all the attributes of the table.
so there is only one candidate key then that is the primary key also
Primary key: StoreName+ Month-Year
b)
here also there is only one candidate key which is also a primary key and that is
MedAdmin#+Rx#, together they both drive all the attributes of the table:
Primary key:MedAdmin#+Rx#.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.