summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2021-03-10 22:45:14 +0100
committerSanto Cariotti <santo@dcariotti.me>2021-03-10 22:45:14 +0100
commit0317b73dd2df27287eb5dee7f3cac4195191a5f4 (patch)
tree0731bd9b1dc0863e7b40f3e3d561c213c3208dd5
parent59e1587ba88f266726cb604d3eee045af12d14d5 (diff)
chapter4: add relation model
-rw-r--r--chapters/relation.tex15
-rw-r--r--data/er.drawio2
-rw-r--r--data/er.pngbin42250 -> 51184 bytes
-rw-r--r--data/relation.drawio1
-rw-r--r--data/relation.pngbin0 -> 25989 bytes
-rw-r--r--gico.tex3
6 files changed, 20 insertions, 1 deletions
diff --git a/chapters/relation.tex b/chapters/relation.tex
new file mode 100644
index 0000000..84d67cd
--- /dev/null
+++ b/chapters/relation.tex
@@ -0,0 +1,15 @@
+Qui di seguito è riportato uno schema logico del database mediante modello Relazionale.
+\begin{figure}[htp]
+\centering
+\includegraphics[scale=0.70]{data/relation.png}
+\caption{Modello relazionale}
+\label{}
+\end{figure}
+
+Come si può ben vedere sono state fatte delle modifiche:
+\begin{itemize}
+\item Repository: aggiunte le date di creazione e modifica;
+\item Branch: ha un suo id come PK, in modo da accedervi più facilmente tramite backend. Questo perché i branch permettono anche lo slash nel nome, cosa che andrebbe a creare errore se passato nell'endpoint;
+\item Commit: ha un campo \verb|tree| che si riferisce al parent: può ovviamente essere null. Dato che il commit può essere scritto da massimo 2 persone, ho preferito aggiungere i campi \verb|author_id| e \verb|commiter_id|;
+\item Person: ha un campo \verb|hash_md5| che calcola l'MD5\footnote{https://en.wikipedia.org/wiki/MD5} dell'email una volta sola: usato per il gravatar;
+\end{itemize}
diff --git a/data/er.drawio b/data/er.drawio
index cd208ae..02ae376 100644
--- a/data/er.drawio
+++ b/data/er.drawio
@@ -1 +1 @@
-<mxfile host="app.diagrams.net" modified="2021-03-09T21:56:35.637Z" agent="5.0 (X11)" etag="PCM4Dsl5GEbHIzbH1JDX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jb8x8I6h0bMd0UOnB4v11TnXMNrkxAvuaHNigOyM8u5WeO9WOaVOKDqvvdeiqy1TJAYT6Vl0w0j7jjQyOZVp9tXvJQyNYdoRYFzg3hWWDBLdntuca4LdjRlutfwBCfeMXBu1iI8MZ4FfdyGAevzAsvq+65a0iM+qDuHbdWdtEuuZ8kP52Z9YbaNBOpbVVkFud+CBfG2DXVtN2Ts9o2c9VN5D4oDzXVC8CadRHhkNpSc12zfPRkq7SwIM020aG1ZLtkixnDHxhL/YC32y938MQrZriYmsloGkOcYwpAYGS89zzqSoBjI03APgNNlqczAtQDNb5a+uqvnuu60tNBt5g4cN81H3J4mPymYlujxzCYxFlDeI2+wfei1Kznsj3ZPspFTEOm8Dr+aWupKldLeXOmEOt9NERtYrb2JIqBtoduAfDh3krkSY8A9tJfGWZPMMOtA/TDGfkqnjYH3vHxvF2LwFtp3R926krXbTnjdhC6aJ3pdvBY1K2HDvdsxgeQWPFRXDVV1b1/cpRGLV8T0f8NwHK/n9rsRpd49HVekoMlpT/z6kmfItyknGVsV3v/aqjlGOxa7mSc3kjczXUXMXo3Lj6NgWhXvjzoySY0cvlovy9A0uMCGBZh1FBjvrOEc2eJ6ST0d5eJDGBFna9zmLhLL7Kl/760ctsGgU83WwFIftnla7RG2eSWLyvszax0ec6s9PtD16U8N/+bAi+/Q8=</diagram></mxfile> \ No newline at end of file
+<mxfile host="app.diagrams.net" modified="2021-03-10T21:19:43.682Z" agent="5.0 (X11)" etag="pfSvKnnYinY9gGlARoMg" version="14.4.6"><diagram id="1vwIJAudDLqJl2GEVzS8" name="Page-1">7V1Zk5s4EP41rso+xIUQ4nicK8lU7aamkk0l80gMsZnlcAGeI79+kZFspJZtYM1hr+dhBiQQ0N1fqy9pJvgmev2YusvFX4nnhxNd814n+Hai68jWneIPbXkrWwzHKhvmaeCxi7YNX4PfPmvUWOsq8PxMuDBPkjAPlmLjLIljf5YLbW6aJi/iZb+SUHzq0p37oOHrzA1h6/fAyxdlq020bfsnP5gv+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QAmfg6shKAOPB8/92jdUS493FZCzQlLYrkDeQa7szSc+rJGwYj3ooaT4mm5moFrohPOVeVi9ms33kBSXC7Ilsqzp/VnIYxw3gHXdnVlJ3XuViNhLwmlIZHZGTuLVnUmmCNnsuwbBh3IqHCc/AgCa2xCZrYAPahmGGM/JXLGxPrbFRvNlOns2Urq0botJFB7a15koXXZRuC4tJWjdstI9iWARNJRPBlPed6nrfUOi1fIsndGP/svxfW64mN3hyvX6lAoM+/UtHjeg64yihKmMrAIdVRynHfOkxk/PqamTWVF/FqMw4cZUCVy/0+UHkzv2rbFn+0wKNt3Bg7RXpBvt3yxuHKJY8IZWMdrYbhANn2DWfOeM0yuUre/3oLJkFLg03a65X/FrFaziHSUUsLnxWBja65HNxuv2vFSX8t//7A9/9Cw==</diagram></mxfile> \ No newline at end of file
diff --git a/data/er.png b/data/er.png
index 3cb3288..0655f9f 100644
--- a/data/er.png
+++ b/data/er.png
Binary files differ
diff --git a/data/relation.drawio b/data/relation.drawio
new file mode 100644
index 0000000..bdc14ac
--- /dev/null
+++ b/data/relation.drawio
@@ -0,0 +1 @@
+<mxfile host="app.diagrams.net" modified="2021-03-10T21:30:22.663Z" agent="5.0 (X11)" etag="Wuw_bCHz0Qqz515RAkCZ" version="14.4.6" type="device"><diagram name="Page-1" id="2ca16b54-16f6-2749-3443-fa8db7711227">7Vpbc+I2FP41PIaxLdvAYyCXziTbzey23d2+MMIStrq25QqRwP76SrZ8kw0hBBPoQGaC9enonKNjnZtND0yi1T2DSfCJIhz2LAOteuCmZ1nuwBX/JbDOAGCDDPAZQRlklsBX8gsr0FDokiC8qBFySkNOkjro0TjGHq9hkDH6Uieb07AuNYE+bgBfPRg20W8E8UChpmGUE79h4gdK9NBREzPo/fQZXcZKXs8C8/STTUcw56XoFwFE9KUCgdsemDBKeXYVrSY4lKbNzZatu9swW+jNcMx3WWBhBCw8Nyw4mNtiH1eKwzMMlzjfghsKXmNEnqXCfK2M5P67lFqOZ3R1tSC/SOz3wLU0A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az90+btUHrlF+zPrxB0bfBJ04mjPSJW1VVCN39FecGnnut/vSa47cvAGDrfTdOP7w/FrMMYOxV22dLi3m+T0+P8Yj63f0Iqz4KcBRe6bXHhlgiN4u+tIH7dkH6W86baOlD2p909nZQ/PR/6sP6o9Go3plBSzreJWVeZzKyjX0x8x7NiyO9gDadt1O6ih3g5xNeun0ljvaTq8/YKjTd1Pp5DLP+YVTdz2O3t+84oQb/a3zLmWkv4Nx+3v2KTYY9V17U5tiD+2+ral3IPeyteMvRG1XVHcXZ7C9kWjYqEb/VvcSw/J3pBl5+VtdcPsf</diagram></mxfile> \ No newline at end of file
diff --git a/data/relation.png b/data/relation.png
new file mode 100644
index 0000000..2b17e32
--- /dev/null
+++ b/data/relation.png
Binary files differ
diff --git a/gico.tex b/gico.tex
index 8e51416..76b0798 100644
--- a/gico.tex
+++ b/gico.tex
@@ -24,5 +24,8 @@
\chapter{Schema concettuale}
\input{chapters/er}
+\chapter{Schema logico}
+\input{chapters/relation}
+
\end{document}