1 / 6

Kreuzprodukt und Join

cd. CDTitel. Bandname. band. Der Blinddarm. Doktoren. Bandname. Stil. Hell out of it. Devils. Devils. Pop. Mountains. Tears. Doktoren. Punk. When the devils ride. Devils. Tears. Gothic. Kreuzprodukt und Join. Ziel: Liste aller CD-Titel mit dem Stil der jeweiligen Band. cd.

skule
Download Presentation

Kreuzprodukt und Join

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. cd CDTitel Bandname band Der Blinddarm Doktoren Bandname Stil Hell out of it Devils Devils Pop Mountains Tears Doktoren Punk When the devils ride Devils Tears Gothic Kreuzprodukt und Join Ziel: Liste aller CD-Titel mit dem Stil der jeweiligen Band

  2. cd CDTitel Bandname band Der Blinddarm Doktoren Bandname Stil Hell out of it Devils Devils Pop Mountains Tears Doktoren Punk When the devils ride Devils Tears Gothic Kreuzprodukt und Join 1. Lösungsversuch: SELECT CDTitel, Stil FROM cd, band;

  3. CDTitel Stil cd Der Blinddarm Pop CDTitel Bandname band Der Blinddarm Punk Der Blinddarm Gothic Der Blinddarm Doktoren Bandname Stil Hell out of it Pop Hell out of it Devils Devils Pop Hell out of it Punk Mountains Tears Doktoren Punk Hell out of it Gothic When the devils ride Devils Tears Gothic Mountains Pop … … Kreuzprodukt und Join 1. Ergebnis: Man erhält alle mögli- chen Kombinationen der (ausgewählten) Daten der beteiligten Tabellen.

  4. cd CDTitel Bandname band x Der Blinddarm Doktoren Bandname Stil Hell out of it Devils Devils Pop Mountains Tears Doktoren Punk When the devils ride Devils Tears Gothic Kreuzprodukt und Join SELECT CDTitel, Stil FROM cd, band; SELECT CDTitel, Stil FROM cd, band WHERE cd.Bandname = band.Bandname; Das Kreuzprodukt zweier Tabellen ist die Kombination aller Datensätze der einen Tabelle mit allen Datensätzen der anderen Tabelle.

  5. cd CDTitel Bandname band Der Blinddarm Doktoren Bandname Stil Hell out of it Devils Devils Pop Mountains Tears Doktoren Punk When the devils ride Devils Tears Gothic Kreuzprodukt und Join Die Tabellen müssen genannt werden, weil Bandname in beiden Tabellen vorkommt. 2. Lösungsversuch: SELECT CDTitel, Stil FROM cd, band WHERE cd.Bandname = band.Bandname;

  6. cd CDTitel Bandname band Der Blinddarm Doktoren Bandname Stil Hell out of it Devils Devils Pop Mountains Tears Doktoren Punk When the devils ride Devils Tears Gothic Kreuzprodukt und Join 2. Ergebnis: Mit Hilfe der Joinbedingung cd.Bandname = band.Bandname erhält man das gewünschte Ergebnis.

More Related