Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5. The following relational schema represents_Product-Supply schema: PRODUCT (P#. P NAME, PRICE, QTY) SUPPLY(S, P. S PRICE) In this schema. P#-Product Number: QTY-Quantity on hand,

image text in transcribed

5. The following relational schema represents_Product-Supply schema: PRODUCT (P#. P NAME, PRICE, QTY) SUPPLY(S, P. S PRICE) In this schema. P#-Product Number: QTY-Quantity on hand, S#-Suppler Number. PRICE in PRODUCT is the price of selling, while S_PRICE is the supplier-price supplied by the supplier Suppose we have the following data: PRODUCT SUPPLY SUPPLIER P# P-NAME PRICE QTY 53 TABLE 78 WALL UNIT 850 91 CHAIR 66 DRESSER 70038 S# P# S PRICE SA CITY 12 53 450 12 9 150 23 53 400 4536 450 45 66 475 55042 23 NY 45 Philly 12 DO 53 50 250 (a) Suppose we want to enforce referential integrity constraints for the database. The above relations contain an important error in data. What is it? Be specific. (4) (b) Based on the data above, what is the output from the query below? (4) SELECT FROM WHERE P NAME, PRICE, S_PRICE PRODUCT P, SUPPLY S, SUPPLIERR PPA-SPa AND S.S# = R.S# AND CITY = DC'; (c) How many comparisons does the above query in (b) need in computing the joins? Calculate as we discussed in the class. Explain your calculation. (3) (d) Can we insert a tuple (16, 91, 300) to SUPPLY relation? Why or why not?3)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions

Question

How does cost based competition impact a business ?

Answered: 1 week ago

Question

Draw a schematic diagram of I.C. engines and name the parts.

Answered: 1 week ago