Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A retail store database (retailApp) has the following three tables: A. What is t

ID: 3839312 • Letter: A

Question

A retail store database (retailApp) has the following three tables:

A. What is the PK for each table?

B. WhataretheFKs?

C. List two candidate keys

D. List two secondary keys

PRODUCT PROD ID PROD NAME PROD DESCRPTION PRDO QUANTITY PROD PRICE 50 Flat panel $500.00 1 TV $400.00 Desktop 2 Computer 100 30 $200.00 Digital Sony 3 Camera (New) E CUSTMoER INVOICE CUS GENDER CUS CELL PHONE NUMBER CUS ID Male Abe 617-373-3817 Zeid 1 1000 2 1005 Smith John Female 123-456-7890 Mary 3 1010 789-348-7892 Female Brown New CUSTMOER EE INVOICE NV NUM NV DATE CUS ID PROD ID INV UNITs INV PRICE INV SUBTOTAL INV TAX INV TOTAL 100 9/1/2014. $500.00 $500.00 $25.00 $525.00 105 9/15/2014. 1 $400.00 $400.00 $20.00 $420.00 1 $200.00 110 10/1/2014. $10.00 $200.00 $210.00

Explanation / Answer

A. Primary key is a key that uniquely identifies each record in a table.

Primary key for each table given below:

PRODUCT: PROD_ID

CUSTOMER: CUS_ID

INVOICE : INV_NUM

B.A foreign key is usually a primary key of one table(like PRODUCT table) that is used in other table(like INVOICE table) to establish relationship between both tables.

Foriegn key for each table:

PRODUCT: None

CUSTOMER: None

INVOICE: PROD_ID and CUS_ID

C. Candidate keys are the set of columns from which primary key can be selected.
It can act as a primary key for a table to uniquely identify each record in that table.

Candidate keys in given tables are:

1) CUS_ACCOUNT_NUMBER
2) CUS_ID

D.The candidate key which are not selected for primary key are known as secondary keys.

Secondary keys in given tables are:

1) CUS_ACCOUNT_NUMBER
2) CUS_CELL_PHONE_NUMBER + CUS_LNAME + CUS_FNAME

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote