Question 9502 – Relational-Algebra
May 3, 2024
Question 1318 – Relational-Algebra
May 3, 2024
Question 9502 – Relational-Algebra
May 3, 2024
Question 1318 – Relational-Algebra
May 3, 2024

Question 7942 – Relational-Algebra

Consider a database that has the relation schema CR(StudentName, CourseName). An instance of the schema CR is as given below.

The following query is made on the database.

         T1 ← πCourseNameStudentName='SA'(CR))
         T2 ← CR ÷ T1

The number of rows in T2 is ____________.

Correct Answer: A

Question 21 Explanation: 
(1) T1 ← πCourseNameStudentName = ‘SA’(CR))
The σStudentName = ‘SA’(CR) will produce the following

⇾ The result of T1 ← πCourseNameStudentName=’SA’(CR)) is

(2) T2 ← CR÷T1
⇾ We see that SA is enrolled for CA, CB and CC.
⇾ T2 will give the StudentNames those who have enrolled for all the CA, C, CC courses. So, the following Students are enrolled for the given 3 courses.

⇾ So, the output of T2 will have 4 rows.
A
4
B
5
C
6
D
7
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!