Преглед на файлове

Regenerated DB Model to SVG

Lukas Cerny преди 1 година
родител
ревизия
a2b5380d99
променени са 2 файла, в които са добавени 251 реда и са изтрити 0 реда
  1. 251 0
      doc/db_model.svg
  2. BIN
      doc/telemetry_model-v2.png

+ 251 - 0
doc/db_model.svg

@@ -0,0 +1,251 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<!-- Generated by graphviz version 2.43.0 (0)
+ -->
+<!-- Title: maplog Pages: 1 -->
+<svg width="1405pt" height="485pt"
+ viewBox="0.00 0.00 1404.50 485.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 481)">
+<title>maplog</title>
+<polygon fill="white" stroke="transparent" points="-4,4 -4,-481 1400.5,-481 1400.5,4 -4,4"/>
+<!-- action -->
+<g id="node1" class="node">
+<title>action</title>
+<polygon fill="none" stroke="black" points="179,-181.5 179,-250.5 340,-250.5 340,-181.5 179,-181.5"/>
+<text text-anchor="middle" x="259.5" y="-235.3" font-family="Times,serif" font-size="14.00">action</text>
+<polyline fill="none" stroke="black" points="179,-227.5 340,-227.5 "/>
+<text text-anchor="start" x="187" y="-212.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
+<polyline fill="none" stroke="black" points="179,-204.5 340,-204.5 "/>
+<text text-anchor="start" x="187" y="-189.3" font-family="Times,serif" font-size="14.00">action_id : integer</text>
+</g>
+<!-- campaign -->
+<g id="node2" class="node">
+<title>campaign</title>
+<polygon fill="none" stroke="black" points="918.5,-159 918.5,-273 1212.5,-273 1212.5,-159 918.5,-159"/>
+<text text-anchor="middle" x="1065.5" y="-257.8" font-family="Times,serif" font-size="14.00">campaign</text>
+<polyline fill="none" stroke="black" points="918.5,-250 1212.5,-250 "/>
+<text text-anchor="start" x="926.5" y="-234.8" font-family="Times,serif" font-size="14.00">name : text</text>
+<text text-anchor="start" x="926.5" y="-219.8" font-family="Times,serif" font-size="14.00"> description : text</text>
+<text text-anchor="start" x="926.5" y="-204.8" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
+<text text-anchor="start" x="926.5" y="-189.8" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
+<polyline fill="none" stroke="black" points="918.5,-182 1212.5,-182 "/>
+<text text-anchor="start" x="926.5" y="-166.8" font-family="Times,serif" font-size="14.00">id : integer</text>
+</g>
+<!-- driver -->
+<g id="node3" class="node">
+<title>driver</title>
+<polygon fill="none" stroke="black" points="0,-181.5 0,-250.5 161,-250.5 161,-181.5 0,-181.5"/>
+<text text-anchor="middle" x="80.5" y="-235.3" font-family="Times,serif" font-size="14.00">driver</text>
+<polyline fill="none" stroke="black" points="0,-227.5 161,-227.5 "/>
+<text text-anchor="start" x="8" y="-212.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
+<polyline fill="none" stroke="black" points="0,-204.5 161,-204.5 "/>
+<text text-anchor="start" x="8" y="-189.3" font-family="Times,serif" font-size="14.00">driver_id : integer</text>
+</g>
+<!-- driver_to_action -->
+<g id="node4" class="node">
+<title>driver_to_action</title>
+<polygon fill="none" stroke="black" points="93.5,-340 93.5,-469 387.5,-469 387.5,-340 93.5,-340"/>
+<text text-anchor="middle" x="240.5" y="-453.8" font-family="Times,serif" font-size="14.00">driver_to_action</text>
+<polyline fill="none" stroke="black" points="93.5,-446 387.5,-446 "/>
+<text text-anchor="start" x="101.5" y="-430.8" font-family="Times,serif" font-size="14.00">driver_id : integer</text>
+<text text-anchor="start" x="101.5" y="-415.8" font-family="Times,serif" font-size="14.00"> action_id : integer</text>
+<text text-anchor="start" x="101.5" y="-400.8" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
+<text text-anchor="start" x="101.5" y="-385.8" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
+<text text-anchor="start" x="101.5" y="-370.8" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
+<polyline fill="none" stroke="black" points="93.5,-363 387.5,-363 "/>
+<text text-anchor="start" x="101.5" y="-347.8" font-family="Times,serif" font-size="14.00">id : integer</text>
+</g>
+<!-- driver_to_action&#45;&gt;action -->
+<g id="edge1" class="edge">
+<title>driver_to_action&#45;&gt;action</title>
+<path fill="none" stroke="#595959" d="M259.5,-339.89C259.5,-339.89 259.5,-260.61 259.5,-260.61"/>
+<polygon fill="#595959" stroke="#595959" points="263,-260.61 259.5,-250.61 256,-260.61 263,-260.61"/>
+<text text-anchor="middle" x="291.5" y="-302.8" font-family="Times,serif" font-size="14.00">action_id</text>
+</g>
+<!-- driver_to_action&#45;&gt;driver -->
+<g id="edge2" class="edge">
+<title>driver_to_action&#45;&gt;driver</title>
+<path fill="none" stroke="#595959" d="M127.25,-339.89C127.25,-339.89 127.25,-260.61 127.25,-260.61"/>
+<polygon fill="#595959" stroke="#595959" points="130.75,-260.61 127.25,-250.61 123.75,-260.61 130.75,-260.61"/>
+<text text-anchor="middle" x="112.5" y="-302.8" font-family="Times,serif" font-size="14.00">driver_id</text>
+</g>
+<!-- unit -->
+<g id="node9" class="node">
+<title>unit</title>
+<polygon fill="none" stroke="black" points="609.5,-151.5 609.5,-280.5 805.5,-280.5 805.5,-151.5 609.5,-151.5"/>
+<text text-anchor="middle" x="707.5" y="-265.3" font-family="Times,serif" font-size="14.00">unit</text>
+<polyline fill="none" stroke="black" points="609.5,-257.5 805.5,-257.5 "/>
+<text text-anchor="start" x="617.5" y="-242.3" font-family="Times,serif" font-size="14.00">imei : varchar(20)</text>
+<text text-anchor="start" x="617.5" y="-227.3" font-family="Times,serif" font-size="14.00"> description : text</text>
+<text text-anchor="start" x="617.5" y="-212.3" font-family="Times,serif" font-size="14.00"> is_mobile : boolean</text>
+<text text-anchor="start" x="617.5" y="-197.3" font-family="Times,serif" font-size="14.00"> unit_type_id : varchar(2)</text>
+<text text-anchor="start" x="617.5" y="-182.3" font-family="Times,serif" font-size="14.00"> name : varchar(100)</text>
+<polyline fill="none" stroke="black" points="609.5,-174.5 805.5,-174.5 "/>
+<text text-anchor="start" x="617.5" y="-159.3" font-family="Times,serif" font-size="14.00">unit_id : bigint</text>
+</g>
+<!-- driver_to_action&#45;&gt;unit -->
+<g id="edge3" class="edge">
+<title>driver_to_action&#45;&gt;unit</title>
+<path fill="none" stroke="#595959" d="M382,-339.79C382,-317.48 382,-298 382,-298 382,-298 658.5,-298 658.5,-298 658.5,-298 658.5,-290.61 658.5,-290.61"/>
+<polygon fill="#595959" stroke="#595959" points="662,-290.61 658.5,-280.61 655,-290.61 662,-290.61"/>
+<text text-anchor="middle" x="409" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
+</g>
+<!-- obs_telemetry -->
+<g id="node5" class="node">
+<title>obs_telemetry</title>
+<polygon fill="none" stroke="black" points="564,-332.5 564,-476.5 885,-476.5 885,-332.5 564,-332.5"/>
+<text text-anchor="middle" x="724.5" y="-461.3" font-family="Times,serif" font-size="14.00">obs_telemetry</text>
+<polyline fill="none" stroke="black" points="564,-453.5 885,-453.5 "/>
+<text text-anchor="start" x="572" y="-438.3" font-family="Times,serif" font-size="14.00">time_stamp : timestamp with time zone</text>
+<text text-anchor="start" x="572" y="-423.3" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
+<text text-anchor="start" x="572" y="-408.3" font-family="Times,serif" font-size="14.00"> observed_values : jsonb</text>
+<text text-anchor="start" x="572" y="-393.3" font-family="Times,serif" font-size="14.00"> time_received : timestamp with time zone</text>
+<text text-anchor="start" x="572" y="-378.3" font-family="Times,serif" font-size="14.00"> the_geom : geometry</text>
+<text text-anchor="start" x="572" y="-363.3" font-family="Times,serif" font-size="14.00"> speed : integer</text>
+<polyline fill="none" stroke="black" points="564,-355.5 885,-355.5 "/>
+<text text-anchor="start" x="572" y="-340.3" font-family="Times,serif" font-size="14.00">id : bigint</text>
+</g>
+<!-- obs_telemetry&#45;&gt;unit -->
+<g id="edge4" class="edge">
+<title>obs_telemetry&#45;&gt;unit</title>
+<path fill="none" stroke="#595959" d="M756.5,-332.43C756.5,-332.43 756.5,-290.62 756.5,-290.62"/>
+<polygon fill="#595959" stroke="#595959" points="760,-290.62 756.5,-280.62 753,-290.62 760,-290.62"/>
+<text text-anchor="middle" x="749" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
+</g>
+<!-- phenomenon -->
+<g id="node6" class="node">
+<title>phenomenon</title>
+<polygon fill="none" stroke="black" points="401,-0.5 401,-99.5 550,-99.5 550,-0.5 401,-0.5"/>
+<text text-anchor="middle" x="475.5" y="-84.3" font-family="Times,serif" font-size="14.00">phenomenon</text>
+<polyline fill="none" stroke="black" points="401,-76.5 550,-76.5 "/>
+<text text-anchor="start" x="409" y="-61.3" font-family="Times,serif" font-size="14.00">name : text</text>
+<text text-anchor="start" x="409" y="-46.3" font-family="Times,serif" font-size="14.00"> uom : varchar(30)</text>
+<text text-anchor="start" x="409" y="-31.3" font-family="Times,serif" font-size="14.00"> uom_link : text</text>
+<polyline fill="none" stroke="black" points="401,-23.5 550,-23.5 "/>
+<text text-anchor="start" x="409" y="-8.3" font-family="Times,serif" font-size="14.00">id : integer</text>
+</g>
+<!-- sensor -->
+<g id="node7" class="node">
+<title>sensor</title>
+<polygon fill="none" stroke="black" points="376.5,-151.5 376.5,-280.5 574.5,-280.5 574.5,-151.5 376.5,-151.5"/>
+<text text-anchor="middle" x="475.5" y="-265.3" font-family="Times,serif" font-size="14.00">sensor</text>
+<polyline fill="none" stroke="black" points="376.5,-257.5 574.5,-257.5 "/>
+<text text-anchor="start" x="384.5" y="-242.3" font-family="Times,serif" font-size="14.00">name : varchar(100)</text>
+<text text-anchor="start" x="384.5" y="-227.3" font-family="Times,serif" font-size="14.00"> type : text</text>
+<text text-anchor="start" x="384.5" y="-212.3" font-family="Times,serif" font-size="14.00"> io_id : integer</text>
+<text text-anchor="start" x="384.5" y="-197.3" font-family="Times,serif" font-size="14.00"> phenomenon_id : integer</text>
+<text text-anchor="start" x="384.5" y="-182.3" font-family="Times,serif" font-size="14.00"> description : text</text>
+<polyline fill="none" stroke="black" points="376.5,-174.5 574.5,-174.5 "/>
+<text text-anchor="start" x="384.5" y="-159.3" font-family="Times,serif" font-size="14.00">sensor_id : bigint</text>
+</g>
+<!-- sensor&#45;&gt;phenomenon -->
+<g id="edge5" class="edge">
+<title>sensor&#45;&gt;phenomenon</title>
+<path fill="none" stroke="#595959" d="M475.5,-151.34C475.5,-151.34 475.5,-109.57 475.5,-109.57"/>
+<polygon fill="#595959" stroke="#595959" points="479,-109.57 475.5,-99.57 472,-109.57 479,-109.57"/>
+<text text-anchor="middle" x="540.5" y="-121.8" font-family="Times,serif" font-size="14.00">phenomenon_id:id</text>
+</g>
+<!-- system_user -->
+<g id="node8" class="node">
+<title>system_user</title>
+<polygon fill="none" stroke="black" points="1245.5,-181.5 1245.5,-250.5 1379.5,-250.5 1379.5,-181.5 1245.5,-181.5"/>
+<text text-anchor="middle" x="1312.5" y="-235.3" font-family="Times,serif" font-size="14.00">system_user</text>
+<polyline fill="none" stroke="black" points="1245.5,-227.5 1379.5,-227.5 "/>
+<text text-anchor="start" x="1253.5" y="-212.3" font-family="Times,serif" font-size="14.00">name : text</text>
+<polyline fill="none" stroke="black" points="1245.5,-204.5 1379.5,-204.5 "/>
+<text text-anchor="start" x="1253.5" y="-189.3" font-family="Times,serif" font-size="14.00">user_id : integer</text>
+</g>
+<!-- unit_type -->
+<g id="node12" class="node">
+<title>unit_type</title>
+<polygon fill="none" stroke="black" points="612,-8 612,-92 803,-92 803,-8 612,-8"/>
+<text text-anchor="middle" x="707.5" y="-76.8" font-family="Times,serif" font-size="14.00">unit_type</text>
+<polyline fill="none" stroke="black" points="612,-69 803,-69 "/>
+<text text-anchor="start" x="620" y="-53.8" font-family="Times,serif" font-size="14.00">name : varchar(20)</text>
+<text text-anchor="start" x="620" y="-38.8" font-family="Times,serif" font-size="14.00"> description : text</text>
+<polyline fill="none" stroke="black" points="612,-31 803,-31 "/>
+<text text-anchor="start" x="620" y="-15.8" font-family="Times,serif" font-size="14.00">unit_type_id : varchar(2)</text>
+</g>
+<!-- unit&#45;&gt;unit_type -->
+<g id="edge6" class="edge">
+<title>unit&#45;&gt;unit_type</title>
+<path fill="none" stroke="#595959" d="M707.5,-151.34C707.5,-151.34 707.5,-102.24 707.5,-102.24"/>
+<polygon fill="#595959" stroke="#595959" points="711,-102.24 707.5,-92.24 704,-102.24 711,-102.24"/>
+<text text-anchor="middle" x="751.5" y="-121.8" font-family="Times,serif" font-size="14.00">unit_type_id</text>
+</g>
+<!-- unit_to_campaign -->
+<g id="node10" class="node">
+<title>unit_to_campaign</title>
+<polygon fill="none" stroke="black" points="903.5,-347.5 903.5,-461.5 1197.5,-461.5 1197.5,-347.5 903.5,-347.5"/>
+<text text-anchor="middle" x="1050.5" y="-446.3" font-family="Times,serif" font-size="14.00">unit_to_campaign</text>
+<polyline fill="none" stroke="black" points="903.5,-438.5 1197.5,-438.5 "/>
+<text text-anchor="start" x="911.5" y="-423.3" font-family="Times,serif" font-size="14.00">campaign_id : integer</text>
+<text text-anchor="start" x="911.5" y="-408.3" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
+<text text-anchor="start" x="911.5" y="-393.3" font-family="Times,serif" font-size="14.00"> from_time : timestamp with time zone</text>
+<text text-anchor="start" x="911.5" y="-378.3" font-family="Times,serif" font-size="14.00"> to_time : timestamp with time zone</text>
+<polyline fill="none" stroke="black" points="903.5,-370.5 1197.5,-370.5 "/>
+<text text-anchor="start" x="911.5" y="-355.3" font-family="Times,serif" font-size="14.00">id : integer</text>
+</g>
+<!-- unit_to_campaign&#45;&gt;campaign -->
+<g id="edge7" class="edge">
+<title>unit_to_campaign&#45;&gt;campaign</title>
+<path fill="none" stroke="#595959" d="M1058,-347.43C1058,-347.43 1058,-283.2 1058,-283.2"/>
+<polygon fill="#595959" stroke="#595959" points="1061.5,-283.2 1058,-273.2 1054.5,-283.2 1061.5,-283.2"/>
+<text text-anchor="middle" x="1104.5" y="-302.8" font-family="Times,serif" font-size="14.00">campaign_id:id</text>
+</g>
+<!-- unit_to_campaign&#45;&gt;unit -->
+<g id="edge8" class="edge">
+<title>unit_to_campaign&#45;&gt;unit</title>
+<path fill="none" stroke="#595959" d="M911,-347.46C911,-313.52 911,-277 911,-277 911,-277 815.67,-277 815.67,-277"/>
+<polygon fill="#595959" stroke="#595959" points="815.67,-273.5 805.67,-277 815.67,-280.5 815.67,-273.5"/>
+<text text-anchor="middle" x="912" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
+</g>
+<!-- unit_to_sensor -->
+<g id="node11" class="node">
+<title>unit_to_sensor</title>
+<polygon fill="none" stroke="black" points="405.5,-374 405.5,-435 545.5,-435 545.5,-374 405.5,-374"/>
+<text text-anchor="middle" x="475.5" y="-419.8" font-family="Times,serif" font-size="14.00">unit_to_sensor</text>
+<polyline fill="none" stroke="black" points="405.5,-412 545.5,-412 "/>
+<text text-anchor="start" x="413.5" y="-396.8" font-family="Times,serif" font-size="14.00">sensor_id : bigint</text>
+<text text-anchor="start" x="413.5" y="-381.8" font-family="Times,serif" font-size="14.00"> unit_id : bigint</text>
+</g>
+<!-- unit_to_sensor&#45;&gt;sensor -->
+<g id="edge9" class="edge">
+<title>unit_to_sensor&#45;&gt;sensor</title>
+<path fill="none" stroke="#595959" d="M452.17,-373.79C452.17,-373.79 452.17,-290.69 452.17,-290.69"/>
+<polygon fill="#595959" stroke="#595959" points="455.67,-290.69 452.17,-280.69 448.67,-290.69 455.67,-290.69"/>
+<text text-anchor="middle" x="509.5" y="-302.8" font-family="Times,serif" font-size="14.00">sensor_id</text>
+</g>
+<!-- unit_to_sensor&#45;&gt;unit -->
+<g id="edge10" class="edge">
+<title>unit_to_sensor&#45;&gt;unit</title>
+<path fill="none" stroke="#595959" d="M498.83,-373.95C498.83,-348.02 498.83,-315 498.83,-315 498.83,-315 707.5,-315 707.5,-315 707.5,-315 707.5,-290.65 707.5,-290.65"/>
+<polygon fill="#595959" stroke="#595959" points="711,-290.65 707.5,-280.65 704,-290.65 711,-290.65"/>
+<text text-anchor="middle" x="634" y="-302.8" font-family="Times,serif" font-size="14.00">unit_id</text>
+</g>
+<!-- user_to_campaign -->
+<g id="node13" class="node">
+<title>user_to_campaign</title>
+<polygon fill="none" stroke="black" points="1220.5,-374 1220.5,-435 1396.5,-435 1396.5,-374 1220.5,-374"/>
+<text text-anchor="middle" x="1308.5" y="-419.8" font-family="Times,serif" font-size="14.00">user_to_campaign</text>
+<polyline fill="none" stroke="black" points="1220.5,-412 1396.5,-412 "/>
+<text text-anchor="start" x="1228.5" y="-396.8" font-family="Times,serif" font-size="14.00">user_id : integer</text>
+<text text-anchor="start" x="1228.5" y="-381.8" font-family="Times,serif" font-size="14.00"> campaign_id : integer</text>
+</g>
+<!-- user_to_campaign&#45;&gt;campaign -->
+<g id="edge11" class="edge">
+<title>user_to_campaign&#45;&gt;campaign</title>
+<path fill="none" stroke="#595959" d="M1233,-373.93C1233,-332.06 1233,-262 1233,-262 1233,-262 1222.8,-262 1222.8,-262"/>
+<polygon fill="#595959" stroke="#595959" points="1222.8,-258.5 1212.8,-262 1222.8,-265.5 1222.8,-258.5"/>
+<text text-anchor="middle" x="1235.5" y="-302.8" font-family="Times,serif" font-size="14.00">campaign_id:id</text>
+</g>
+<!-- user_to_campaign&#45;&gt;system_user -->
+<g id="edge12" class="edge">
+<title>user_to_campaign&#45;&gt;system_user</title>
+<path fill="none" stroke="#595959" d="M1312.5,-373.79C1312.5,-373.79 1312.5,-260.53 1312.5,-260.53"/>
+<polygon fill="#595959" stroke="#595959" points="1316,-260.53 1312.5,-250.53 1309,-260.53 1316,-260.53"/>
+<text text-anchor="middle" x="1338.5" y="-302.8" font-family="Times,serif" font-size="14.00">user_id</text>
+</g>
+</g>
+</svg>

BIN
doc/telemetry_model-v2.png