30 likes | 123 Views
a b c d e. 1.4.6 Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (2|4). Algorithmus zur Bestimmung aller Schlüssel von r: bestimme alle A + gemäß Abschnitt 1.4.5 wähle alle minimalen K mit K + = U aus. Beispiel 1-8:
E N D
a b c d e 1.4.6 Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (2|4) • Algorithmus zur Bestimmung aller Schlüssel von r: • bestimme alle A+ gemäß Abschnitt 1.4.5 • wähle alle minimalen K mit K+ = U aus. Relationentheorie Ó AIFB Beispiel 1-8: (1)r1: (abcde | F1)F1 = {a b, ac d, c e, e c} Schlüssel: NSA: ac; ae b,d
a c b d e 1.4.6 Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (3|4) • Beispiel 1-8 (Fort.): • (2) r2: (abcde | F2) F2 = {ab c, b de, bc a} Relationentheorie Ó AIFB Schlüssel: NSA: ab, bc d,e
Name Beruf W-Ort Gehalt AbtL Abt# Geb# HM % Tel PName 1.4.6 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 } Relationentheorie Ó AIFB Schlüssel: NSA: {ANr, PNr} ANr alle anderen PNr Man beachte: alle Anomalien!