Question
SQL questions: (2) A relation R(A,B,C,D,E) has exactly four superkeys: CDE, ACDE, BCDE and ABCDE. State the canddiate key(s). (3) It is known that R(A,B,C,D,E)
SQL questions:
(2) A relation R(A,B,C,D,E) has exactly four superkeys: CDE, ACDE, BCDE and ABCDE. State the canddiate key(s).
(3) It is known that R(A,B,C,D,E) have two candidate keys A and BCDE. How many superkeys are there?
(4) Consider the relation
Enrollment(StudentId, CourseId, InstructorId, Grade).
It stores grades of courses students enrolled in, together with the id of the instructors of the courses. For example, ('S1', 'C101', 'F402', 'A') indicates that the studnet 'S1' has enrolled in the course 'C101', taught by instructor 'F402', and received a grade of 'A'. A student can take many courses but may not have grades yet (semesters not yet completed, for example). A course may have many students but may not have an official instructor.
(a) Can StudentId have a null value? (b) Can CourseId have a null value? (c) Can InstructorId have a null value? (d) Can Grade have a null value? (e) Show the candidate key(s).
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started