Given the following STUDENT‐COURSE scheme: STUDENT (Rollno, Name, Courseno)…
2021
Given the following STUDENT‐COURSE scheme: STUDENT (Rollno, Name, Courseno) COURSE (Courseno, Coursename, Capacity), where Rollno is the primary key of relation STUDENT and Courseno is the primary key of relation COURSE. Attribute Coursename of COURSE takes unique values only. The number of records in COURSE and STUDENT tables are 3 and 5 respectively. Following relational algebra query is executed: R=STUDENT X COURSE
Match List I with List II in context to the above problem statement.
\(\begin{array}{|c|l|c|l|l|} \hline \text{List I} & \text{List II} \\ \hline \text{A. Degree of table R} & \text{I. 15} \\ \hline \text{B. Cardinality of table R} & \text{II. NIL} \\ \hline \text{C. Foreign key of relation STUDENT} & \text{III. 6} \\ \hline \text{D. Foreign key of relation COURSE} & \text{IV. Courseno} \\ \hline \end{array}\)
Choose the correct answer from the options given below:
- A.
A ‐III , B ‐I , C ‐IV , D ‐ II
- B.
A ‐I , B ‐III , C ‐IV , D ‐ II
- C.
A ‐I , B ‐III , C ‐IV , D ‐ II
- D.
A ‐I , B ‐III, C ‐II , D ‐ IV
Attempted by 165 students.
Show answer & explanation
Correct answer: A
Answer and reasoning:
Degree of table R (STUDENT × COURSE): STUDENT has 3 attributes (Rollno, Name, Courseno) and COURSE has 3 attributes (Courseno, Coursename, Capacity). The Cartesian product includes attributes from both relations, so degree = 3 + 3 = 6.
Cardinality of table R: There are 5 tuples in STUDENT and 3 tuples in COURSE, so cardinality = 5 × 3 = 15.
Foreign key of relation STUDENT: The attribute Courseno in STUDENT refers to COURSE.Courseno (the primary key of COURSE), so STUDENT.Courseno is a foreign key referencing COURSE.
Foreign key of relation COURSE: COURSE has Courseno as its primary key but contains no attribute that references another relation, so COURSE has no foreign key (NIL).
Final matching: Degree → 6, Cardinality → 15, Foreign key of STUDENT → Courseno, Foreign key of COURSE → NIL
A video solution is available for this question — log in and enroll to watch it.