1 / 4

The JOIN operation

The JOIN operation. Algorithm from the text Construct the product table. Select those rows with matching values. Project to eliminate duplicate columns. Finish the product table Fill in the natural join table. Multiple Table Queries in SQL.

mjulie
Télécharger la présentation

The JOIN operation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The JOIN operation • Algorithm from the text • Construct the product table. • Select those rows with matching values. • Project to eliminate duplicate columns. • Finish the product table • Fill in the natural join table.

  2. Multiple Table Queries in SQL • How is a multiple table query represented in SQL? • Make a query is Design View to generate sample SQL • Which role did Morgan Freeman play in the movie “The Shawshank Redemption” • Which tables do you need to answer the question?

  3. Why look at SQL? • All queries are expressible in SQL • Not all queries can be expressed in Design View • Representation: just as web pages are all composed of HTML, queries are composed of SQL • To construct dynamic Web pages that retrieve and write information to a database we need SQL

  4. Modifying SQL queries • Change the SQL to find the answer to each of these questions: • What role did Tim Robbins play in the same movie? • Run the query • What role did Eddie Murphy play in “Coming to America”? • Run the query • Which movies have Dracula as a role? • Run the query

More Related