Given the default schema of a database: Customers 123 Customerld noc FirstName noc LastName noc City noc Country noc Phone Orders 123 Orderld OrderDate noc OrderNumber 123 Customerld 123 TotalAmount Orderltem 123 Itemid 123 Orderld 123 Productid 123 UnitPrice 123 Quantity Select one or more: Da. Customers Products h Ordoro 123 Productid noc ProductName 123 Supplierld 123 UnitPrice noc Package 123 IsDiscontinued Suppliers 123 Supplierld noc CompanyName noc ContactName noc ContactTitle noc City noc Country To display all the company names that supply 'coffee' products, which of the following tables are required in the FROM clause? Choose ALL that apply. noc Phone noc Fax

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

q6- Choose ALL that apply.

Given the default schema of a database:
EB Customers
123 Customerld
ADC FirstName
ADC LastName
ADC City
ADC Country
ADC Phone
EB Orders
123 Orderld
OrderDate
ADC OrderNumber
123 Customerld
123 TotalAmount
Orderltem
123 Itemid
123 Orderld
123 Productld
123 UnitPrice
123 Quantity
Select one or more:
U a. Customers
O b. Orders
O c.
O d.
O e.
To display all the company names that supply 'coffee' products, which of the following tables are required in the FROM clause? Choose ALL that apply.
Products
Products
Suppliers
Orderltem
123 Productld
ADC ProductName
123 Supplierld
123 UnitPrice
ADC Package
123 IsDiscontinued
Suppliers
123 Supplierld
ADC CompanyName
ADC ContactName
ADC ContactTitle
ADC City
noc Country
noc Phone
ADC Fax
Transcribed Image Text:Given the default schema of a database: EB Customers 123 Customerld ADC FirstName ADC LastName ADC City ADC Country ADC Phone EB Orders 123 Orderld OrderDate ADC OrderNumber 123 Customerld 123 TotalAmount Orderltem 123 Itemid 123 Orderld 123 Productld 123 UnitPrice 123 Quantity Select one or more: U a. Customers O b. Orders O c. O d. O e. To display all the company names that supply 'coffee' products, which of the following tables are required in the FROM clause? Choose ALL that apply. Products Products Suppliers Orderltem 123 Productld ADC ProductName 123 Supplierld 123 UnitPrice ADC Package 123 IsDiscontinued Suppliers 123 Supplierld ADC CompanyName ADC ContactName ADC ContactTitle ADC City noc Country noc Phone ADC Fax
Expert Solution
Step 1

The SQL program for the given problem is as follows:

use demo;
Create table Suppliers(SupplierId int Not Null primary key,CompanyName varchar(30) Not null, 
ContactName varchar (50), ContactTitle varchar(20) Not Null, City varchar(30) Not NULL, 
Country varchar(30) Not NULL, Phone varchar(30) Not NULL, Fax varchar(30) Not NULL);
Insert into Suppliers(SupplierId,CompanyName,ContactName,ContactTitle, City, Country, Phone, Fax) 
values (100001,"ABC","Mark","Henry","Alaska","USA","1023-7456-52", "1023-7456-52");
Insert into Suppliers(SupplierId,CompanyName,ContactName,ContactTitle, City, Country, Phone, Fax) 
values (100002,"XYZ","Ken","Parker","California","USA","1023-3652-52", "1023-3652-52");
Insert into Suppliers(SupplierId,CompanyName,ContactName,ContactTitle, City, Country, Phone, Fax) 
values (100003,"ABC","Matt","Viper","Alaska","USA","4523-6356-52", "4523-6356-52");
Insert into Suppliers(SupplierId,CompanyName,ContactName,ContactTitle, City, Country, Phone, Fax) 
values (100004,"DEF","Harry","Potter","NYC","USA","1040-7456-70", "1040-7456-70");
Insert into Suppliers(SupplierId,CompanyName,ContactName,ContactTitle, City, Country, Phone, Fax) 
values (100005,"XYZ","Lisa","Ray","NYC","USA","1440-7488-55", "1440-7488-55");
Create table Products(ProductId int Not Null primary key,ProductName varchar(30) Not null, 
SupplierId int Not NULL, UnitPrice int Not Null, Package varchar(30) Not NULL, 
isDiscontinued int Not NULL);
Insert into Products(ProductId, ProductName, SupplierId, UnitPrice, Package, isDiscontinued) 
values (200001, "tea", 100001, 15, "P001", 1);
Insert into Products(ProductId, ProductName, SupplierId, UnitPrice, Package, isDiscontinued) 
values (200002, "coffee", 100003, 20, "P002", 0);
Insert into Products(ProductId, ProductName, SupplierId, UnitPrice, Package, isDiscontinued) 
values (200003, "coffee", 100004, 25, "P002", 1);
Insert into Products(ProductId, ProductName, SupplierId, UnitPrice, Package, isDiscontinued) 
values (200004, "tea", 100004, 17, "P001", 1);
Insert into Products(ProductId, ProductName, SupplierId, UnitPrice, Package, isDiscontinued) 
values (200005, "coffee", 100005, 22, "P002", 0);
Select Suppliers.CompanyName
From Suppliers, Products
Where Suppliers.SupplierId=Products.SupplierId AND Products.ProductName="coffee";

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Single Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education