Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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,

image text in transcribedimage text in transcribed

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 son 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 a. Find students (ssn, name, major, status) who have taken the course "cs530 (must be in transcripts) b. Find students (ssn, name, major, status) named "John (i.e., name = "John" in student who have taken the course "CS 530" (must be in transcripts) 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. e. Find students (ssn, name, major, status) named John who are enrolled in a class for which they have not satisfied all its prerequisites. 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 son 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 a. Find students (ssn, name, major, status) who have taken the course "cs530 (must be in transcripts) b. Find students (ssn, name, major, status) named "John (i.e., name = "John" in student who have taken the course "CS 530" (must be in transcripts) 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. e. Find students (ssn, name, major, status) named John who are enrolled in a class for which they have not satisfied all its prerequisites

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

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

Students also viewed these Databases questions

Question

Describe the job youd like to be doing five years from now.

Answered: 1 week ago

Question

So what disadvantages have you witnessed? (specific)

Answered: 1 week ago