I like Serena
Science Advisor
Homework Helper
MHB
- 16,335
- 258
mathmari said:Do we maybe write :
Expression for 1 :
SELECT KUNDE.kundnr, KUNDE.ort
FROM KUNDE
That is effectively the same as before.
I think it might be:
SELECT k1.kundnr, k2.ort
FROM KUNDE k1, KUNDE k2
:unsure:
mathmari said:So we need in these cases "DISTINCT", right?
In question 2, yes, we can expect that the same customer has multiple orders, so their name will get listed multiple times.
DISTINCT then ensures each name is listed only once.
In question 3 it is not be necessary. Orders are unique. So if we list the AUFTRAGNR's, we will already have at most one of each.
mathmari said:Ah we have to write that this inequality holds for each a in AUTRAG, don't we?
Indeed. (Sweating)
Last edited: