Given the University Schema above, specify the following queries using relationa
ID: 3846908 • Letter: G
Question
Given the University Schema above, specify the following queries using relational algebra.a) Retrieve the name and Transcript of each senior student ( class = 5 ) majoring in COSC. Transcript includes course name, course number, credit hours, semester, year, and grade for each course completed by the student.
b) Retrieve the names and major departments of all straight A students ( students who have a grade of A in all their courses )
c) Retrieve the names and major departments of all students who do not have any grade of A in any of their courses. STUDENT Name Student number l Class Maior l COURSE Cou name Course number I Credit hours Department l Course number l uisite number SECTION section identifier TCourse number TSomester I Year Tinstructor l GRADE REPORT Student number section identifier Grade
Explanation / Answer
a.
SELECT st.name, c.Course_name, c.Course_number, c.Credit_hours, s.Semester,
s.Year, g.Grade
FROM student st, course c, grade_report g, section s
WHERE st.Student_number = g.Student_number
AND g.Section_identifier = s.Section_identifier
AND s.Course_number = c.Course_number
AND st.Class = "2";
b.
SELECT st.name, c.Course_name, c.Course_number, c.Credit_hours, s.Semester,
s.Year, g.Grade
FROM course c
INNER JOIN section s ON c.Course_number = s.Course_number
INNER JOIN grade_report g ON s.Section_identifier = g.Section_identifier
INNER JOIN student st ON g.Student_number = st.Student_number
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.