File notes/fig/misc/crow_foot.tex deleted (index e15997c..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\usepackage{tikz}
|
|
3 |
|
\usetikzlibrary{%
|
|
4 |
|
chains,
|
|
5 |
|
calc
|
|
6 |
|
}
|
|
7 |
|
\tikzset{
|
|
8 |
|
dummy/.style={
|
|
9 |
|
rectangle,
|
|
10 |
|
rounded corners,
|
|
11 |
|
draw=white, very thick,
|
|
12 |
|
text centered},
|
|
13 |
|
zig zag to/.style={
|
|
14 |
|
to path={(\tikztostart) -| ($(\tikztostart)!#1!(\tikztotarget)$) |- (\tikztotarget) \tikztonodes}
|
|
15 |
|
},
|
|
16 |
|
zig zag to/.default=0.5,
|
|
17 |
|
one to one/.style={
|
|
18 |
|
one-one, zig zag to
|
|
19 |
|
},
|
|
20 |
|
one to none/.style={
|
|
21 |
|
one-, zig zag to
|
|
22 |
|
},
|
|
23 |
|
oone to none/.style={
|
|
24 |
|
oone-, zig zag to
|
|
25 |
|
},
|
|
26 |
|
omany to none/.style={
|
|
27 |
|
omany-, zig zag to
|
|
28 |
|
},
|
|
29 |
|
one to many/.style={
|
|
30 |
|
one-crow's foot, zig zag to,
|
|
31 |
|
},
|
|
32 |
|
one to omany/.style={
|
|
33 |
|
one-omany, zig zag to
|
|
34 |
|
},
|
|
35 |
|
many to one/.style={
|
|
36 |
|
crow's foot-one, zig zag to
|
|
37 |
|
},
|
|
38 |
|
many to many/.style={
|
|
39 |
|
crow's foot-crow's foot, zig zag to
|
|
40 |
|
},
|
|
41 |
|
many to none/.style={
|
|
42 |
|
crow's foot-, zig zag to
|
|
43 |
|
}
|
|
44 |
|
}
|
|
45 |
|
\makeatletter
|
|
46 |
|
\pgfarrowsdeclare{crow's foot}{crow's foot}
|
|
47 |
|
{
|
|
48 |
|
\pgfarrowsleftextend{+-.5\pgflinewidth}%
|
|
49 |
|
\pgfarrowsrightextend{+.5\pgflinewidth}%
|
|
50 |
|
}
|
|
51 |
|
{
|
|
52 |
|
\pgfutil@tempdima=0.6pt%
|
|
53 |
|
%\advance\pgfutil@tempdima by.25\pgflinewidth%
|
|
54 |
|
\pgfsetdash{}{+0pt}%
|
|
55 |
|
\pgfsetmiterjoin%
|
|
56 |
|
\pgfpathmoveto{\pgfqpoint{0pt}{-9\pgfutil@tempdima}}%
|
|
57 |
|
\pgfpathlineto{\pgfqpoint{-13\pgfutil@tempdima}{0pt}}%
|
|
58 |
|
\pgfpathlineto{\pgfqpoint{0pt}{9\pgfutil@tempdima}}%
|
|
59 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
60 |
|
\pgfpathmoveto{\pgfqpoint{-8pt}{-6pt}}%
|
|
61 |
|
\pgfpathlineto{\pgfqpoint{-8pt}{-6pt}}%
|
|
62 |
|
\pgfpathlineto{\pgfqpoint{-8pt}{6pt}}%
|
|
63 |
|
\pgfusepathqstroke%
|
|
64 |
|
}
|
|
65 |
|
|
|
66 |
|
\pgfarrowsdeclare{omany}{omany}
|
|
67 |
|
{
|
|
68 |
|
\pgfarrowsleftextend{+-.5\pgflinewidth}%
|
|
69 |
|
\pgfarrowsrightextend{+.5\pgflinewidth}%
|
|
70 |
|
}
|
|
71 |
|
{
|
|
72 |
|
\pgfutil@tempdima=0.6pt%
|
|
73 |
|
%\advance\pgfutil@tempdima by.25\pgflinewidth%
|
|
74 |
|
\pgfsetdash{}{+0pt}%
|
|
75 |
|
\pgfsetmiterjoin%
|
|
76 |
|
\pgfpathmoveto{\pgfqpoint{0pt}{-9\pgfutil@tempdima}}%
|
|
77 |
|
\pgfpathlineto{\pgfqpoint{-13\pgfutil@tempdima}{0pt}}%
|
|
78 |
|
\pgfpathlineto{\pgfqpoint{0pt}{9\pgfutil@tempdima}}%
|
|
79 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
80 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
81 |
|
\pgfpathmoveto{\pgfqpoint{-6pt}{-6pt}}%
|
|
82 |
|
\pgfpathcircle{\pgfpoint{-11.5pt}{0}} {3.5pt}
|
|
83 |
|
\pgfusepathqstroke%
|
|
84 |
|
}
|
|
85 |
|
|
|
86 |
|
\pgfarrowsdeclare{oone}{oone}
|
|
87 |
|
{
|
|
88 |
|
\pgfarrowsleftextend{+-.5\pgflinewidth}%
|
|
89 |
|
\pgfarrowsrightextend{+.5\pgflinewidth}%
|
|
90 |
|
}
|
|
91 |
|
{
|
|
92 |
|
\pgfutil@tempdima=0.6pt%
|
|
93 |
|
%\advance\pgfutil@tempdima by.25\pgflinewidth%
|
|
94 |
|
\pgfsetdash{}{+0pt}%
|
|
95 |
|
\pgfsetmiterjoin%
|
|
96 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
97 |
|
\pgfpathmoveto{\pgfqpoint{-6pt}{-6pt}}%
|
|
98 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{-6pt}}%
|
|
99 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{6pt}}%
|
|
100 |
|
\pgfpathcircle{\pgfpoint{-11.5pt}{0}} {3.5pt}
|
|
101 |
|
\pgfusepathqstroke%
|
|
102 |
|
}
|
|
103 |
|
|
|
104 |
|
\pgfarrowsdeclare{one}{one}
|
|
105 |
|
{
|
|
106 |
|
\pgfarrowsleftextend{+-.5\pgflinewidth}%
|
|
107 |
|
\pgfarrowsrightextend{+.5\pgflinewidth}%
|
|
108 |
|
}
|
|
109 |
|
{
|
|
110 |
|
\pgfutil@tempdima=0.6pt%
|
|
111 |
|
%\advance\pgfutil@tempdima by.25\pgflinewidth%
|
|
112 |
|
\pgfsetdash{}{+0pt}%
|
|
113 |
|
\pgfsetmiterjoin%
|
|
114 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
115 |
|
\pgfpathmoveto{\pgfqpoint{-6pt}{-6pt}}%
|
|
116 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{-6pt}}%
|
|
117 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{6pt}}%
|
|
118 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
119 |
|
\pgfpathmoveto{\pgfqpoint{-8pt}{-6pt}}%
|
|
120 |
|
\pgfpathlineto{\pgfqpoint{-8pt}{-6pt}}%
|
|
121 |
|
\pgfpathlineto{\pgfqpoint{-8pt}{6pt}}%
|
|
122 |
|
\pgfusepathqstroke%
|
|
123 |
|
}
|
|
124 |
|
\pgfarrowsdeclare{oone}{oone}
|
|
125 |
|
{
|
|
126 |
|
\pgfarrowsleftextend{+-.5\pgflinewidth}%
|
|
127 |
|
\pgfarrowsrightextend{+.5\pgflinewidth}%
|
|
128 |
|
}
|
|
129 |
|
{
|
|
130 |
|
\pgfutil@tempdima=0.6pt%
|
|
131 |
|
%\advance\pgfutil@tempdima by.25\pgflinewidth%
|
|
132 |
|
\pgfsetdash{}{+0pt}%
|
|
133 |
|
\pgfsetmiterjoin%
|
|
134 |
|
\pgfpathmoveto{\pgfqpoint{0\pgfutil@tempdima}{0\pgfutil@tempdima}}%
|
|
135 |
|
\pgfpathmoveto{\pgfqpoint{-6pt}{-6pt}}%
|
|
136 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{-6pt}}%
|
|
137 |
|
\pgfpathlineto{\pgfqpoint{-6pt}{6pt}}%
|
|
138 |
|
\pgfpathcircle{\pgfpoint{-11.5pt}{0}} {3.5pt}
|
|
139 |
|
\pgfusepathqstroke%
|
|
140 |
|
}
|
|
141 |
|
\def\property#1{\node[name=\entityname-#1, every property/.try]{#1};}
|
|
142 |
|
\def\properties{\begingroup\catcode`\_=11\relax\processproperties}
|
|
143 |
|
\def\processproperties#1{\endgroup%
|
|
144 |
|
\def\propertycode{}%
|
|
145 |
|
\foreach \p in {#1}{%
|
|
146 |
|
\expandafter\expandafter\expandafter\gdef\expandafter\expandafter\expandafter\propertycode%
|
|
147 |
|
\expandafter\expandafter\expandafter{\expandafter\propertycode\expandafter\property\expandafter{\p}\\}%
|
|
148 |
|
}%
|
|
149 |
|
\propertycode%
|
|
150 |
|
}
|
|
151 |
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
|
\begin{document}
|
|
155 |
|
|
|
156 |
|
\begin{tikzpicture}
|
|
157 |
|
\node (a0) {};
|
|
158 |
|
\node[right=2cm of a0] (b0) {};
|
|
159 |
|
\draw (b0.west) -- (a0.east);
|
|
160 |
|
\draw ($(b0) +(-0.4, -0.2)$) -- ($(b0) +(-0.4, 0.2)$);
|
|
161 |
|
\node[left =1cm of a0]{One};
|
|
162 |
|
|
|
163 |
|
\node[ below of = a0] (a1) {};
|
|
164 |
|
\node[right=2cm of a1] (b1) {};
|
|
165 |
|
\draw (b1.west) -- (a1.east);
|
|
166 |
|
\draw ($(b1) +(-0.2, -0.2)$) -- ($(b1) + (-0.5, 0)$) -- ($(b1) +(-0.2, 0.2)$);
|
|
167 |
|
\node[left =1cm of a1]{Many};
|
|
168 |
|
|
|
169 |
|
\node (meta1) at (4, -0.5) {\(\left.\rule{0cm}{1cm}\right\}\) Only the max.};
|
|
170 |
|
|
|
171 |
|
\node[ below of = a1] (a2) {};
|
|
172 |
|
\node[right=2cm of a2] (b2) {};
|
|
173 |
|
\draw[one to none] (b2.west) -- (a2.east);
|
|
174 |
|
\node[left =1cm of a2]{Exactly one};
|
|
175 |
|
|
|
176 |
|
\node[ below of = a2] (a3) {};
|
|
177 |
|
\node[right=2cm of a3] (b3) {};
|
|
178 |
|
\draw[oone to none] (b3.west) -- (a3.east);
|
|
179 |
|
\node[left =1cm of a3]{Zero or one};
|
|
180 |
|
|
|
181 |
|
|
|
182 |
|
\node[ below of = a3] (a4) {};
|
|
183 |
|
\node[right=2cm of a4] (b4) {};
|
|
184 |
|
\draw[many to none] (b4.west) -- (a4.east);
|
|
185 |
|
\node[left =1cm of a4]{One or many};
|
|
186 |
|
|
|
187 |
|
\node[ below of = a4] (a5) {};
|
|
188 |
|
\node[right=2cm of a5] (b5) {};
|
|
189 |
|
\draw[omany to none] (b5.west) -- (a5.east);
|
|
190 |
|
\node[left =1cm of a5]{Zero or many};
|
|
191 |
|
|
|
192 |
|
\node (meta2) at (4, -3.5) {\(\left.\rule{0cm}{2cm}\right\}\) Min. and max.};
|
|
193 |
|
\end{tikzpicture}
|
|
194 |
|
|
|
195 |
|
|
|
196 |
|
\end{document} |
|
File notes/fig/misc/schema_dbms.tex deleted (index 93a8aa0..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\renewcommand\familydefault{\sfdefault} % Default family: serif
|
|
3 |
|
\usepackage[usenames,dvipsnames]{xcolor}
|
|
4 |
|
\usepackage{tikz}
|
|
5 |
|
%\usepackage{soul}
|
|
6 |
|
\usetikzlibrary{calc}
|
|
7 |
|
\usetikzlibrary{arrows, decorations.markings,positioning,backgrounds,shapes}
|
|
8 |
|
\usetikzlibrary{patterns}
|
|
9 |
|
\usetikzlibrary{fit}
|
|
10 |
|
\usepackage[normalem]{ulem}
|
|
11 |
|
|
|
12 |
|
\begin{document}
|
|
13 |
|
\begin{tikzpicture}[
|
|
14 |
|
block/.style={
|
|
15 |
|
rectangle,
|
|
16 |
|
thick,
|
|
17 |
|
text width=5em,
|
|
18 |
|
align=center,
|
|
19 |
|
rounded corners,
|
|
20 |
|
minimum height=2em
|
|
21 |
|
},
|
|
22 |
|
data/.style={
|
|
23 |
|
cylinder,
|
|
24 |
|
draw=black,
|
|
25 |
|
thick,
|
|
26 |
|
aspect=0.7,
|
|
27 |
|
minimum height=1.7cm,
|
|
28 |
|
minimum width=1.5cm,
|
|
29 |
|
shape border rotate=90,
|
|
30 |
|
cylinder uses custom fill,
|
|
31 |
|
cylinder body fill=red!30,
|
|
32 |
|
cylinder end fill=red!10
|
|
33 |
|
}
|
|
34 |
|
]
|
|
35 |
|
|
|
36 |
|
%\node (caption) at (-1.5,2) {In \textcolor{green}{green}, the DBMS software.};
|
|
37 |
|
|
|
38 |
|
\node [block, fill=blue!20, draw=blue] (user) at (0,0) {User};
|
|
39 |
|
\node [block, fill=yellow!20, draw=yellow] (program) at (3,1) {Program};
|
|
40 |
|
\node [block, fill=green!20, draw=green] (cli) at (3,-1) {C.L.I.};
|
|
41 |
|
\node [block, fill=green!20, draw=green] (process) at (8, -1) {Software to process queries};
|
|
42 |
|
\node [block, fill=green!20, draw=green] (access) at (8, -3) {Software to access data};
|
|
43 |
|
\node [data] (data) at (6, -6) {Data};
|
|
44 |
|
\node [data] (metadata) at (10, -6) {Catalog};
|
|
45 |
|
|
|
46 |
|
%% Frame
|
|
47 |
|
|
|
48 |
|
\draw[thick,dotted] ($(program.north west)+(-0.75,0.5)$) node[above right]{DBMS} rectangle ($(metadata.south east)+(0.75,-0.5)$) ;
|
|
49 |
|
\draw[thick,dotted] ($(cli.north west)+(-0.25,0.5)$) node[above right]{DBMS Software} rectangle ($(access.south east)+(0.75,-0.5)$) ;
|
|
50 |
|
%% Arrows
|
|
51 |
|
|
|
52 |
|
\draw [<->, thick] (user) to [bend left] (program.west);
|
|
53 |
|
\draw [<->, thick] (user) to [bend right] (cli.west);
|
|
54 |
|
\draw [<->, thick] (program) to [bend left] (process);
|
|
55 |
|
\draw [<->, thick] (cli) to [bend right] (process);
|
|
56 |
|
\draw [<->, thick] (process) to (access);
|
|
57 |
|
\draw [<->, thick] (access) to (data);
|
|
58 |
|
\draw [<->, thick] (access) to (metadata);
|
|
59 |
|
|
|
60 |
|
% % Caption:
|
|
61 |
|
% \node (caption) at (-5.5,2) { Common term, \emph{CS term}, \underline{Relational Model term}, \sout{To be avoided}};
|
|
62 |
|
%
|
|
63 |
|
% % Table:
|
|
64 |
|
% \node (name) {\textbf{STUDENT}};
|
|
65 |
|
% \node [below of=name] (Name) {\textbf{Name}};
|
|
66 |
|
% \node [right= 3 of Name] (dots1) {\(\cdots\)};
|
|
67 |
|
% \node [right= 3 of dots1] (Major) {\textbf{Major}};
|
|
68 |
|
% \node [below of= Name] (Morgan) {Morgan};
|
|
69 |
|
% \node [below of= dots1] (dots2) {\(\cdots\)};
|
|
70 |
|
% \node [below of= Major] (CS) {CS};
|
|
71 |
|
% \node [below of= Morgan] (dots3) {\(\vdots\)};
|
|
72 |
|
% \node [below of= dots2] (dots4) {\(\vdots\)};
|
|
73 |
|
% \node [below of= CS] (dots5) {\(\vdots\)};
|
|
74 |
|
% \node [below of= dots3] (Bob) {Bob};
|
|
75 |
|
% \node [below of= dots4] (dots6) {\(\cdots\)};
|
|
76 |
|
% \node [below of= dots5] (IT) {IT};
|
|
77 |
|
% % Annotations:
|
|
78 |
|
%% \draw [-, dashed] (-1.5, 0.75) -- ++ (11,0);
|
|
79 |
|
%% \draw [-, dashed] (-1.5, -1.45) -- ++ (11,0);
|
|
80 |
|
% \node (meta) at (11.2, -0.35) {\(\left.\rule{0cm}{1.2cm}\right\}\) Structure, \emph{meta-data}, \underline{schema}};
|
|
81 |
|
% \node (data) at (10.4, -3.0) {\(\left.\rule{0cm}{1.65cm}\right\}\) \emph{data}, \underline{relation state}};
|
|
82 |
|
% \begin{scope}[on background layer]
|
|
83 |
|
% \node [fit=(name)(IT), fill=gray!20, draw = none, inner sep= 15pt] (box1) {};
|
|
84 |
|
% \node [fit=(Name)(Major), fill=blue!20, draw = none, inner sep= 5pt] (box2) {};
|
|
85 |
|
% \node [fit=(Bob)(IT), fill=red!20, draw = none, inner sep= 10pt] (box3) {};
|
|
86 |
|
% \node [fit=(Name)(Bob), draw = black, inner sep= 3pt] (box4) {};
|
|
87 |
|
% \node [fit=(IT), draw = black, inner sep= 3pt] (box5) {};
|
|
88 |
|
%
|
|
89 |
|
%% \draw [fill=gray!20, draw=none] (IT)+(1,-0.5) rectangle (name.north west);
|
|
90 |
|
%%
|
|
91 |
|
% %
|
|
92 |
|
%% \draw [fill=blue!20, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
93 |
|
%% \draw [pattern=north west lines, pattern color=blue!40, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
94 |
|
%% \draw [] (Major.south east) rectangle (Name.north west);
|
|
95 |
|
%% \draw [] (CS.south east) rectangle (Morgan.north west);
|
|
96 |
|
%% \draw [] (IT.south east) rectangle (IT.north west);
|
|
97 |
|
%% \node[inner sep=10pt,draw,fit=(IT)] (box) {};
|
|
98 |
|
%% \node [fit=(Bob)(Name)(Bob)(Name), fill=blue!20] () {};
|
|
99 |
|
% \end{scope}
|
|
100 |
|
%
|
|
101 |
|
% \node (names) [left = 1cm of name] {Table name, \emph{file name}, \underline{relation name}};
|
|
102 |
|
% \draw[->] (names) -- (name);
|
|
103 |
|
% \node (Table) [above = 0.1 of name, xshift = -3.5cm]{\textcolor{gray}{Table, \emph{file}, \underline{relation}}};
|
|
104 |
|
% \draw[->, bend right=-80, gray] (Table.east) -- (box1);
|
|
105 |
|
% \node (header) [left = 1.4cm of Name] {\textcolor{blue!50}{Heading, column names, \underline{list of attributes}}};
|
|
106 |
|
% \draw[->, blue!50] (header) -- (box2);
|
|
107 |
|
%
|
|
108 |
|
%% \node (acc) [left = 0.9cm of names, yshift = -0.4cm] {Meta-data \(\left\{\rule{0cm}{0.9cm}\right.\)};
|
|
109 |
|
%
|
|
110 |
|
% \node (entry) [left = 1.6cm of Bob] {\textcolor{red!50}{Entry, row, line, \emph{data record}, \underline{tuple}}};
|
|
111 |
|
% \draw[->, red!50] (entry) -- (box3);
|
|
112 |
|
%
|
|
113 |
|
% \node (column) [left = 1.6cm of Bob, yshift=-1cm] {Column, \sout{field}};
|
|
114 |
|
% \draw[->] (column) -| (box4);
|
|
115 |
|
%
|
|
116 |
|
% \node (value) [left = 1.6cm of Bob, yshift=-2cm] {Value, \emph{data element}, \underline{element}, \sout{field}};
|
|
117 |
|
% \draw[->] (value) -| (box5);
|
|
118 |
|
\end{tikzpicture}
|
|
119 |
|
|
|
120 |
|
|
|
121 |
|
\end{document} |
|
File notes/fig/misc/schema_design.tex deleted (index 7258a2f..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\renewcommand\familydefault{\sfdefault} % Default family: serif
|
|
3 |
|
\usepackage[usenames,dvipsnames]{xcolor}
|
|
4 |
|
\usepackage{tikz}
|
|
5 |
|
%\usepackage{soul}
|
|
6 |
|
\usetikzlibrary{calc}
|
|
7 |
|
\usetikzlibrary{arrows, decorations.markings,positioning,backgrounds,shapes}
|
|
8 |
|
\usetikzlibrary{patterns}
|
|
9 |
|
\usetikzlibrary{fit}
|
|
10 |
|
\usepackage[normalem]{ulem}
|
|
11 |
|
|
|
12 |
|
\begin{document}
|
|
13 |
|
\begin{tikzpicture}[
|
|
14 |
|
block/.style={
|
|
15 |
|
rectangle,
|
|
16 |
|
thick,
|
|
17 |
|
text width=5em,
|
|
18 |
|
align=center,
|
|
19 |
|
rounded corners,
|
|
20 |
|
minimum height=2em
|
|
21 |
|
},
|
|
22 |
|
data/.style={
|
|
23 |
|
cylinder,
|
|
24 |
|
draw=black,
|
|
25 |
|
thick,
|
|
26 |
|
aspect=0.7,
|
|
27 |
|
minimum height=1.7cm,
|
|
28 |
|
minimum width=1.5cm,
|
|
29 |
|
shape border rotate=90,
|
|
30 |
|
cylinder uses custom fill,
|
|
31 |
|
cylinder body fill=red!30,
|
|
32 |
|
cylinder end fill=red!10
|
|
33 |
|
}
|
|
34 |
|
]
|
|
35 |
|
|
|
36 |
|
%\node (caption) at (-1.5,2) {In \textcolor{green}{green}, the DBMS software.};
|
|
37 |
|
|
|
38 |
|
\node [block, draw=black] (business) at (0,0) {Business Statement};
|
|
39 |
|
\node [block, draw=black] (uml) [below left = 2cm and 1cm of business] {Unified Modelling Language};
|
|
40 |
|
\node [block, draw=black] (er) [right = 4cm of uml] {Entity Relationship};
|
|
41 |
|
\node [block, draw=black] (rel) [below = 5cm of business] {Relational Model};
|
|
42 |
|
\node [block, draw=black] (sql) [below right = 5cm and -1cm of uml] {SQL};
|
|
43 |
|
\node [block, draw=black] (nosql) [right = 3cm of sql] {NoSQL};
|
|
44 |
|
\node [block, draw=black] (prog) [below = 8cm of uml] {Program};
|
|
45 |
|
\node [block, draw=black] (cli) [right = 3cm of prog] {CLI};
|
|
46 |
|
|
|
47 |
|
%% Frame
|
|
48 |
|
|
|
49 |
|
\draw[thick,dotted] (-8,1) node[above right]{Mini-World} rectangle (6,-1);
|
|
50 |
|
\draw[thick,dotted] (-8, -2) node[above right]{Design} rectangle (6,-7.5);
|
|
51 |
|
\draw[thick,dotted] (-8, -8.5) node[above right]{Implementation} rectangle (6,-10);
|
|
52 |
|
\draw[thick,dotted] (-8, -11) node[above right]{Usage} rectangle (6,-13);
|
|
53 |
|
|
|
54 |
|
|
|
55 |
|
%%% Arrows
|
|
56 |
|
\draw [->, thick] (business) to [bend left] (er);
|
|
57 |
|
\draw [->, thick] (business) to [bend right] (uml);
|
|
58 |
|
\draw [->, thick] (er) to [bend left] (rel);
|
|
59 |
|
\draw [->, thick] (uml) to [bend right] (rel);
|
|
60 |
|
\draw [<->, thick] (er) to (uml);
|
|
61 |
|
\draw [->, thick] (rel) to [bend right] (sql);
|
|
62 |
|
\draw [->, thick] (sql) to [bend left] (cli);
|
|
63 |
|
\draw [->, thick] (sql) to [bend right] (prog);
|
|
64 |
|
\draw [->, thick] (nosql) to [bend left] (cli);
|
|
65 |
|
\draw [->, thick] (nosql) to [bend right] (prog);
|
|
66 |
|
\draw [->, thick,bend left] (business) %.. controls +(5,0) and +(4,0)..
|
|
67 |
|
%-- +(8,0) -- +(8, -10) --
|
|
68 |
|
.. controls +(5,0) ..
|
|
69 |
|
node[left, pos=.93]{Domain-driven design} (nosql);
|
|
70 |
|
\draw[->, thick, every loop/.style={looseness=6}] (rel) edge [in=120,out=60, loop, above] node {Normalization} ();
|
|
71 |
|
|
|
72 |
|
\draw [->, thick] (uml) to [bend right] (prog);
|
|
73 |
|
|
|
74 |
|
%\draw [<->, thick] (user) to [bend right] (cli.west);
|
|
75 |
|
%\draw [<->, thick] (program) to [bend left] (process);
|
|
76 |
|
%\draw [<->, thick] (cli) to [bend right] (process);
|
|
77 |
|
%\draw [<->, thick] (process) to (access);
|
|
78 |
|
%\draw [<->, thick] (access) to (data);
|
|
79 |
|
%\draw [<->, thick] (access) to (metadata);
|
|
80 |
|
|
|
81 |
|
% % Caption:
|
|
82 |
|
% \node (caption) at (-5.5,2) { Common term, \emph{CS term}, \underline{Relational Model term}, \sout{To be avoided}};
|
|
83 |
|
%
|
|
84 |
|
% % Table:
|
|
85 |
|
% \node (name) {\textbf{STUDENT}};
|
|
86 |
|
% \node [below of=name] (Name) {\textbf{Name}};
|
|
87 |
|
% \node [right= 3 of Name] (dots1) {\(\cdots\)};
|
|
88 |
|
% \node [right= 3 of dots1] (Major) {\textbf{Major}};
|
|
89 |
|
% \node [below of= Name] (Morgan) {Morgan};
|
|
90 |
|
% \node [below of= dots1] (dots2) {\(\cdots\)};
|
|
91 |
|
% \node [below of= Major] (CS) {CS};
|
|
92 |
|
% \node [below of= Morgan] (dots3) {\(\vdots\)};
|
|
93 |
|
% \node [below of= dots2] (dots4) {\(\vdots\)};
|
|
94 |
|
% \node [below of= CS] (dots5) {\(\vdots\)};
|
|
95 |
|
% \node [below of= dots3] (Bob) {Bob};
|
|
96 |
|
% \node [below of= dots4] (dots6) {\(\cdots\)};
|
|
97 |
|
% \node [below of= dots5] (IT) {IT};
|
|
98 |
|
% % Annotations:
|
|
99 |
|
%% \draw [-, dashed] (-1.5, 0.75) -- ++ (11,0);
|
|
100 |
|
%% \draw [-, dashed] (-1.5, -1.45) -- ++ (11,0);
|
|
101 |
|
% \node (meta) at (11.2, -0.35) {\(\left.\rule{0cm}{1.2cm}\right\}\) Structure, \emph{meta-data}, \underline{schema}};
|
|
102 |
|
% \node (data) at (10.4, -3.0) {\(\left.\rule{0cm}{1.65cm}\right\}\) \emph{data}, \underline{relation state}};
|
|
103 |
|
% \begin{scope}[on background layer]
|
|
104 |
|
% \node [fit=(name)(IT), fill=gray!20, draw = none, inner sep= 15pt] (box1) {};
|
|
105 |
|
% \node [fit=(Name)(Major), fill=blue!20, draw = none, inner sep= 5pt] (box2) {};
|
|
106 |
|
% \node [fit=(Bob)(IT), fill=red!20, draw = none, inner sep= 10pt] (box3) {};
|
|
107 |
|
% \node [fit=(Name)(Bob), draw = black, inner sep= 3pt] (box4) {};
|
|
108 |
|
% \node [fit=(IT), draw = black, inner sep= 3pt] (box5) {};
|
|
109 |
|
%
|
|
110 |
|
%% \draw [fill=gray!20, draw=none] (IT)+(1,-0.5) rectangle (name.north west);
|
|
111 |
|
%%
|
|
112 |
|
% %
|
|
113 |
|
%% \draw [fill=blue!20, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
114 |
|
%% \draw [pattern=north west lines, pattern color=blue!40, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
115 |
|
%% \draw [] (Major.south east) rectangle (Name.north west);
|
|
116 |
|
%% \draw [] (CS.south east) rectangle (Morgan.north west);
|
|
117 |
|
%% \draw [] (IT.south east) rectangle (IT.north west);
|
|
118 |
|
%% \node[inner sep=10pt,draw,fit=(IT)] (box) {};
|
|
119 |
|
%% \node [fit=(Bob)(Name)(Bob)(Name), fill=blue!20] () {};
|
|
120 |
|
% \end{scope}
|
|
121 |
|
%
|
|
122 |
|
% \node (names) [left = 1cm of name] {Table name, \emph{file name}, \underline{relation name}};
|
|
123 |
|
% \draw[->] (names) -- (name);
|
|
124 |
|
% \node (Table) [above = 0.1 of name, xshift = -3.5cm]{\textcolor{gray}{Table, \emph{file}, \underline{relation}}};
|
|
125 |
|
% \draw[->, bend right=-80, gray] (Table.east) -- (box1);
|
|
126 |
|
% \node (header) [left = 1.4cm of Name] {\textcolor{blue!50}{Heading, column names, \underline{list of attributes}}};
|
|
127 |
|
% \draw[->, blue!50] (header) -- (box2);
|
|
128 |
|
%
|
|
129 |
|
%% \node (acc) [left = 0.9cm of names, yshift = -0.4cm] {Meta-data \(\left\{\rule{0cm}{0.9cm}\right.\)};
|
|
130 |
|
%
|
|
131 |
|
% \node (entry) [left = 1.6cm of Bob] {\textcolor{red!50}{Entry, row, line, \emph{data record}, \underline{tuple}}};
|
|
132 |
|
% \draw[->, red!50] (entry) -- (box3);
|
|
133 |
|
%
|
|
134 |
|
% \node (column) [left = 1.6cm of Bob, yshift=-1cm] {Column, \sout{field}};
|
|
135 |
|
% \draw[->] (column) -| (box4);
|
|
136 |
|
%
|
|
137 |
|
% \node (value) [left = 1.6cm of Bob, yshift=-2cm] {Value, \emph{data element}, \underline{element}, \sout{field}};
|
|
138 |
|
% \draw[->] (value) -| (box5);
|
|
139 |
|
\end{tikzpicture}
|
|
140 |
|
|
|
141 |
|
|
|
142 |
|
\end{document} |
|
File notes/fig/misc/schema_java_app.tex deleted (index 6a04153..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\renewcommand\familydefault{\sfdefault} % Default family: serif
|
|
3 |
|
\usepackage[usenames,dvipsnames]{xcolor}
|
|
4 |
|
\usepackage{tikz}
|
|
5 |
|
%\usepackage{soul}
|
|
6 |
|
\usetikzlibrary{calc}
|
|
7 |
|
\usetikzlibrary{arrows, decorations.markings,positioning,backgrounds,shapes}
|
|
8 |
|
\usetikzlibrary{patterns}
|
|
9 |
|
\usetikzlibrary{fit}
|
|
10 |
|
\usepackage[normalem]{ulem}
|
|
11 |
|
|
|
12 |
|
\begin{document}
|
|
13 |
|
\begin{tikzpicture}[
|
|
14 |
|
block/.style={
|
|
15 |
|
rectangle,
|
|
16 |
|
thick,
|
|
17 |
|
text width=5em,
|
|
18 |
|
align=center,
|
|
19 |
|
rounded corners,
|
|
20 |
|
minimum height=2em
|
|
21 |
|
},
|
|
22 |
|
data/.style={
|
|
23 |
|
cylinder,
|
|
24 |
|
draw=black,
|
|
25 |
|
thick,
|
|
26 |
|
aspect=0.7,
|
|
27 |
|
minimum height=1.7cm,
|
|
28 |
|
minimum width=1.5cm,
|
|
29 |
|
shape border rotate=90,
|
|
30 |
|
cylinder uses custom fill,
|
|
31 |
|
cylinder body fill=red!30,
|
|
32 |
|
cylinder end fill=red!10
|
|
33 |
|
}
|
|
34 |
|
]
|
|
35 |
|
|
|
36 |
|
\node [block, fill=blue!20, draw=blue] (user) at (0,0) {User};
|
|
37 |
|
\node [block, fill=yellow!20, draw=yellow] (program) at (3,1) {Java Program};
|
|
38 |
|
\node [block, fill=yellow!20, draw=yellow] (api) at ($(program.south)+(0, -1)$) {A.P.I.};
|
|
39 |
|
\node [block, fill=green!20, draw=green] (process) at (8, -1) {Software to process queries};
|
|
40 |
|
\node [block, fill=green!20, draw=green] (access) at (8, -3) {Software to access data};
|
|
41 |
|
\node [data] (data) at (6, -6) {Data};
|
|
42 |
|
\node [data] (metadata) at (10, -6) {Catalog};
|
|
43 |
|
|
|
44 |
|
%% Frame
|
|
45 |
|
|
|
46 |
|
\draw[thick,dotted] ($(program.north west)+(-0.75,0.5)$) node[above right]{DBMS} rectangle ($(metadata.south east)+(0.75,-0.5)$) ;
|
|
47 |
|
\draw[thick,dotted] ($(process.north west)+(-0.15,0.3)$) node[above right]{DBMS Software} rectangle ($(access.south east)+(0.15,-0.5)$) ;
|
|
48 |
|
%% Arrows
|
|
49 |
|
|
|
50 |
|
\draw [<->, thick] (user) to [bend left] (program.west);
|
|
51 |
|
\draw [<->, thick] (program.south) to (api.north);
|
|
52 |
|
\draw [<->, thick] (program) to [bend left] node[above right, pos=0.2]{Connector / Driver} (process.west);
|
|
53 |
|
\draw [<->, thick] (process) to (access);
|
|
54 |
|
\draw [<->, thick] (access) to (data);
|
|
55 |
|
\draw [<->, thick] (access) to (metadata);
|
|
56 |
|
|
|
57 |
|
\end{tikzpicture}
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
\end{document} |
|
File notes/fig/misc/vocabulary_table.tex deleted (index 0729346..0000000) |
1 |
|
\documentclass[border=20pt]{standalone}
|
|
2 |
|
\renewcommand\familydefault{\sfdefault} % Default family: serif
|
|
3 |
|
\usepackage[usenames,dvipsnames]{xcolor}
|
|
4 |
|
\usepackage{tikz}
|
|
5 |
|
%\usepackage{soul}
|
|
6 |
|
\usetikzlibrary{calc}
|
|
7 |
|
\usetikzlibrary{arrows, decorations.markings,positioning,backgrounds,shapes}
|
|
8 |
|
\usetikzlibrary{patterns}
|
|
9 |
|
\usetikzlibrary{fit}
|
|
10 |
|
\usepackage[normalem]{ulem}
|
|
11 |
|
|
|
12 |
|
\begin{document}
|
|
13 |
|
\begin{tikzpicture}
|
|
14 |
|
% Caption:
|
|
15 |
|
\node (caption) at (-5.5,2) { Common term, \emph{CS term}, \underline{Relational Model term}, \sout{To be avoided}};
|
|
16 |
|
|
|
17 |
|
% Table:
|
|
18 |
|
\node (name) {\textbf{STUDENT}};
|
|
19 |
|
\node [below of=name] (Name) {\textbf{Name}};
|
|
20 |
|
\node [right= 3 of Name] (dots1) {\(\cdots\)};
|
|
21 |
|
\node [right= 3 of dots1] (Major) {\textbf{Major}};
|
|
22 |
|
\node [below of= Name] (Morgan) {Morgan};
|
|
23 |
|
\node [below of= dots1] (dots2) {\(\cdots\)};
|
|
24 |
|
\node [below of= Major] (CS) {CS};
|
|
25 |
|
\node [below of= Morgan] (dots3) {\(\vdots\)};
|
|
26 |
|
\node [below of= dots2] (dots4) {\(\vdots\)};
|
|
27 |
|
\node [below of= CS] (dots5) {\(\vdots\)};
|
|
28 |
|
\node [below of= dots3] (Bob) {Bob};
|
|
29 |
|
\node [below of= dots4] (dots6) {\(\cdots\)};
|
|
30 |
|
\node [below of= dots5] (IT) {IT};
|
|
31 |
|
% Annotations:
|
|
32 |
|
% \draw [-, dashed] (-1.5, 0.75) -- ++ (11,0);
|
|
33 |
|
% \draw [-, dashed] (-1.5, -1.45) -- ++ (11,0);
|
|
34 |
|
\node (meta) at (11.2, -0.35) {\(\left.\rule{0cm}{1.2cm}\right\}\) Structure, \emph{meta-data}, \underline{schema}};
|
|
35 |
|
\node (data) at (10.4, -3.0) {\(\left.\rule{0cm}{1.65cm}\right\}\) \emph{data}, \underline{relation state}};
|
|
36 |
|
\begin{scope}[on background layer]
|
|
37 |
|
\node [fit=(name)(IT), fill=gray!20, draw = none, inner sep= 15pt] (box1) {};
|
|
38 |
|
\node [fit=(Name)(Major), fill=blue!20, draw = none, inner sep= 5pt] (box2) {};
|
|
39 |
|
\node [fit=(Bob)(IT), fill=red!20, draw = none, inner sep= 10pt] (box3) {};
|
|
40 |
|
\node [fit=(Name)(Bob), draw = black, inner sep= 3pt] (box4) {};
|
|
41 |
|
\node [fit=(IT), draw = black, inner sep= 3pt] (box5) {};
|
|
42 |
|
|
|
43 |
|
% \draw [fill=gray!20, draw=none] (IT)+(1,-0.5) rectangle (name.north west);
|
|
44 |
|
%
|
|
45 |
|
%
|
|
46 |
|
% \draw [fill=blue!20, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
47 |
|
% \draw [pattern=north west lines, pattern color=blue!40, draw=none] (Bob)+(0.6,-0.2) rectangle (Name.north west);
|
|
48 |
|
% \draw [] (Major.south east) rectangle (Name.north west);
|
|
49 |
|
% \draw [] (CS.south east) rectangle (Morgan.north west);
|
|
50 |
|
% \draw [] (IT.south east) rectangle (IT.north west);
|
|
51 |
|
% \node[inner sep=10pt,draw,fit=(IT)] (box) {};
|
|
52 |
|
% \node [fit=(Bob)(Name)(Bob)(Name), fill=blue!20] () {};
|
|
53 |
|
\end{scope}
|
|
54 |
|
|
|
55 |
|
\node (names) [left = 1cm of name] {Table name, \emph{file name}, \underline{relation name}};
|
|
56 |
|
\draw[->] (names) -- (name);
|
|
57 |
|
\node (Table) [above = 0.1 of name, xshift = -3.5cm]{\textcolor{gray}{Table, \emph{file}, \underline{relation}}};
|
|
58 |
|
\draw[->, bend right=-80, gray] (Table.east) -- (box1);
|
|
59 |
|
\node (header) [left = 1.4cm of Name] {\textcolor{blue!50}{Heading, column names, \underline{list of attributes}}};
|
|
60 |
|
\draw[->, blue!50] (header) -- (box2);
|
|
61 |
|
|
|
62 |
|
% \node (acc) [left = 0.9cm of names, yshift = -0.4cm] {Meta-data \(\left\{\rule{0cm}{0.9cm}\right.\)};
|
|
63 |
|
|
|
64 |
|
\node (entry) [left = 1.6cm of Bob] {\textcolor{red!50}{Entry, row, line, \emph{data record}, \underline{tuple}}};
|
|
65 |
|
\draw[->, red!50] (entry) -- (box3);
|
|
66 |
|
|
|
67 |
|
\node (column) [left = 1.6cm of Bob, yshift=-1cm] {Column, \sout{field}};
|
|
68 |
|
\draw[->] (column) -| (box4);
|
|
69 |
|
|
|
70 |
|
\node (value) [left = 1.6cm of Bob, yshift=-2cm] {Value, \emph{data element}, \underline{element}, \sout{field}};
|
|
71 |
|
\draw[->] (value) -| (box5);
|
|
72 |
|
\end{tikzpicture}
|
|
73 |
|
|
|
74 |
|
|
|
75 |
|
\end{document} |
|