Bonsoir,
Je ne possède pas ce livre pour vérifier, mais ça n'a pas l'air très clair effectivement.
Je reprend le livre de référence An introduction to Database Systems de Chris Date.
Au chapitre 7, il décrit des opérateurs qu'il peut être intéressant d'utiliser en plus des 8 opérateurs de base définis par Ted Codd.
Il définit notamment la Semi-jointure et la Semi-différence à laquelle fait peut-être référence la "semi-antijointure"..
Semijoin
[..] the semijoin of
a with
b (in that order),
a SEMIJOIN
b, is defined to be equivalent to:
( a JOIN b ) {X, Y}
In other words, the semijoin of
a with
b is the join of
a and
b, projected over the attributes of
a.
The body of the result is thus loosely the tuples of
a that have a counterpart in
b.
Exemple: Get S#, SNAME, STATUS, and CITY for suppliers who supply part P2:
S SEMIJOIN (SP WHERE P# = P# ('P2') )
La requête SQL qui correspond à la semi-jointure de l'exemple qui utilise une syntaxe Tutorial D serait donc :
1 2 3 4
| SELECT S.*
FROM S
NATURAL JOIN SP
WHERE P# = 'P2' |
ou
1 2 3 4
| SELECT S#, SNAME, STATUS, CITY
FROM S
NATURAL JOIN SP
WHERE P# = 'P2' |
Ce qui fait la semi-jointure c'est finalement les colonnes retournées dans le résultat.
Semidifference
The
semidifference between
a and
b (in that order),
a SEMIMINUS
b, is defined to be equivalent to:
a MINUS b ( a SEMIJOIN b )
The body of the result is thus, loosely, the tuples of
a that have no counterpart in
b.
Example: Get S#, SNAME, STATUS, and CITY for suppliers who do not supply part P2:
S SEMIMINUS ( SP WHERE P# = P# ('P2') )
Pour cet exemple en SQL, on peut faire ceci :
1 2 3 4 5 6 7
| SELECT *
FROM S
EXCEPT
SELECT S.*
FROM S
NATURAL JOIN SP
WHERE P# = 'P2' |
ou effectivement une jointure externe avec une restriction supplémentaire dans la clause WHERE.
1 2 3 4 5
| SELECT S.*
FROM S
LEFT JOIN SP
S.P# = SP.P#
WHERE SP.P# IS NULL |
La base de données des pièces et fournisseurs qu'utilise quasi toujours Chris Date dans ses exemples :
Partager