Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am looking to confirm my homework answers for relational keys for databases. I got a little confused with superkeys and candidate keys. The following

I am looking to confirm my homework answers for relational keys for databases. I got a little confused with superkeys and candidate keys.

The following is the asignment:

For each relation provided in Excel files, identify:

1.Primary key

2.Attributes

3.Foreign key(s)

4.Degree of the relation

Cardinality of the relation

Category:

1.Primary key ---------------- >cat_id

2.Attributes ---------------- >cat_id, cat_desc

3.Foreign key(s) --------------- > cat_id, cat_desc

4.Degree of the relation ----------- >2

5.Cardinality of the relation ------ >4

Color:

1.Primary key ---------------- >color

2.Attributes ---------------- >color

3.Foreign key(s) --------------- >none

4.Degree of the relation ----------- >1

5.Cardinality of the relation ------ >12

Customer:

1.Primary key ---------------- >c_userid, c_password

2.Attributes ---------------- >c_id, c_last, c_first, c_mi, c_birthdate, c_address, c_city,

c_state, c_zip, c_dphone, c_ephone, c_userid, c_password

3.Foreign key(s) --------------- >c_id

4.Degree of the relation ----------- >13

5.Cardinality of the relation ------ >6

Inventory:

1.Primary key ---------------- >inv_id,

2.Attributes ---------------- >inv_id, item_id, color, inv_size, inv_price, Inv_qoh

3.Foreign key(s) --------------- >item_id

4.Degree of the relation ----------- >6

5.Cardinality of the relation ------ >36

Item:

1.Primary key ---------------- >item_id

2.Attributes ---------------- >item_id, item_desc, cat_id, item_image

3.Foreign key(s) --------------- >item_desc

4.Degree of the relation ----------- >4

5.Cardinality of the relation ------ >7

Order_line:

1.Primary key ---------------- > inv_id

2.Attributes ---------------- >o_id, inv_id, ol_quantity

3.Foreign key(s) --------------- >inv_id, ol_quantity

4.Degree of the relation ----------- >3

5.Cardinality of the relation ------ >10

Order_Source:

6.Primary key ---------------- >os_id

7.Attributes ---------------- >os_id, os_desc

8.Foreign key(s) --------------- >os_desc

9.Degree of the relation ----------- >2

10.Cardinality of the relation ------ >6

Orders:

6.Primary key ---------------- >o_id

7.Attributes ---------------- > 0_id, 0_date, 0_methpmt, c_id, os_id

8.Foreign key(s) --------------- >os_id

9.Degree of the relation ----------- >5

10.Cardinality of the relation ------ >6

Shipment:

11.Primary key ---------------- >

12.Attributes ---------------- >ship_id, ship_date_expected

13.Foreign key(s) --------------- >

14.Degree of the relation ----------- >2

15.Cardinality of the relation ------ >5

Shipment_Line:

16.Primary key ---------------- >

17.Attributes ---------------- >ship_id, inv_id, sl_quantity, sl_date_received

18.Foreign key(s) --------------- >

19.Degree of the relation ----------- >4

20.Cardinality of the relation ------ >11

I am attaching some of the excel spreadsheets. I just want to check if my answers are correct or what's wrong.

color super key candidate key primary key alternate key foreign key
Blue color color color
Bright Pink
Eggplant
Khaki
Light Grey
Navy
Red
Royal
Sky Blue
Spruce
Turquoise

White

----------------

CUSTOMER

c_id c_last c_first c_mi c_birthdate c_address c_city c_state c_zip c_dphone c_ephone c_userid c_password super key candidate key primary key alternate key foreign key

1 Harris Paula E 4 /9 /1953 1156 Water Street, Apt. #3 Osseo WI 54705 7155558943 7155559035 harrispe asdfjk c_id, c_password

2 Garcia Maria H 7 /14/1958 2211 Pine Drive Radisson WI 54867 7155558332 7155558332 garciamm 12345 c_id, c_password, c_birthdate x

3 Miller Lee 1 /5 /1936 699 Pluto St. NW Silver Lake WI 53821 7155554978 7155559002 miller zxcvb c_last, c_first, c_birthdate x

4 Chang Alissa R 10/1 /1976 987 Durham Rd. Apple Valley MN 55712 7155557651 7155550087 changar qwerui c_userid, c_password x

5 Edwards Mitch M 11/20/1986 4204 Garner Street Washburn WI 54891 7155558243 7155556975 edwardsam qwerty c_birthdate, c_userid, c_address x

6 Nelson Kyle E 12/4 /1984 232 Echo Rd. Minnetonka MN 55438 7151113333 7155552222 nelsonke clever

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

Why do HCMSs exist? Do they change over time?

Answered: 1 week ago