uni/gdb/G62B3_Dittrich-Lindemann-Ma...

165 lines
7.4 KiB
TeX

\documentclass[ngerman]{gdb-aufgabenblatt}
\RequirePackage[utf8]{inputenc}
\renewcommand{\Aufgabenblatt}{3}
\renewcommand{\Ausgabedatum}{Mi. 13.11.2013}
\renewcommand{\Abgabedatum}{Do. 28.11.2013}
\renewcommand{\Gruppe}{Tim Dittrich, Sebastian Lindemann, Jim Martens}
% define how the sections are rendered
\def\thesection{Aufgabe \arabic{section}:}
\def\thesubsection{\alph{subsection})}
\def\thesubsubsection{(\roman{subsubsection})}
\usetikzlibrary{positioning}
\usetikzlibrary{shadows}
\begin{document}
\section{Konzeptioneller Entwurf}
\begin{tikzpicture}%[node distance=1.31cm, every edge/.style={link}]
\node[entity] (biomol) {Biomolekül};
\node[attribut] (biomolID) [below left=0.5 and 0 of biomol] {\underline{Molekül-ID}} edge (biomol);
\node[attribut] (biomolDesc) [below right=0.5 and 0 of biomol] {Beschreibung} edge (biomol);
\node[relationship] (relBiomolOrg) [above=of biomol] {kommt vor} edge node [above left=-0.5 and 0.2] {[1;*]} (biomol);
\node[entity] (organism) [above=of relBiomolOrg] {Organismus} edge node [below right=-0.5 and 0.2] {[0;*]} (relBiomolOrg);
\node[attribut] (orgID) [left=of organism] {\underline{Taxonomie-ID}} edge (organism);
\node[attribut] (orgName) [above left=of organism] {Name} edge (organism);
\node[attribut] (orgTrivName) [above=of organism] {Trivialname} edge (organism);
\node[relationship] (relBiomolArt) [left=of biomol] {veröffentlicht in} edge node [above right=0 and -0.5] {[1;1]} (biomol);
\node[entity] (article) [left=of relBiomolArt] {Artikel} edge node [above left=0 and -0.5] {[0;*]} (relBiomolArt);
\node[attribut] (artTitel) [above left=of article] {\underline{Titel}} edge (article);
\node[attribut] (artDatum) [left=of article] {Datum} edge (article);
\node[relationship] (relArtWiss) [above=of article] {geschrieben von} edge node [above right=-0.5 and 0] {[1;*]} (article);
\node[entity] (wissen) [above=of relArtWiss] {Wissenschaftler} edge node [below right=-0.5 and 0] {[0;*]} (relArtWiss);
\node[attribut] (wissName) [left=of wissen] {\underline{Name}} edge (wissen);
\node[multivalentattribut] (wissKontakt) [above=of wissen] {Kontaktinformationen} edge (wissen);
\node[attribut] (wissTel) [above left=of wissKontakt] {Telefonnummer} edge (wissKontakt);
\node[attribut] (wissEmail) [above=of wissKontakt] {E-Mailadresse} edge (wissKontakt);
\node[erbt] (relDNABiomol) [below=of biomol] {is-a} edge (biomol);
\node[entity] (dnamol) [below left=0.5 and 2 of relDNABiomol] {DNA-Molekül} edge (relDNABiomol);
\node[attribut] (dnaNuk) [above left=of dnamol] {Nukleotidsequenz} edge (dnamol);
\node[attribut] (dnaStrang) [left=of dnamol] {Strang-Orientierung} edge (dnamol);
\node[attribut] (dnaChrom) [below left=of dnamol] {Nummer des Chromosoms} edge (dnamol);
\node[entity] (mrnamol) [below=of relDNABiomol] {mRNA-Molekül} edge (relDNABiomol);
\node[attribut] (mrnaNuk) [above right=of mrnamol] {Nukleotidksequenz} edge (mrnamol);
\node[attribut] (mrnaVien) [right=of mrnamol] {Vienna-String} edge (mrnamol);
\node[relationship] (relDNAmRNA) [below=3.0 of dnamol] {wird übersetzt} edge node [below left=-1.5 and 0] {[1;1]} (dnamol) edge node [above right=0.4 and -0.2] {[0;*]} (mrnamol);
\node[attribut] (relStart) [above left=0.9 and 1 of relDNAmRNA] {Startposition} edge (relDNAmRNA);
\node[attribut] (relEnde) [left=of relDNAmRNA] {Endposition} edge (relDNAmRNA);
\node[weakrelationship] (relRNAProt) [below=of mrnamol] {wird synthetisiert} edge node [below right=-0.5 and 0] {[1;1]} (mrnamol);
\node[weakentity] (prot) [below right=of relRNAProt] {Protein} edge node [above left=-0.5 and 0] {[0;1]} (relRNAProt);
\node[attribut] (protAmino) [below left=0.5 and 1 of prot] {\dashuline{Aminosäuresequenz}} edge (prot);
\node[attribut] (protGewicht) [left=of prot] {Molekulargewicht} edge (prot);
\node[attribut] (protCATH) [below right=0.6 and -1.3 of prot] {CATH-Klassifikation} edge (prot);
\node[relationship] (relProtDom) [right=of organism] {enthält} edge[bend left] node [above right=5 and -1] {[1;*]} (prot);
\node[entity] (domain) [above=of relProtDom] {Domäne} edge node [below right=-0.5 and 0] {[0;*]} (relProtDom);
\node[attribut] (domID) [above left=of domain] {\underline{Domänen-ID}} edge (domain);
\node[attribut] (domHMM) [above=of domain] {HMM} edge (domain);
\end{tikzpicture}
\section{Logischer Entwurf}
Person(\underline{Name}, DOB, Geschlecht) \\
Schauspieler(\dashuline{Name $\rightarrow$ Person.Name}, Markenzeichen) \\
Regisseur(\dashuline{Name $\rightarrow$ Person.Name}, Genre)\\
Charakter(\underline{CID}, Name, Charakterbeschreibung)\\
Film(\underline{Titel}, \dashuline{Regisseur $\rightarrow$ Regisseur.Name}, Zusammenfassung, 1. Drehtag,
letzter Drehtag, Genre1, Genre2, Genre3, Genre4)\\
Rolle(\dashuline{Charakter $\rightarrow$ Charakter.CID, Schauspieler $\rightarrow$ Schauspieler.Name, Film $\rightarrow$ Film.Titel}, Drehbeginn, Drehende, Gage)
\section{Relationale Algebra und SQL}
\subsection{} %a
\subsubsection{} %i
Nachname des Rennfahrers, der im Malaysia GP den ersten Platz belegte.
\begin{tabular}{c}
Nachname \\
\hline
Vettel \\
\hline
\end{tabular}
\subsubsection{} %ii
Vor- und Nachname aller Rennfahrer, die in einem Rennstall angestellt sind, der weniger als 350 Budget hat.
\begin{tabular}{c|c}
Vorname & Nachname \\
\hline
Lewis & Hamilton \\
Jenson & Button \\
Kimi & Räikkonen \\
\hline
\end{tabular}
\subsubsection{} %iii
Name der Rennställe, deren Fahrer im Australien GP eine Platzierung haben.
\begin{tabular}{c}
Name \\
\hline
RedBull \\
Ferrari \\
McLaren \\
\hline
\end{tabular}
\subsection{} %b
\subsubsection{} %i
\[
\pi_{Rennstall.Name}(\sigma_{Geburt >= 1985}(Rennfahrer) \underset{RSID=Rennstall}{\bowtie} Rennstall)
\]
\begin{tabular}{c}
Name \\
\hline
RedBull \\
McLaren \\
\hline
\end{tabular}
\subsubsection{} %ii
$\pi_{Vorname, Nachname, Geburt}(\pi_{RID}(\sigma_{Name='Australien GP'}(Rennort) \bowtie Platzierung) \bowtie $\\$ Rennfahrer \underset{Rennstall=RSID}{\bowtie} (\sigma_{Name='McLaren'}(Rennstall)))$
\begin{tabular}{c|c|c}
Vorname & Nachname & Geburt \\
\hline
Lewis & Hamilton & 1985-01-07 \\
Jenson & Button & 1980-01-19 \\
\hline
\end{tabular}
\subsubsection{} %iii
$Rennfahrer - (Rennfahrer \bowtie (\pi_{RID}(Platzierung)))$
\begin{tabular}{c|c|c|c|c|c}
RID & Vorname & Nachname & Geburt & Wohnort & Rennstall \\
\hline
44 & Kimi & Räikkönen & 1979-10-17 & Espoo (Finnland) & 34 \\
\hline
\end{tabular}
\subsubsection{} %iv
$\pi_{Vorname, Nachname}(\sigma_{Rennstall = 31}(Rennfahrer) - (\sigma_{Nachname='Button'}(Rennfahrer)))$
\begin{tabular}{c|c}
Vorname & Nachname \\
\hline
Lewis & Hamilton \\
\hline
\end{tabular}
\subsection{} %c
\subsubsection{} %i
\begin{verbatim}
SELECT fahrer.Vorname, fahrer.Nachname, fahrer.Geburt
FROM Platzierung platz,
Rennort ort,
Rennfahrer fahrer
WHERE platz.OID = ort.OID
AND platz.RID = fahrer.RID
AND ort.Name = 'Australien GP'
AND fahrer.Rennstall = 31
\end{verbatim}
\subsubsection{} %ii
\begin{verbatim}
SELECT Vorname, Nachname
FROM Rennfahrer
WHERE Rennstall = 31
AND Nachname <> 'Button'
\end{verbatim}
\section{Algebraische Optimierung}
\subsection{} %a
\subsection{} %b
\end{document}