Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[sql] After the single-unit queries are constructed, they can be combined using the set operator corresponding to the keywords found in the query condition: set

[sql]

After the single-unit queries are constructed, they can be combined using the set operator corresponding to the keywords found in the query condition: set intersect () for AND, set union () for OR, and set difference (-) for NOT.

  1. Query: Return the names of the departments whose addresses are 'MCS' or 'HOH'.
  1. In plain English, write down the first query unit.

Answer:

  1. In plain English, write down the second query unit.

Answer:

  1. What should be the set operator to combine the first and second query units.

Answer:

Based on your answers above, provide the complete query statement. SQL command

------------------------------------------------------------------------------------------------------------------------

Department (DeptId, DeptName, DeptAddress, Chair); PK: DeptId; FK: Chair refs Faculty.

Faculty (FacName, FacSSNo, OfficeAddress, Worksfor); PK: FacSSNo; FK: Worksfor refs Department.

DegreeProgram (ProgId, ProgramName, ProgType, Coordinator, UnivReq, CollReq); PK: ProgId; FK: Coordinator refs Faculty.

Student (Sid, SSNo, Sname, CurAddress, Major, StuLevel, Gpa); PK: Sid; FK: Major refs DegreeProgram; UNIQUE: SSNo.

DDoffers (DeptId, ProgId, DeptReqrmnt), PK: (DeptId, ProgId); FK: DeptId refs Department, ProgId refs DegreeProgram.

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

Demystifying Databases A Hands On Guide For Database Management

Authors: Shiva Sukula

1st Edition

8170005345, 978-8170005346

Students also viewed these Databases questions