Relationentheorie AIFB SS Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (2|4) Algorithmus zur Bestimmung aller Schlüssel von r: bestimme alle A + gemäß Abschnitt wähle alle minimalen K mit K + = U aus. Beispiel 1-8: (1) r1: (abcde | F1) F1 = {a b, ac d, c e, e c} a b c d e Schlüssel: NSA: ac; ae b,d
Relationentheorie AIFB SS Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (3|4) Beispiel 1-8 (Fort.): (2) r2: (abcde | F2) F2 = {ab c, b de, bc a} a c b d e Schlüssel: NSA: ab, bc d,e
Relationentheorie AIFB SS % Tel PName AbtL Geb# Name Beruf W-Ort Gehalt Abt# HM Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (4|4) Beispiel 1-9: (Angestellten-Beispiel 1-3) Relation angest: (U|F) U={ ANr, Name, Beruf, W-Ort, Gehalt, Abt#, AbtL, Geb#, HM, PNr, PName, %, TelNr} F={ANr Name Beruf Abt# W-Ort Gehalt; Abt# AbtL Geb#; Geb# HM; PNr Pname; ANr PNr % TelNr } ANr PNr Schlüssel: NSA: {ANr, PNr} alle anderen Man beachte: alle Anomalien!