Question: Consider a database with these tables, INGREDIENT and DISTRIBUTOR: DIST_ID DIST NAME Sundown Ranch 1 2 Wright Bakery 3 Harry's Produce ING_ID 2 3

Consider a database with these tables, INGREDIENT and DISTRIBUTOR: DIST_ID 1 2 3 ING_ID 2 3 4 5 ING NAME Beefc. Write the relational algebra to select all distributors that are in either PA or NJ. Note: Your answer

Consider a database with these tables, INGREDIENT and DISTRIBUTOR: DIST_ID DIST NAME Sundown Ranch 1 2 Wright Bakery 3 Harry's Produce ING_ID 2 3 4 5 ING NAME Beef Cheese Roll Onion Lettuce DIST_ID 1 1 2 3 3 DIST STATE PA NJ NY a. Explain in plain English what the relational algebra ODIST_ID=3(INGREDIENT) does, and state how many rows would be in the result of that expression. c. Write the relational algebra to select all distributors that are in either PA or NJ. Note: Your answer should make two separate selections and combine them with a binary operator; an answer that uses a single selection will not receive full marks. d. Draw a table showing the result of INGREDIENT D DISTRIBUTOR. Note: Assume all joins are natural joins. e. Suppose you want to see a relation showing which state each ingredient comes from, with all extraneous information removed; you only want to see the name of the ingredient and the state. What relational algebra expression would give you this? f. What three fundamental operators in relational algebra can you combine to achieve a natural join?

Step by Step Solution

3.46 Rating (149 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a The relational algebra expression ODISTID3INGREDIENT selects all rows from the INGREDIENT table wh... View full answer

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!