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

1) Give an example of an attribute (or set of attributes) that you can deduce is

ID: 3753578 • Letter: 1

Question

1) Give an example of an attribute (or set of attributes) that you can deduce is not a candidate key, based on this instance being legal.

2) Is there any example of an attribute (or set of attributes) that you can deduce is a candidate key, based on this instance being legal?

3) Add another student in History 105 to the table and give student 53831 another course: show the resulting table

4) What is the only candidate key (and thus the primary key) of this table?

Foreign key Primary key grade, studid^sid login name Carnatic 101 C 53831 dave acs Reggae203B 53832., »53666 Jones onesacs 53688 Smith smithaee 50000 Dave 19 3.3 18 3.4 18 3.2 193.8 1.8 12 2.0 Topology 112 A 5365 History 105 B 5366653650 Smith smith@math 53831 Madayan madayan@music 3832 Guldu guldumusic Enrolled (Referencing relation) Students (Referenced relation) Figure 3.4 Referential Integrity

Explanation / Answer

1) Attributes which cannot be candidate key ----

grade ---- more than one students can have the same grade. So it is not unique.

name ---- more than one students can have the same name. So it is not unique.

age ---- more than one students can have the same age. So it is not unique.

2) Attributes which can be candidate keys

cid ---- course id is unique and not null

sid ---- student id is unique and not null

login ---- login is unique and not null

3

4. Primary keys

Student Table ---- sid

Course Table --- cid

Do ask if any doubt. Please upvote.

History105 B 53666 ---> 53831 Madayan madayan@music 11 1.8