Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved 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

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

Step: 1

a The relational algebra expression ODISTID3INGREDIENT selects all rows from the INGREDIENT table wh... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Describe the process of sensory memory.

Answered: 1 week ago