Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions