Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8. Write SQL queries to answer the following questions: A) Which students are enrolled in both Database and Networking? (Hint: use SectionNo for each class,

image text in transcribed

8. Write SQL queries to answer the following questions:

A) Which students are enrolled in both Database and Networking? (Hint: use SectionNo for each class, so that you can determine theanswer from the Registration table by itself. Do this without a join: use GROUP BY and HAVING.)

B) Which instructors can teach either Syst Analysis or Syst Design, but cannot teach both? In our data, there are no faculty who teach only one but not the other.

shon n thsfigure are data for an ASSIGNMENT relation h represents a many-to-many relationship between faculty and Faculty Name (25 characters) CoumselD re characters, primary key) Vrite a database description for each of the relations shown, sing SQL DDL (shorten, abbreviate, or change any data ames, as needed for your SQL version). Assume the fol- wing attribute data types: CourseName (15 characters) DateQualified (date) SectionNo (integer, primary key) Semester (7 characters) STUDENT (StudentlD, StudentName) QUALIFIED (FacultyID, CourselD, DateQualified) StudentID StudentName FacultylD DateQualified 38214 54907 66324 70542 ISM 3112 ISM 3113 ISM 4212 ISM 4930 ISM 3113 ISM 3112 9/1988 9/1988 9/1995 9/1996 9/1991 9/1991 Altvater 3467 3467 4756 4756 Marra FACULTY (FacultyID, FacultyName) SECTION (SectionNo, Semester, CourselD) FacultylD FacultyName SectionNoSemester CourselD -2008 -2008 -2008 -2008 ISM 3113 ISM 3113 ISM 4212 ISM 4930 2143 3467 4756 2712 2713 Berndt 2715 COURSE (CourselD, CourseName) REGISTRATION (StudentlD, SectionNo, Semester CourselD CourseName StudentlD SectionNo Semester ISM 3113 ISM 3112 ISM 4212 ISM 4930 Syst Analysis Syst Design Database Networking 38214 54907 54907 66324 2714 2715 2713 -2008 -2008 l-2008 I-2008 URE 11 Class scheduling relations (missing ASSIGNMENT)

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

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions