Wiki

A universe of ideas

User Tools

Site Tools


uni:5:dbs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
uni:5:dbs [2014-01-29 21:35] – [Synchronisation] skrupellosuni:5:dbs [2020-11-18 18:11] (current) – external edit 127.0.0.1
Line 192: Line 192:
  
 === 1. NF === === 1. NF ===
 +Bedingung
 > Alle Attribute //atomar// > Alle Attribute //atomar//
  
Line 199: Line 200:
  
 === 2. NF === === 2. NF ===
 +Bedingung
 > //Jedes// Attribut entweder > //Jedes// Attribut entweder
 > voll funktional Abhängig von //jedem// Schlüsselkandidaten > voll funktional Abhängig von //jedem// Schlüsselkandidaten
Line 207: Line 209:
  
 Sonst: Vom Schlüssel nicht voll funktional Abhängige Attribute werden herausgelöst, in eigene Tabelle Sonst: Vom Schlüssel nicht voll funktional Abhängige Attribute werden herausgelöst, in eigene Tabelle
 +
 +=== 3. NF ===
 +Bedingung
 +<WRAP help 60%>
 +//Jede// FD $X \rightarrow Y$ ist mindestens eins:
 +  * tivial
 +  * X enthält Schlüsselkandidat
 +  * $\forall a \in (Y-X)$ ist prim
 +</WRAP>
 +
 +<WRAP info 60%>
 +Keine (nicht trivialen) FDs unter Nicht-Schlüssel-Attributen
 +</WRAP>
 +
 +  - **Kanonische Überdeckung**
 +    - Linksreduktion  \\ Komme ich von //X-x// und //identischem FD// dennoch auf Y, dann streiche x aus X
 +    - Rechtsreduktion \\ Komme ich von //X// und //FD ohne y// dennoch auf y in Y, dann streiche y aus Y
 +    - $X \rightarrow \emptyset$ entfernen
 +    - Gleiche X zusammenfassen
 +  - **Relationsschema erzeugen und FDs zuweisen**
 +    - Aus jedem FD erzeuge eine Relation mit X als Primärschlüssel und Y als Attribute
 +    - Ordne jedes FD den Relationen zu, die alle seine "Buchstaben" enthält
 +  - **Schlüsselkandidat rekonstruieren** \\ Stelle sicher, dass eine Relation einen ehemaligen Schlüsselkandidaten enthält, notfalls erzeuge eine neue mit leerem ohne zugeordnete FDs
 +  - **Überflüssige Relationen eliminieren** \\ Lösche Relationen, die Teilmenge einer anderen sind.
 +
 +=== Boyce-Codee-Normalform ===
 +Bedingung
 +<WRAP help 60%>
 +//Jede// FD $X \rightarrow Y$ ist mindestens eins:
 +  * tivial
 +  * X enthält Schlüsselkandidat
 +</WRAP>
 +
 +<WRAP info 60%>
 +Keine (nicht trivialen) FDs unter Schlüssel-Attributen
 +</WRAP>
 +
 +
 +
 +=== 4. NF ===
 +Wirkung
 +> Nicht mehrere Tabellen in einer.
 +
 +Bedingung
 +<WRAP help 60%>
 +//Jede// MVD $X \twoheadrightarrow Y$ ist mindestens eins:
 +  * tivial
 +  * X enthält Schlüsselkandidat
 +</WRAP>
 +
 +MVD (Multi Valued Dependency): //Mehre// Attribut//werte//, eines Attributs, sind von der linken Seite abhängig.
 +
 +
 ==== Begriffe ==== ==== Begriffe ====
   * Domain   * Domain
Line 554: Line 609:
 <code sql> <code sql>
 -- Laut script kein START TRANSACTION -- Laut script kein START TRANSACTION
 +SET TRANSACTION READ-ONLY  -- kein INSERT, UPDATE und DELETE. Dafür bessere Transaktionsplanung
 +SET TRANSACTION READ-WRITE -- default
 SAVEPOINT name SAVEPOINT name
 COMMIT COMMIT
uni/5/dbs.1391027722.txt.gz · Last modified: (external edit)