Bonsoir lagra007,
Le titre du message « Dépendance fonctionnelle sans dépendant »n’est pas pertinent, car par définition une DF a toujours un déterminant et un dépendant.
Dans la DF : X -> Y, X et Y sont des sous-ensembles de R et par projection chacun de ces sous ensembles peut aussi donner lieu à des sous-ensembles, dont le sous-ensemble vide (noté {} ou ∅) qui en sa qualité d’ensemble participe de plein droit au jeu des dépendances fonctionnelles, qu’on le veuille ou on :
X -> {}
{} -> {}
{} -> Y
Les deux premières DF sont triviales, c'est-à-dire toujours vérifiées. La troisième est vérifiée seulement si tous les tuples de R ont la même valeur pour Y.
Mais pour éviter les ambiguïtés, et si cela vous convient, je peux éventuellement compléter ainsi la définition de la DF :
« X ou Y ne sont pas nécessairement disjoints et peuvent être l’ensemble vide »
Attention à la façon d’énoncer les règles de gestion :
« Un bandit peut aller dans plusieurs prisons à plusieurs dates » peut très bien se comprendre comme « Jojo a été incarcéré plus d’une fois à Borgo », auquel cas (si bien sûr N°Bandit représente une seule et même personne dans le monde carcéral) la DF {N°Bandit, N°Prison} -> {DateEntree} n’existe pas, contrairement à la DF {N°Bandit, DateEntree} -> {N°Prison}, s’il est admis que quelqu’un ne peut pas être incarcéré simultanément dans deux prisons...
De la recherche des DF
Reprenons la relvar R {N°Bandit, N°Prison, DateEntree} satisfaisant la DF {N°Bandit, DateEntree} -> {N°Prison}. Quel est l’ensemble des DF satisfaites par R ?
Énumérons :
01 - {N°Bandit, N°Prison, DateEntree} -> {N°Bandit, N°Prison, DateEntree}
02 - {N°Bandit, N°Prison, DateEntree} -> {N°Bandit, N°Prison}
03 - {N°Bandit, N°Prison, DateEntree} -> {N°Bandit, DateEntree}
04 - {N°Bandit, N°Prison, DateEntree} -> {N°Prison, DateEntree}
05 - {N°Bandit, N°Prison, DateEntree} -> {N°Bandit}
06 - {N°Bandit, N°Prison, DateEntree} -> {N°Prison}
07 - {N°Bandit, N°Prison, DateEntree} -> {DateEntree}
08 - {N°Bandit, N°Prison, DateEntree} -> {}
09 - {N°Bandit, DateEntree} -> {N°Bandit, N°Prison, DateEntree}
10 - {N°Bandit, DateEntree} -> {N°Bandit, N°Prison}
11 - {N°Bandit, DateEntree} -> {N°Bandit, DateEntree}
12 - {N°Bandit, DateEntree} -> {N°Prison, DateEntree}
13 - {N°Bandit, DateEntree} -> {N°Bandit}
14 - {N°Bandit, DateEntree} -> {N°Prison}
15 - {N°Bandit, DateEntree} -> {DateEntree}
16 - {N°Bandit, DateEntree} -> {}
17 - {N°Bandit, N°Prison} -> {N°Bandit, N°Prison}
18 - {N°Bandit, N°Prison} -> {N°Bandit}
19 - {N°Bandit, N°Prison} -> {N°Prison}
20 - {N°Bandit, N°Prison} -> {}
21 - {N°Prison, DateEntree} -> {N°Prison, DateEntree}
22 - {N°Prison, DateEntree} -> {N°Prison}
23 - {N°Prison, DateEntree} -> {DateEntree}
24 - {N°Prison, DateEntree} -> {}
25 - {N°Bandit} -> {N°Bandit}
26 - {N°Bandit} -> {}
27 - {N°Prison} -> {N°Prison}
28 - {N°Prison} -> {}
29 - {DateEntree} -> {DateEntree}
30 - {DateEntree} -> {}
31 - {} -> {}
La DF 20 est celle qui vous posait problème...
Une lecture utile sur le sujet : C.J. Date with Hugh Darwen - Relational Database, Writings 1989-1991 au chapitre 13 « The Nullologist in Relationland », où vous découvrirez d’apparents paradoxes avec Table_Dee et Table_Dum, les deux relations (constantes) dépourvues d’attributs !
Partager