Just by observing the tables below, what would you choose the primary key of eac
ID: 3743112 • Letter: J
Question
Just by observing the tables below, what would you choose the primary key of each table? Based on base the explanation of the attributes of the given below, write down all the foreign keys. For example, if you think that Rep_Office is a foreign key in the Salesreps table, you should write:
- Rep_Office is a foreign key in the Salesreps table because it refers to the primary key (office attribute) of the offices table.
Do the same for every foreign key that you find in the entire database.
Salesreps Age ReBaQmce Title ure Date Manager Quota Sales Bill Adams 37 13Sales Rep 12-FEB-88 104 350000 367911 350000 474050 108Larry Fitch 62 2Sales Mgr 12-OCT-89 106 350000 361865 l0-FEB-90 28 108 QSA K47 Price QtonHand RATCHET LINK WIDGET REMOVER 2750 25 REDUCER 9 900-LB BRACE Customers Cust. Rep Aredit Limit Ace International Smithson Corp Offices Region Western Ma Target Sales 108 300000 186042 106575000 692637 104 800000 735042 105350000 367911 WesternExplanation / Answer
Salesreps -
Empl_Num is primary key in Salesrep as it can uniquely represent every tuple
Rep_Office is a foreign key in the Salesreps table because it refers to the primary key of the offices table.
Manager is a foreign key in the Salesreps table because it refers to the primary key of the Manager table.
Orders -
Order_Num is primary key as it can uniquely represent every tuple
Cust is a foreign key because it refers to the primary key of the Customers table.
Rep is a foreign key because it refers to the primary key of the Salesrep table.
Mfr is a foreign key because it refers to the primary key of the Manufacture table.
Product is a foreign key because it refers to the primary key of the Products table.
Products -
Product_id is primary key as it can uniquely represent every tuple
Mfr_id is a foreign key because it refers to the primary key of the Manufacture table.
Customers -
Cust_Num is primary key as it can uniquely represent every tuple
Cust_Rep seems to be a foreign key but i am not able to figure out what it means.
Offices -
Office is primary key as it can uniquely represent every tuple
Mgr is a foreign key in the Salesreps table because it refers to the primary key of the Manager table.
Hope i have answered your question satisfactorily.Leave doubts in comment section if any.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.