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

image text in transcribed

image 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 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. f. Find courses (dcode, cno) that do not have prerequisites g. Find courses (dcode, cno) that do have some prerequisites h. Find classes (class, dcode, cno, instr) that are offered this semester and have prerequisites. i. Find students (ssn, name, major, status) who received only the grades A or B in every course they have taken (must appear in Transcripts) j. Find students (ssn, name, major, status) who are currently enrolled in a class taught by professor Brodsky (name = "Brodsky" in faculty). 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 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. f. Find courses (dcode, cno) that do not have prerequisites g. Find courses (dcode, cno) that do have some prerequisites h. Find classes (class, dcode, cno, instr) that are offered this semester and have prerequisites. i. Find students (ssn, name, major, status) who received only the grades A or B in every course they have taken (must appear in Transcripts) j. Find students (ssn, name, major, status) who are currently enrolled in a class taught by professor Brodsky (name = "Brodsky" in faculty)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions