<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Synthesealgorithmus</id>
	<title>Synthesealgorithmus - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-de.moshellshocker.dns64.de/index.php?action=history&amp;feed=atom&amp;title=Synthesealgorithmus"/>
	<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Synthesealgorithmus&amp;action=history"/>
	<updated>2026-05-27T17:26:19Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in Wikipedia (Deutsch) – Lokale Kopie</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://wiki-de.moshellshocker.dns64.de/index.php?title=Synthesealgorithmus&amp;diff=270370&amp;oldid=prev</id>
		<title>~2026-23594-56: /* Hinzufügen einer Relation */</title>
		<link rel="alternate" type="text/html" href="https://wiki-de.moshellshocker.dns64.de/index.php?title=Synthesealgorithmus&amp;diff=270370&amp;oldid=prev"/>
		<updated>2026-04-17T15:28:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Hinzufügen einer Relation&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Der &amp;#039;&amp;#039;&amp;#039;Synthesealgorithmus&amp;#039;&amp;#039;&amp;#039; beschreibt, wie aus einem relationalen [[Datenbank]]schema&lt;br /&gt;
ein [[Relationenschema]] der [[Normalisierung (Datenbank)#Dritte Normalform (3NF)|dritten Normalform]] wird. Das besondere an diesem Algorithmus ist, dass er im Gegensatz zu der intuitiven Zerlegung des Schemas in die dritte Normalform die Abhängigkeitserhaltung in jedem Fall garantiert.&lt;br /&gt;
&lt;br /&gt;
Ein alternativer Algorithmus ist der [[Zerlegungsalgorithmus Normalform|Zerlegungsalgorithmus]], welcher in die [[Normalisierung (Datenbank)#Boyce-Codd-Normalform (BCNF)|Boyce-Codd-Normalform]] (BCNF) transferiert. Dabei können allerdings Abhängigkeiten verloren gehen (nicht [[Abhängigkeitstreue|abhängigkeitstreu]]). Er ist insofern eine Alternative, als jedes relationale Schema, welches in BCNF transformiert wird, dann auch automatisch in dritter Normalform vorliegt.&lt;br /&gt;
&lt;br /&gt;
== Voraussetzung ==&lt;br /&gt;
Es müssen alle [[Funktionale Abhängigkeit|funktionalen Abhängigkeiten]] &amp;lt;math&amp;gt;\mathcal F&amp;lt;/math&amp;gt; der zu zerlegenden Relation &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; unter den [[Attribut (Relationale Algebra)|Attributen]] bekannt sein.&lt;br /&gt;
&lt;br /&gt;
Beispiel:&lt;br /&gt;
* &amp;lt;math&amp;gt;R = \operatorname{Relation}(A,B,C,D,E,F)&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\mathcal F = \left\{ \left\{A\right\} \to \left\{B,E\right\}, \left\{A,E\right\} \to \left\{B,D\right\}, \left\{F\right\} \to \left\{C,D\right\}, \left\{C,D\right\} \to \left\{B,E,F\right\}, \left\{C,F\right\} \to \left\{B\right\} \right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Der Synthesealgorithmus besteht dann aus vier Schritten:&lt;br /&gt;
# Reduktion von &amp;lt;math&amp;gt;\mathcal F&amp;lt;/math&amp;gt;, d.&amp;amp;nbsp;h. die Bestimmung der kanonischen Überdeckung.&lt;br /&gt;
# Erzeugen der neuen Relationenschemata aus der kanonischen Überdeckung.&lt;br /&gt;
# Ggf. die Hinzunahme einer Relation, die nur den Ursprungsschlüssel enthält.&lt;br /&gt;
# Elimination der Schemata, die in einem anderen Schema enthalten sind.&lt;br /&gt;
&lt;br /&gt;
== Reduktion ==&lt;br /&gt;
Dies wird auch die Berechnung der [[Kanonische Überdeckung|kanonischen Überdeckung]] genannt.&lt;br /&gt;
&lt;br /&gt;
=== 1. Schritt: Linksreduktion ===&lt;br /&gt;
Für alle  &amp;lt;math&amp;gt;\psi  \in \Psi&amp;lt;/math&amp;gt; ersetze &amp;lt;math&amp;gt;\Psi \rightarrow \Gamma&amp;lt;/math&amp;gt;  durch &amp;lt;math&amp;gt;\Psi  \setminus \{\psi\} \rightarrow \Gamma&amp;lt;/math&amp;gt; , falls &amp;lt;math&amp;gt;\Gamma&amp;lt;/math&amp;gt; schon durch &amp;lt;math&amp;gt; \Psi \setminus \{\psi\} \rightarrow \Gamma&amp;lt;/math&amp;gt; determiniert ist.&lt;br /&gt;
&lt;br /&gt;
Die obige Bedingung lässt sich testen, indem man überprüft, ob &amp;lt;math&amp;gt;\Gamma \subseteq \mathop{\mathrm{AttributH\ddot ulle}}(F, \Psi \setminus \{\psi\})&amp;lt;/math&amp;gt; ist,&amp;lt;ref&amp;gt;A. Kemper, A. Eickler: &amp;#039;&amp;#039;Datenbanksysteme&amp;#039;&amp;#039;, ISBN 3-486-57690-9.&amp;lt;/ref&amp;gt; wobei F die Menge der funktionalen Abhängigkeiten bezeichnet. Falls dies zutrifft, kann &amp;lt;math&amp;gt;\psi&amp;lt;/math&amp;gt; aus &amp;lt;math&amp;gt;\Psi&amp;lt;/math&amp;gt; entfernt werden.&lt;br /&gt;
&lt;br /&gt;
Beispiel: &amp;lt;math&amp;gt;\mathop{\mathrm{Relation}}\left(A,B,C,D,E,F\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,E&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;A\underline{E} \rightarrow B,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow C,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;CD \rightarrow B,E,F&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;\underline{C}F \rightarrow B&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In der zweiten funktionalen Abhängigkeit fällt E weg, da sich B und D in der [[Funktionale Abhängigkeit#Attributhülle|Attributhülle]] von A (&amp;lt;math&amp;gt;A^+ = \{A,\underline{B,D},E\}&amp;lt;/math&amp;gt;) befinden. In der letzten funktionalen Abhängigkeit fällt C weg, wegen &amp;lt;math&amp;gt; F^+ = \{\underline{B},C,D,E,F\}&amp;lt;/math&amp;gt;. Man kann es auch so formulieren: E wird in &amp;lt;math&amp;gt;AE \rightarrow B,D&amp;lt;/math&amp;gt; nicht benötigt, um &amp;lt;math&amp;gt;B,D&amp;lt;/math&amp;gt; zu erreichen.&lt;br /&gt;
&lt;br /&gt;
Lösung:&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,E&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow C,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;CD \rightarrow B,E,F&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow B&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 2. Schritt: Rechtsreduktion ===&lt;br /&gt;
Für alle &amp;lt;math&amp;gt;\gamma \in \Gamma&amp;lt;/math&amp;gt; ersetze &amp;lt;math&amp;gt;\Psi \rightarrow \Gamma&amp;lt;/math&amp;gt; durch &amp;lt;math&amp;gt;\Psi \rightarrow \Gamma \setminus\{\gamma\}&amp;lt;/math&amp;gt;, falls &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; schon transitiv durch &amp;lt;math&amp;gt;\Psi&amp;lt;/math&amp;gt; bestimmt ist.&lt;br /&gt;
&lt;br /&gt;
Die obige Bedingung lässt sich überprüfen, indem man für jedes &amp;lt;math&amp;gt;\gamma \in \Gamma&amp;lt;/math&amp;gt; testet, ob &amp;lt;math&amp;gt;\gamma \in&lt;br /&gt;
\text{AttributHuelle}((F \setminus (\Psi \rightarrow \Gamma)) \cup (\Psi \rightarrow (\Gamma \setminus \{\gamma\})),\Psi)&amp;lt;/math&amp;gt; ist. Falls dies zutrifft, kann &amp;lt;math&amp;gt;\gamma&amp;lt;/math&amp;gt; aus &amp;lt;math&amp;gt;\Gamma&amp;lt;/math&amp;gt; entfernt werden. Hierbei handelt es sich um ein iteratives Verfahren, d.&amp;amp;nbsp;h.  &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; enthält in jedem Schritt die bereits in vorherigen Schritten aktualisierten Abhängigkeiten.&lt;br /&gt;
&lt;br /&gt;
An obigem Beispiel:&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,E&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow C,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;CD \rightarrow B,E,F&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow \underline{B}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In der fünften funktionalen Abhängigkeit fällt das B weg.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow E&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow B,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow C,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;CD \rightarrow E,F&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 3. Schritt: Leere Klauseln ===&lt;br /&gt;
Eliminiere Klauseln der Form &amp;lt;math&amp;gt; \Psi \rightarrow \varnothing &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Im Beispiel aus Schritt 2 gibt es keine Abhängigkeiten mit leerer rechter Seite. Also gibt es in diesem Fall hier nichts zu tun.&lt;br /&gt;
&lt;br /&gt;
=== 4. Schritt: Zusammenfassen ===&lt;br /&gt;
Fasse Formeln &amp;lt;math&amp;gt;a \rightarrow b_0 , a \rightarrow b_1 \dots&amp;lt;/math&amp;gt; zu &amp;lt;math&amp;gt;a \rightarrow b_0 \cup b_1 \dots&amp;lt;/math&amp;gt; zusammen.&lt;br /&gt;
&lt;br /&gt;
Im Beispiel fassen wir nun Ausdrücke mit gleicher linker Seite zusammen:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;A \rightarrow E,B,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;F \rightarrow C,D&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;CD \rightarrow B,E,F&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Neues Relationenschema ==&lt;br /&gt;
&lt;br /&gt;
Aus allen &amp;lt;math&amp;gt;\Psi \to \Gamma&amp;lt;/math&amp;gt; wird &amp;lt;math&amp;gt; R ( \Psi , \Gamma ) &amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Zusätzlich muss ein neuer [[Schlüssel (Datenbank)|Schlüssel]] gefunden werden.&lt;br /&gt;
Gegebenenfalls muss eine neue Relation erzeugt werden.&lt;br /&gt;
Überflüssige Relationen können gestrichen werden, wenn diese in anderen enthalten sind.&lt;br /&gt;
&lt;br /&gt;
Am Beispiel:&lt;br /&gt;
* &amp;lt;math&amp;gt;R_1(\underline{A},B,D,E)&amp;lt;/math&amp;gt; # &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; ist [[Primärschlüssel]]&lt;br /&gt;
* &amp;lt;math&amp;gt;R_2(C,D,\underline{F})&amp;lt;/math&amp;gt; # &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; ist Primärschlüssel&lt;br /&gt;
* &amp;lt;math&amp;gt;R_3(B,\underline{C,D},E,F)&amp;lt;/math&amp;gt; # &amp;lt;math&amp;gt;CD&amp;lt;/math&amp;gt; ist Primärschlüssel (Die Elemente dieser [[Relation (Mathematik)|Relation]] sind zwar schon durch &amp;lt;math&amp;gt;R_1&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; gegeben, jedoch muss zur [[Abhängigkeitserhaltung]] diese weiterhin aufgeführt werden, es dürfte nur entfernt werden, wenn eine Relation vollends in einer anderen enthalten wäre. Dies ist jedoch nicht möglich, da diese Fälle vorher durch die Links- und Rechtsreduktion entfernt wurden.)&lt;br /&gt;
&lt;br /&gt;
== Hinzufügen einer Relation ==&lt;br /&gt;
&lt;br /&gt;
Nun muss durch Hinzunahme einer Relation eine Beziehung zwischen &amp;lt;math&amp;gt;R_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;R_2&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;R_3&amp;lt;/math&amp;gt; hergestellt werden. Das wird durch eine Relation &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; ermöglicht, die nur den Ursprungsschlüssel &amp;lt;math&amp;gt;AF&amp;lt;/math&amp;gt; enthält (beachte, dass &amp;lt;math&amp;gt; AF^+=\{A,B,C,D,E,F\}&amp;lt;/math&amp;gt; ist). Wir erhalten ein Schema in der 3.&amp;amp;nbsp;Normalform wie folgt:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;math&amp;gt;R_1(\underline{A},B,D,E)&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;R_2(C,D,\underline{F})&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;R_3(B,\underline{C,D},E,F)&amp;lt;/math&amp;gt;&lt;br /&gt;
* &amp;lt;math&amp;gt;R_4(\underline{A},\underline{F})&amp;lt;/math&amp;gt;, wobei &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; und &amp;lt;math&amp;gt;F&amp;lt;/math&amp;gt; jeweils [[Schlüssel (Datenbank)#Fremdschlüssel|Fremdschlüssel]] darstellen und zusammengenommen den Primärschlüssel von &amp;lt;math&amp;gt;R_4&amp;lt;/math&amp;gt; erzeugen.&lt;br /&gt;
&lt;br /&gt;
== Formaler Algorithmus ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Eingabe:&amp;#039;&amp;#039;&amp;#039; universelles Schema &amp;lt;math&amp;gt;R=(U,F)&amp;lt;/math&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Ausgabe:&amp;#039;&amp;#039;&amp;#039; 3. Normalform &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; von &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;B := \operatorname{reduction}(F)&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;R := \emptyset&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;i := 0&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{for\,each}\;Y\subseteq U\;\mathbf{where}\;\exist A \in U. (Y\rightarrow A) \in B&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;i := i+1&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;X_i := Y\cup\{\,A\in U\,|\,(Y\rightarrow A) \in B\,\}&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;R_i := (X_i,\Pi_{X_{i}}(B))&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;R := R\cup\{R_i\}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{if}\;\forall R_i\in R. (X_i\rightarrow U)\notin B^+&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;i := i+1&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;R := R\cup\{R_i\}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;D := (R,\emptyset)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Einzelnachweise ==&lt;br /&gt;
&amp;lt;references /&amp;gt;https://normalizer.db.in.tum.de/index.py&lt;br /&gt;
[[Kategorie:Datenbankmodellierung]]&lt;/div&gt;</summary>
		<author><name>~2026-23594-56</name></author>
	</entry>
</feed>