Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
153 views
in Programming by (78.8k points)
closed by

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

CR

Student Name

Course Name

SA

CA

SA

CB

SA

CC

SB

CB

SB

CC

SC

CA

SC

CB

SC

CC

SD

CA

SD

CB

SD

CC

SD

CD

SE

CD

SE

CA

SE

CB

SF

CA

SF

CB

SF

CC

 

The following query is made on the database.

T1 ← πCourseNaneStudentName=’SA’(CR))

T2 ← CR ÷ T1
The number of rows in T2 is _______. 

1 Answer

0 votes
by (79.1k points)
selected by
 
Best answer

Explanation: Query T1

T1 ← πCourseNaneStudentName=’SA’(CR))

Output of this query are the courses enrolled by student SA

Output of T1

CA

CB

CC

 

Query T2: T2 ← CR ÷ T1
It results in the name of the students who enrol in all the courses that are the result of query T1 .

Output of query T2

SA

SC

SD

SF

 

So, the number of rows returned by T2 are 4.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...