
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:19. Draw the query tree for the SQL statement below, then draw the optimized heuristic tree.
PID is the Primary key of Provider
SELECT Provider.Name, Networking.Name, Show.Name, Show.Description
FROM Provider, Network, Show
WHERE Provider.PID = Network.PID AND
Show.NetworkID = Network.NetworkID AND
Show.Rating > 4 AND Provider.PID = 456
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

Knowledge Booster
Similar questions
- Implement a new independent entity phone in the Sakila database. Attributes and relationships are shown in the following diagram: The diagram uses Sakila naming conventions. Follow the Sakila conventions for your table and column names: All lower case Underscore separator between root and suffix Foreign keys have the same name as referenced primary key Write CREATE TABLE and ALTER TABLE statements that: Implement the entity as a new phone table. Implement the has relationships as foreign keys in the Sakila customer, staff, and store tables. Remove the existing phone column from the Sakila address table. Step 2 requires adding a foreign key constraint to an existing table. Ex: ALTER TABLE customer ADD FOREIGN KEY (phone_id) REFERENCES phone(phone_id) ON DELETE SET NULL ON UPDATE CASCADE; Specify data types as follows: phone_id, phone_number, and country_code have data type INT. phone_type has date type VARCHAR(12) and contains strings like 'Home', 'Mobile', and 'Other'. Apply…arrow_forwardConsider the following schema:instructor(ID, name, dept_name, salary)department(dept_name, building, college, budget)What is the correct SQL statement to perform a query to find the names and average salaries of departments in the college of ‘Science’ whose average salary is greater than 75000? (a) select dept_name, avg (salary)from instructor natual join departmenthaving college = ‘Science’group by dept_namewhere avg (salary) > 75000;(b) select dept_name, avg (salary)from instructor natual join departmentwhere college = ‘Science’group by dept_namewhere avg (salary) > 75000;(c) select dept_name, avg (salary)from instructor natual join departmentwhere college = ‘Science’group by dept_namehaving avg (salary) > 75000;(d) select dept_name, avg (salary)from instructor natual join departmenthaving college = ‘Science’group by dept_namehaving avg (salary) > 75000;(e) select dept_name, avg (salary)from instructor natual join departmentwhere college = ‘Science’and avg (salary) >…arrow_forwardWrite an SQL statement to count the number of distinct breeds.The following table schema for the PET_3 table is another alternate version of the PETtable:PET_3 (PetID, PetName, PetType, PetBreed, PetDOB, PetWeight, OwnerID)Data for PET_3 are shown in Figure 3-20. Except as specifically noted in the question itself, usethe PET_3 table for your answers to all the remaining review questions.arrow_forward
- SQL Queries: Given the following schema. Primary keys are underlined and highlighted in yellow and foreign keys are bold. The meaning of the relations is straightforward. Medical_Staff(MS_Id, MS_First, MS_Last, MS_PhoneNumber, MS_Occupation, Salary) Blood_Bank(Bank_Id, Bank_Name, Bank_Street, Bank_City, Bank_St, Bank_PhoneNumber) Donor(Donor_Id, Donor_First, Donor_Last, Donor_BloodType, Donor_City, Donor_St, DOB, TotalNumberOfDonations) Donation_Record(Donor_Id, Donation_Date, Donation_Amount) Employee(MS_Id, Bank_Id) Storage(Donor_Id, Donation_Date, Bank_Id) Write SQL queries to answer the following questions: a.Find the average donation amount for Sue Thompson (Donor Id = 3329) for the year 2018. b.Sum all donations by Bank for each State (i.e. the State the blood bank is located in, not the Donor). c.Find the name of the youngest donor and all the donations made in by that donor in 2020.arrow_forwardConsider the following schemas: Employee(staffId, name, salary, depNo) primary key staffId foreign key depNo references Department(depNo) Department(depNo,depname, totalSal) primary key depNo and the following procedural SQL statement: CREATE TRIGGER mystery AFTER INSERT ON Employee FOR EACH ROW IF NOT (NEW.depNo IS NULL) UPDATE Department SET totalSal = totalSal + NEW.salary NEW.depNo WHERE depNo ENDIF / = Explain what this trigger does without referring to its code. Describe the effect on the database that it has.arrow_forwardMurach's SQL Server 2019 for Developers Create an Entity Relationship diagram using Visio or visual-paradigm or Lucidchart or other sources. You will look at page 313 of your textbook and recreate the middle example that includes the Employees, Membership, and Committees tables.arrow_forward
- Consider the following schema: Publisher (name, phone, city), PK: name. Book (ISBN, title, year, published_by, previous_edition, price), PK: ISBN, FK: published_by refs Publisher, previous_edition refs Book. Author (SSN, first_name, last_name, address, income), PK: SSN. Write (aSSN, bISBN), PK: (aSSN, bISBN), FK: aSSN refs Author, bISBN refs Book. Editor (SSN, first_name, last_name, address, salary, works_for, book_count), PK: SSN, FK: works_for refs Publisher. Edit (eSSN, bISBN), PK: (eSSN, bISBN), FK: eSSN refs Editor, bISBN refs Book. Author_Editor (aeSSN, hours), PK: aeSSN, FK: aeSSN refs Author, aeSSN refs Editor. Give SQL statements for the following plain English language queries based on the above schema.arrow_forwardQUESTION 3 When identifying Tables in a query, you should All of these Identify the Server Instance None of these Identify the schema Identify the Set Theoryarrow_forwardWrite an SQL query that will return only the names of those employees who appear in the overlapping region of the diagram. Note that you will not be able to test it in MySQL. Write an SQL query that will return the names of all employees who have purchased items (are Customers too). Note that you will not be able to test it in MySQLarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY

Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON

Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education

Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY