Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on the above database schema, express the following queries in relational algebra. Assume set semantics for all operations. Consider the following schema (primary key

image text in transcribed

Based on the above database schema, express the following queries in relational algebra. Assume set semantics for all operations.

image text in transcribed

Consider the following schema (primary key fields are underlined) Customers (cid, cname, city) cid is the unique identifier for the customer cname is the name of the customer - city is the city where customer resides cid is the primary key. Suppliers (sid, sname, city) sid is the unique identifier for the supplier sname is supplier's name - city is the city supplier is located sid is the primary key Parts (pid, pname, color) pid is the unique identifier for the part pname is the part's name - color is part's color pid is the primary key. Catalog (pid, sid,price): tuples in the Catalog table correspond to a catalog entries: i.e., parts and their suppliers pid is the id of the part in the catalog entry sid is id of the supplier that supplies the part in the catalog price is the cost of the part in the catalog (sid,pid) is the primary key sid is a foreign key referencing Suppliers(sid) pid is a foreign key referencing Parts(pid) Orders (cid,pid, sid, qty): each tuple in Orders corresponds to an order. Assumes each customer orders a particular part from a supplier once. cid is the customer that buys the part pid is the part sold sid is the supplier that supplies the part qty is the number of parts sold in a particular order (cid,sid, pid) is the primary key. (sid,pid) is a foreign key referencing Catalog (sid,pid) Consider the following schema (primary key fields are underlined) Customers (cid, cname, city) cid is the unique identifier for the customer cname is the name of the customer - city is the city where customer resides cid is the primary key. Suppliers (sid, sname, city) sid is the unique identifier for the supplier sname is supplier's name - city is the city supplier is located sid is the primary key Parts (pid, pname, color) pid is the unique identifier for the part pname is the part's name - color is part's color pid is the primary key. Catalog (pid, sid,price): tuples in the Catalog table correspond to a catalog entries: i.e., parts and their suppliers pid is the id of the part in the catalog entry sid is id of the supplier that supplies the part in the catalog price is the cost of the part in the catalog (sid,pid) is the primary key sid is a foreign key referencing Suppliers(sid) pid is a foreign key referencing Parts(pid) Orders (cid,pid, sid, qty): each tuple in Orders corresponds to an order. Assumes each customer orders a particular part from a supplier once. cid is the customer that buys the part pid is the part sold sid is the supplier that supplies the part qty is the number of parts sold in a particular order (cid,sid, pid) is the primary key. (sid,pid) is a foreign key referencing Catalog (sid,pid)

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_2

Step: 3

blur-text-image_3

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions