Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.

Catherine

Trainee

  • "Catherine" is female
  • "Catherine" started this thread

Posts: 61

Date of registration: Oct 6th 2003

1

Friday, October 24th 2003, 5:43pm

Übungen zum SQL-Kurs Blatt2

Hallo zusammen,

für die Aufgabe 2 in den Übungen zum SQL-Kurs Blatt 2, geht es um eine Movie-Datenbank. Wo kann ich das SQL-Script zur Erzeugung der MovieDB finden?

Danke!
Follow your heart, not brain!

cowhen

Muuuh!

  • "cowhen" is male

Posts: 1,374

Date of registration: Dec 13th 2001

2

Friday, October 24th 2003, 5:55pm

Also bei mir ist diese DB schon vorhanden.

select * from movie

bringt ne Menge auf den Schirm....
plenty of time to relax when you are dead

HoloMaD

Trainee

  • "HoloMaD" is male

Posts: 115

Date of registration: Oct 5th 2002

Location: Hannover (Nordstadt)

3

Friday, October 24th 2003, 5:58pm

Laut Aussage des betreuenden Personals sind alle Tabellen die wir für die Aufgaben benötigen immer schon vorhanden.
cu
Holo
We purposely trained him wrong, as a joke.

Catherine

Trainee

  • "Catherine" is female
  • "Catherine" started this thread

Posts: 61

Date of registration: Oct 6th 2003

4

Friday, October 24th 2003, 6:02pm

Alles klar, danke euch! :)
Follow your heart, not brain!

AnyKey

Erfahrener Schreiberling

Posts: 451

Date of registration: Dec 11th 2001

Location: H-Town

Occupation: Student

5

Monday, October 27th 2003, 3:03pm

Bei 2a):
Wie viele Wochen lief der Film aus dem Jahr 1893 und wie heißt er (benutzen Sie einen
CROSS JOIN)?

finde ich allerdings 2 Filme!?

"Der Mensch braucht Schubladen." -- Any Key

Catherine

Trainee

  • "Catherine" is female
  • "Catherine" started this thread

Posts: 61

Date of registration: Oct 6th 2003

6

Monday, October 27th 2003, 5:00pm

Ich habe nur einen Film gefunden.
Follow your heart, not brain!

Dexter

Junior Schreiberling

  • "Dexter" is male

Posts: 253

Date of registration: May 27th 2002

7

Monday, October 27th 2003, 5:32pm

EDIT : Ups, Fehler gefunden. :D Einfach ignorieren.

Source code

1
2
3
while ($asleep != true)  {  
  $sheep++;  
}

This post has been edited 2 times, last edit by "Dexter" (Oct 27th 2003, 5:43pm)


AnyKey

Erfahrener Schreiberling

Posts: 451

Date of registration: Dec 11th 2001

Location: H-Town

Occupation: Student

8

Monday, October 27th 2003, 9:21pm

Quoted

Ich habe nur einen Film gefunden.


Öhm Catherine

SQL> select title from movie where year = 1893;

TITLE
--------------------------------------------------------------------------------
Blacksmith Scene
Horse Shoeing

SQL>

Das sind doch 2 Filme? Was mach ich falsch?

"Der Mensch braucht Schubladen." -- Any Key

Informatik Minister

Senior Schreiberling

  • "Informatik Minister" is male

Posts: 1,234

Date of registration: Dec 11th 2001

9

Monday, October 27th 2003, 9:47pm

Quoted

Original von AnyKey

Quoted

Ich habe nur einen Film gefunden.


Öhm Catherine

SQL> select title from movie where year = 1893;

TITLE
--------------------------------------------------------------------------------
Blacksmith Scene
Horse Shoeing

SQL>

Das sind doch 2 Filme? Was mach ich falsch?


Nüx, aber wenn Du gleichzeitig fragst, wie lang die im Kino liefen, dann bekommst Du nur den Ersteren, da der Andere - obwohl als Kinofilm gekennzeichnet - nicht in der RUNS Relation steht. Etwas unpassend gefragt, aber passt schon.
"Fliegenpilze! Löwen!! Das Leben ist gefährlich." -- www.katzundgoldt.de

Catherine

Trainee

  • "Catherine" is female
  • "Catherine" started this thread

Posts: 61

Date of registration: Oct 6th 2003

10

Tuesday, October 28th 2003, 12:42pm

RE: Übungen zum SQL-Kurs Blatt2

An Anykey

Genau wie Informatik Minister gesagt, du muss runs.weeks gleichzeitig anfragen, dann bekommst du die richtige Antwort. :))
Follow your heart, not brain!

migu

free rider

  • "migu" is male

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

11

Tuesday, October 28th 2003, 2:38pm

RE: Übungen zum SQL-Kurs Blatt2

Quoted

Original von Catherine
Genau wie Informatik Minister gesagt, du muss runs.weeks gleichzeitig anfragen, dann bekommst du die richtige Antwort. :))


Ja, das hat bei mir auch geklappt. :)

Aber warum soll ich einen CROSS JOIN verwenden? Ein normaler impliziter Join (kann man das so sagen) lieferte dasselbe Ergebnis. Ist ein CROSS JOIN vielleicht effizienter?
tar: Anlegen eines leeren Archivs wird feige verweigert.

cowhen

Muuuh!

  • "cowhen" is male

Posts: 1,374

Date of registration: Dec 13th 2001

12

Tuesday, October 28th 2003, 3:04pm

RE: Übungen zum SQL-Kurs Blatt2

Quoted

Original von migu
Ist ein CROSS JOIN vielleicht effizienter?
Müsste CROSS JOIN nicht ineffizienter sein?
Ich hab gedacht, das wär einfach eine "Gemeinheit" in der Aufgabenstellung, dass man hier mit dem CROSS JOIN klar kommen muss, auch wenn mans eigentlich intuitiv anders machen möchte. ?(
plenty of time to relax when you are dead

AnyKey

Erfahrener Schreiberling

Posts: 451

Date of registration: Dec 11th 2001

Location: H-Town

Occupation: Student

13

Tuesday, October 28th 2003, 3:33pm

Jo danke, ich habs jetzt auch rausgefunden :)

...öhm bildet nen CROSS JOIN nicht das cartesische Produkt?
Dann wird das wohl kaum effizienter sein...

"Der Mensch braucht Schubladen." -- Any Key

migu

free rider

  • "migu" is male

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

14

Tuesday, October 28th 2003, 3:58pm

Quoted

Original von AnyKey
Jo danke, ich habs jetzt auch rausgefunden :)

...öhm bildet nen CROSS JOIN nicht das cartesische Produkt?
Dann wird das wohl kaum effizienter sein...


Wozu ist der CROSS JOIN denn dann überhaupt gedacht? Ich hab das Joining noch nicht ganz verstanden. Hm, da muss ich wohl noch mal in der DBS-Bibel nachlesen. ;) :)
tar: Anlegen eines leeren Archivs wird feige verweigert.

MAX

Senior Schreiberling

  • "MAX" is male

Posts: 822

Date of registration: Dec 11th 2001

Location: Hannover

15

Tuesday, October 28th 2003, 10:23pm

hehe

Quoted

Ich habe nur einen Film gefunden.

Ich auch!!! Denn der Film Horse Shoening ist gar nicht 1893 gelaufen.

Quoted

Wozu ist der CROSS JOIN denn dann überhaupt gedacht?

Man kann natürlich ohne Probleme auch ohne cross join arbeiten, in dem man beim verbinden der tabelle es einfach weglässt, aber das ist genau der Grund, warum das eingeführt wurde, um nämlich die Lesbarkeit des Codes zu verbessern!
mfg
MAX

This post has been edited 1 times, last edit by "MAX" (Oct 28th 2003, 10:27pm)


migu

free rider

  • "migu" is male

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

16

Tuesday, October 28th 2003, 10:29pm

RE: hehe

Quoted

Original von MAX

Quoted

Ich habe nur einen Film gefunden.

Ich auch!!! Denn der Film Horse Shoening ist gar nicht 1893 gelaufen.


Meine Anfrage liefert folgende Ausgabe: "'Blacksmith Scene' lief 1 Woche"
tar: Anlegen eines leeren Archivs wird feige verweigert.

MAX

Senior Schreiberling

  • "MAX" is male

Posts: 822

Date of registration: Dec 11th 2001

Location: Hannover

17

Tuesday, October 28th 2003, 11:42pm

jo

Quoted

Meine Anfrage liefert folgende Ausgabe: "'Blacksmith Scene' lief 1 Woche"

Meine auch.
mfg
MAX

ap

Erfahrener Schreiberling

Posts: 269

Date of registration: Feb 14th 2002

Occupation: Student ;-)

18

Wednesday, October 29th 2003, 12:12pm

Mal zum Abgleich:

2a) 1 Row selected
2b) 29 Rows selected
2c) 21 Rows selected
2d) 1 Row selected (Ott, Fred)
2e) 20 Rows selected

Kann das jemand verifizieren oder falsifizieren?
Who the fuck is General Failure and why does he read my hard disk? ?(

NullAhnung

Erfahrener Schreiberling

  • "NullAhnung" is female

Posts: 332

Date of registration: Apr 28th 2003

19

Wednesday, October 29th 2003, 3:30pm

Kann mir wer bei Aufgabe 2c Übung 1 helfen? Hab da jetzt sowas:
SELECT 'Im Jahr' ||ELECTION_YEAR|| 'hat' ||CANDIDATE|| 'die Wahl mit einem' DECODE(WINNER_LOSER_INDIC,'W',VOTES)
FROM ELECTION;

migu

free rider

  • "migu" is male

Posts: 2,643

Date of registration: Dec 11th 2001

Occupation: Developer

20

Wednesday, October 29th 2003, 4:39pm

Quoted

Original von ap
2a) 1 Row selected
2b) 29 Rows selected
2c) 21 Rows selected
2d) 1 Row selected (Ott, Fred)


Hab ich auch.
2e) fehlt mir grad noch. ?( :(

@NullAhnung:
Bei dir fehlt noch etwas. Du musst noch "gewonnen" bzw. "verloren" ausgeben und die Jahre der Wahl berücksichtigen (WHERE-Clause).
tar: Anlegen eines leeren Archivs wird feige verweigert.

This post has been edited 2 times, last edit by "migu" (Oct 29th 2003, 4:42pm)