Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the following SQL Statements using different criterias of JOIN From these tables between Suppliers and Parts, modify the JOIN statements to satisfy the designation

image text in transcribed

image text in transcribed

Modify the following SQL Statements using different criterias of JOIN From these tables between Suppliers and Parts, modify the JOIN statements to satisfy the designation of each question. Figure 1: Relation S... contains information about suppliers SNAME SNO Supplier number (PK) primary key.. varchar STATUS Supplier status (e.g, reliability code between 1 and5 with 1 being best, 5 worst)int CITY Supplier name varchar , supplier's location varchar Relation P..contains information about parts Weight supplier location PNO PNAME Name of the part varchar COLOR Part number (PK) primary key Part color Relation SP ...contains information about which parts are supplied by which suppliers in which quantities SNO Supplier number (PK) (FK) part of primary key, foreign key .. varchar PNO QTY Part color int Part number (PK) (FK) part of primary key, foreign key . varchar MORE COMPACT FORM SN IG SP SNO PNO Example: Find information about red parts that are supplied by any suppliers located in Paris. Retrieve the supplier numbers and names and also the corresponding red parts they supply To join tables, you may only use the JOIN-ON variation of a join. Answer: SELECT asno. S.sname. ppname FROM s JOIN sp ON ssno = sp.sna JOIN p ON sp.pno = ppna WHERE s.city 'PARIS' and p.color RED Questions: 1 To join tables, you may only use the JOIN-USING variation of a join. To join tables, you may only use the NATURAL-JOIN variation of a join. 3 To join tables, you may only use the CROSS-JOIN version with WHERE clause. In other words, your SQL statement will not have a keyword "JOIN" in it in any form

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

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions

Question

3 . What is the difference between auditing and accounting?

Answered: 1 week ago