diff options
| author | 2026-11-07 06:12:48 +0000 | |
|---|---|---|
| committer | 2026-11-07 06:21:22 +0000 | |
| commit | 39dcac2281970febcce36a0151796af2986388b3 (patch) | |
| tree | 7339e54dc942a3ab0d9ba9daae56a2801c1917e9 /doc/dbs.tex | |
| download | coursework-master.tar.gz | |
Diffstat (limited to 'doc/dbs.tex')
| -rw-r--r-- | doc/dbs.tex | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/doc/dbs.tex b/doc/dbs.tex new file mode 100644 index 0000000..5436ffe --- /dev/null +++ b/doc/dbs.tex | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | \documentclass[tikz]{standalone} | ||
| 2 | \usepackage{fontspec} | ||
| 3 | \setmainfont{Liberation Serif} | ||
| 4 | \setsansfont{Liberation Sans} | ||
| 5 | \setmonofont{Iosevka Term Slab} | ||
| 6 | |||
| 7 | \newcommand{\dumblang}[2]{{#1}} | ||
| 8 | |||
| 9 | \begin{document} | ||
| 10 | \usetikzlibrary{er} | ||
| 11 | \usetikzlibrary{calc} | ||
| 12 | \usetikzlibrary{positioning} | ||
| 13 | \usetikzlibrary{shapes} | ||
| 14 | \usetikzlibrary{shapes.multipart} | ||
| 15 | \tikzset{ | ||
| 16 | my table/.style={ | ||
| 17 | draw, | ||
| 18 | minimum width=3.5cm, | ||
| 19 | %% inner sep=0.2cm, | ||
| 20 | execute at begin node=\strut, | ||
| 21 | anchor=north west, | ||
| 22 | font=\ttfamily, | ||
| 23 | rectangle split, | ||
| 24 | rectangle split allocate boxes=#1, | ||
| 25 | rectangle split parts=#1, | ||
| 26 | rectangle split part fill={blue!20,white}, | ||
| 27 | rectangle split part align={center, left}, | ||
| 28 | %% font=\itshape, | ||
| 29 | } | ||
| 30 | } | ||
| 31 | |||
| 32 | \begin{tikzpicture} | ||
| 33 | \node[anchor=south east] at (19,0) {\dumblang{TOTAL}{ИТОГО}: 236592}; | ||
| 34 | |||
| 35 | \node[my table=7] at (-1.5,-7) (students) { | ||
| 36 | \nodepart{one} 2 - \dumblang{students}{студенты} | ||
| 37 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 38 | \nodepart{three} \dumblang{last\_name}{фамилия} | ||
| 39 | \nodepart{four} \dumblang{first\_name}{имя} | ||
| 40 | \nodepart{five} \dumblang{middle\_name}{отчество} | ||
| 41 | \nodepart{six} \dumblang{corporate\_email}{корпоративная\_почта} | ||
| 42 | \nodepart{seven} \dumblang{group\_id}{группа\_id} | ||
| 43 | }; \node[above=0.1cm of students.north west, anchor=south west] {6831}; | ||
| 44 | |||
| 45 | |||
| 46 | \node[my table=6] at (-1.5,0) (students-lab-assignments) { | ||
| 47 | \nodepart{one} 4 - \dumblang{students\_lab\_assignments}{студенты\_назначения\_лаб} | ||
| 48 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 49 | \nodepart{three} \dumblang{student\_id}{студент\_id} | ||
| 50 | \nodepart{four} \dumblang{lab\_assignment\_id}{назначение\_лабы\_id} | ||
| 51 | \nodepart{five} \dumblang{date}{дата} | ||
| 52 | \nodepart{six} \dumblang{mark}{оценка} | ||
| 53 | }; \node[above=0.1cm of students-lab-assignments.north west, anchor=south west] {205032}; | ||
| 54 | |||
| 55 | \node[my table=3] at (6,-2.66) (groups) { | ||
| 56 | \nodepart{one} 1 - \dumblang{groups}{группы} | ||
| 57 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 58 | \nodepart{three} \dumblang{designator}{обозначение} | ||
| 59 | }; \node[above=0.1cm of groups.north west, anchor=south west] {300}; | ||
| 60 | |||
| 61 | \node[my table=5] at (12,0) (lab-assignments) { | ||
| 62 | \nodepart{one} 3 - \dumblang{lab\_assignments}{назначения\_лаб} | ||
| 63 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 64 | \nodepart{three} \dumblang{group\_id}{группа\_id} | ||
| 65 | \nodepart{four} \dumblang{lab\_id}{лаба\_id} | ||
| 66 | \nodepart{five} \dumblang{deadline}{срок} | ||
| 67 | }; \node[above=0.1cm of lab-assignments.north west, anchor=south west] {5993}; | ||
| 68 | |||
| 69 | \node[my table=4] at (12,-4.2) (lab-assignments-teachers) { | ||
| 70 | \nodepart{one} 4 - \dumblang{lab\_assignments\_teachers}{назначения\_лаб\_преподаватели} | ||
| 71 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 72 | \nodepart{three} \dumblang{lab\_assignment\_id}{назначение\_лабы\_id} | ||
| 73 | \nodepart{four} \dumblang{teacher\_id}{преподаватель\_id} | ||
| 74 | }; \node[above=0.1cm of lab-assignments-teachers.north west, anchor=south west] {17926}; | ||
| 75 | |||
| 76 | \node[my table=4] at (6,-5.85) (labs) { | ||
| 77 | \nodepart{one} 2 - \dumblang{labs}{лабы} | ||
| 78 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 79 | \nodepart{three} \dumblang{name}{название} | ||
| 80 | \nodepart{four} \dumblang{subject\_id}{предмет\_id} | ||
| 81 | }; \node[above=0.1cm of labs.north west, anchor=south west] {401}; | ||
| 82 | |||
| 83 | \node[my table=3] at (6,-9.66) (subjects) { | ||
| 84 | \nodepart{one} 1 - \dumblang{subjects}{предметы} | ||
| 85 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 86 | \nodepart{three} \dumblang{name}{название} | ||
| 87 | }; \node[above=0.1cm of subjects.north west, anchor=south west] {9}; | ||
| 88 | |||
| 89 | \node[my table=6] at (12,-7.66) (teachers) { | ||
| 90 | \nodepart{one} 1 - \dumblang{teachers}{преподаватели} | ||
| 91 | \nodepart{two} \underline{\dumblang{id}{id}} | ||
| 92 | \nodepart{three} \dumblang{last\_name}{фамилия} | ||
| 93 | \nodepart{four} \dumblang{first\_name}{имя} | ||
| 94 | \nodepart{five} \dumblang{middle\_name}{отчество} | ||
| 95 | \nodepart{six} \dumblang{corporate\_email}{корпоративная\_почта} | ||
| 96 | }; \node[above=0.1cm of teachers.north west, anchor=south west] {100}; | ||
| 97 | |||
| 98 | \draw (students.seven east) -| node[at start,above right] {$\infty$} node[below, at end, rotate=90] {$15-30$} ($(students.seven east)!.7!(groups.two west)$) |- node[at end,above left] {$1$} (groups.two west); | ||
| 99 | |||
| 100 | \draw (students-lab-assignments.three west) -| node[at start,above left ] {$\infty$} node[below, at end, rotate=90] {$0-3$} ([xshift=-0.75cm]$(students-lab-assignments.three west)!.5!(students.two west)$) |- node[at end,above left] {$1$} (students.two west); | ||
| 101 | \draw (students-lab-assignments.four east) -| node[at start,above right] {$\infty$} ($(students-lab-assignments.four east)!.15!(lab-assignments.two west)$) |- node[at end,above left] {$1$} (lab-assignments.two west); | ||
| 102 | |||
| 103 | \draw (labs.four east) -| node[at start,above right] {$\infty$} node[below, at end, rotate=90] {$30-100$} ([xshift=.75cm]$(labs.four east)!.5!(subjects.two east)$) |- node[at end,above right] {$1$} (subjects.two east); | ||
| 104 | |||
| 105 | \draw (lab-assignments.three west) -| node[at start,above left] {$\infty$} node[below, at end, rotate=90] {$15-25$} ($(lab-assignments.three west)!.66!(groups.two east)$) |- node[at end,above right] {$1$} (groups.two east); | ||
| 106 | \draw (lab-assignments.four west) -| node[at start,above left] {$\infty$} ($(lab-assignments.four west)!.33!(labs.two east)$) |- node[at end,above right] {$1$} (labs.two east); | ||
| 107 | |||
| 108 | \draw (lab-assignments-teachers.three east) -| node[at start,above right] {$\infty$} ([xshift=0.75cm]$(lab-assignments-teachers.three east)$) |- node[at end,above right] {$1$} (lab-assignments.two east); | ||
| 109 | \draw (lab-assignments-teachers.four east) -| node[at start,above right] {$\infty$} ([xshift=0.75cm]$(lab-assignments-teachers.four east)$) |- node[below, midway, anchor=north west, rotate=90] {$1-5$} node[at end,above right] {$1$} (teachers.two east); | ||
| 110 | \end{tikzpicture} | ||
| 111 | \end{document} | ||
| 112 | |||
| 113 | %% Local Variables: | ||
| 114 | %% compile-command: "xelatex dbs.tex" | ||
| 115 | %% End: | ||
