Consider the following relational schema: COURSES (cno, cname) STUDENTS…

PYQ GATE 1994

Consider the following relational schema:

COURSES (cno, cname)
STUDENTS (rollno, sname, age, year)
REGISTERED FOR (cno, rollno)

The underlined attributes indicate the primary keys for the relations. The ‘year’ attribute for the STUDENTS relation indicates the year in which the student is currently studying (First year, Second year etc.)

(Underlined in the source copy: cno in COURSES, rollno in STUDENTS, and cno in REGISTERED FOR.)

(a) Write a relational algebra query to

Print the roll number of students who have registered for cno 322.

(b) Write a SQL query to

Print the age and year-of the youngest student in each year.

Attempted by 1 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…