20 likes | 114 Vues
Learn about the concept of primary keys, identifying attribute combinations, and the importance of unique keys in databases. Explore examples of primary keys in employee data and their significance.
E N D
Schlüssel, Schlüsselwerte (2|3) • K A ist „Schlüssel (engl.: key)“ für E : <A><=> • (K1) K ist „identifizierende“ Attributkombination für E : <A>, (d.h. verschiedene Objekte der realen Welt haben auch verschiedene Attributwerte bzgl. K) • (K2) Es gibt keine echte Teilmenge K‘ K, für die Eigenschaft K1 gilt (d.h. K ist minimal mit Eigenschaft (K1)). • Es kann mehrere Schlüssel, d.h. Attribute (Attributkombi- nationen) mit obigen Eigenschaften (K1) und (K2) geben. • Primärschlüssel (primary key): einziger oder fest ausgewählter Schlüssel häufig: E# (E# A)
Schlüssel, Schlüsselwerte (3|3) Angestellte : < Name, AngNr, Ort, Gehalt, GebDatum > AngNr ist SchlüsselName, GebDatum evtl. Schlüssel Üblich ist die Verwendung eines einfachen Schlüsselattributes: AngNr, AbteilungsNr, ArtikelNr, ... anstelle einer mehrstelligen Attributkombination.