Question: This question is based on the SPC database in Figure 4.5 on page 102 of the text. Suppliers(sid, sname, address) Parts(pid, pname, colour) Catalog(sid, pid,

This question is based on the SPC database in Figure 4.5 on page 102 of the text.

Suppliers(sid, sname, address)

Parts(pid, pname, colour)

Catalog(sid, pid, quantity)

The keys are sid, pid, {sid,pid}, respectively.

sid sname city pid pname colour sid pid quantity

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

s1 smith london p1 nut red s1 p1 200

s2 jones paris p2 bolt green s1 p3 300

s3 blake paris p3 screw red s2 p1 100

s4 clark london p4 cam blue s2 p2 400

s5 adams athens p5 cog green s2 p3 200

s6 (jagadish) regina s2 p4 300

s2 p5 100

s3 p2 200

s3 p5 400

s4 p4 400

s5 p1 100

s5 p2 200

Create the relational algebra, the tuple relational calculus, and SQL

q1. Find the names of suppliers who supply some red part and some green part.

q2. Find the sids of suppliers who supply every red part or supply every green part.

I need relational algebra query, tuple relational calculus query and sql query and output relation seperately, please mention in the answer which is what.

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 Databases Questions!