3
Relationentheorie AIFB SS2001 1 1.4.6 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: (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

1.4.6 Schlüssel / Schlüsselattribute / Nichtschlüsselattribute (2|4)

  • Upload
    akira

  • View
    33

  • Download
    0

Embed Size (px)

DESCRIPTION

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: - PowerPoint PPT Presentation

Citation preview

Page 1: 1.4.6  Schlüssel / Schlüsselattribute / Nichtschlüsselattribute  (2|4)

Rel

atio

nent

heor

ie

A

IFB

S

S20

01

1

1.4.6 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:(1) r1: (abcde | F1)

F1 = {a b, ac d, c e, e c}

a b

c d

e

Schlüssel:NSA:

ac; aeb,d

Page 2: 1.4.6  Schlüssel / Schlüsselattribute / Nichtschlüsselattribute  (2|4)

Rel

atio

nent

heor

ie

A

IFB

S

S20

01

2

1.4.6 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}

a c

b

d e

Schlüssel:

NSA:

ab, bcd,e

Page 3: 1.4.6  Schlüssel / Schlüsselattribute / Nichtschlüsselattribute  (2|4)

Rel

atio

nent

heor

ie

A

IFB

S

S20

01

3

%

TelPName

AbtL

Geb#

Name

Beruf

W-Ort

Gehalt

Abt#HM

1.4.6 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 }

ANr

PNr

Schlüssel:

NSA:

{ANr, PNr}alle anderen

Man beachte: alle Anomalien!