Question: 2 . Given the following schema. Suppliers ( sID , sName, address ) Parts ( pID , pName, colour ) Catalog ( sID , pID,

2. Given the following schema.
Suppliers(sID, sName, address)
Parts(pID, pName, colour)
Catalog(sID, pID, price)
a. Find the name and price of all blue parts. [1m]
b. Find the name and price of all blue or red parts. [2m]
c. Find all supplier names and addresses. [1m]
d. Find the names of all suppliers that supply green parts. [2m]
e. Find the name of parts that are blue and black. [1m] Hint: Read the wording carefully.
f. Find the total price of all parts. [1m]
g. Find the average price of all parts based on colour. [2m]
3. Given the following schema.
Student(studentID, studentName, studentAddress, phone)
Course(courseID courseName, duration)
Enroll(studentID, courseID, semester, comments)
a. Find the names of all students enrolled in semester 2.[1m]
b. List all course names and duration. [1m]
c. List all courses with a duration less than 3.[1m]
d. List all student names who are enrolled in 'Database'. [3m]
e. Discuss the differences between natural join, outer-join and theta-join. [3m]
2 . Given the following schema. Suppliers ( sID ,

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!