Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c.Find students (ssn, name, major, status) who satisfied all prerequisites of each class they are enrolled in. d. Find students (ssn, name, major, status) who

image text in transcribed

c.Find students (ssn, name, major, status) who satisfied all prerequisites of each class they are enrolled in.

d. Find students (ssn, name, major, status) who are enrolled in a class for which they have not satisfied all its prerequisites.

it is a multiple table sql.

Consider the following University Database schemas. Primary keys are underlined. Relational Schemas department (dcode, dname, chair) course (dcode, cno, title, units) prereq (dcode, cno, pcode, pno) class (class, dcode, cno, instr) Meaning and additional information Department identified by dcode is named dname and has department chair with ssn chair (this ssn must appear in the table faculty below) Course identified by (dcode,cno) has title and units (e.g., 3 units/credits) Course (dcode, cno) has a prerequisite course (pcode, pno) Class identified by class id is offered by department dcode, has course number cno, and is taught by instructor with ssn instr (this ssn must appear in the table faculty below) Faculty identified by ssn has a name and rank, and belongs to department dcode (which must appear in the table department) Student identified by ssn has a name, major and status. Student identified by ssn is enrolled in the class identified by class no (ssn must appear in the table student, and class must appear in the table class) Student identified by ssn took the course identified by (dcode, cno) and received the grade. Assume that the only grades available are A, B, C and F. faculty (ssn, name, dcode, rank) student (ssn, name, major, status) enrollment (class, ssn) transcript (dcode, cno, ssn, grade) Implement the following queries using: A. Tuple relational calculus B. Relational algebra C. SQL Consider the following University Database schemas. Primary keys are underlined. Relational Schemas department (dcode, dname, chair) course (dcode, cno, title, units) prereq (dcode, cno, pcode, pno) class (class, dcode, cno, instr) Meaning and additional information Department identified by dcode is named dname and has department chair with ssn chair (this ssn must appear in the table faculty below) Course identified by (dcode,cno) has title and units (e.g., 3 units/credits) Course (dcode, cno) has a prerequisite course (pcode, pno) Class identified by class id is offered by department dcode, has course number cno, and is taught by instructor with ssn instr (this ssn must appear in the table faculty below) Faculty identified by ssn has a name and rank, and belongs to department dcode (which must appear in the table department) Student identified by ssn has a name, major and status. Student identified by ssn is enrolled in the class identified by class no (ssn must appear in the table student, and class must appear in the table class) Student identified by ssn took the course identified by (dcode, cno) and received the grade. Assume that the only grades available are A, B, C and F. faculty (ssn, name, dcode, rank) student (ssn, name, major, status) enrollment (class, ssn) transcript (dcode, cno, ssn, grade) Implement the following queries using: A. Tuple relational calculus B. Relational algebra C. SQL

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions