wip
authorgamesguru <mathmuncher11@gmail.com>
Sat, 26 Sep 2020 19:20:37 +0000 (15:20 -0400)
committergamesguru <mathmuncher11@gmail.com>
Mon, 28 Sep 2020 12:25:16 +0000 (08:25 -0400)
docs/nt.svg
sql/data/biometrics.csv
sql/data/food_log.csv [new file with mode: 0644]
sql/data/meal_names.csv [new file with mode: 0644]
sql/data/rda.csv [new file with mode: 0644]
sql/data/recipe_dat.csv [new file with mode: 0644]
sql/data/recipes.csv [new file with mode: 0644]
sql/data/users.csv
sql/import.sql
sql/tables.sql

index d286a4b73e2e4472f61530e62671815b31d1b590..c398c924089c3dd4c2c15bf3e118039392de8e2a 100644 (file)
 <!-- Generated by graphviz version 2.43.0 (0)
  -->
 <!-- Title: undefined Pages: 1 -->
-<svg width="1281pt" height="1625pt"
- viewBox="0.00 0.00 1280.60 1624.60" 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(28.8 1574.8)">
+<svg width="1122pt" height="1240pt"
+ viewBox="0.00 0.00 1121.60 1239.60" 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(28.8 1189.8)">
 <title>undefined</title>
-<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1574.8 1251.8,-1574.8 1251.8,49.8 -28.8,49.8"/>
-<text text-anchor="start" x="583" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">nt.sqlite</text>
-<!-- table_versions -->
+<polygon fill="white" stroke="transparent" points="-28.8,49.8 -28.8,-1189.8 1092.8,-1189.8 1092.8,49.8 -28.8,49.8"/>
+<text text-anchor="start" x="503.5" y="12.6" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">nt.sqlite</text>
+<!-- version -->
 <g id="node1" class="node">
-<title>table_versions</title>
-<path fill="none" stroke="black" d="M860.24,-530.64C860.24,-530.64 980.24,-530.64 980.24,-530.64 986.24,-530.64 992.24,-536.64 992.24,-542.64 992.24,-542.64 992.24,-588.64 992.24,-588.64 992.24,-594.64 986.24,-600.64 980.24,-600.64 980.24,-600.64 860.24,-600.64 860.24,-600.64 854.24,-600.64 848.24,-594.64 848.24,-588.64 848.24,-588.64 848.24,-542.64 848.24,-542.64 848.24,-536.64 854.24,-530.64 860.24,-530.64"/>
-<text text-anchor="start" x="867.24" y="-580.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">table_versions</text>
-<polyline fill="none" stroke="black" points="848.24,-570.64 992.24,-570.64 "/>
-<text text-anchor="start" x="855.24" y="-557.04" font-family="Helvetica,sans-Serif" font-size="12.00">tablename* </text>
-<text text-anchor="start" x="930.24" y="-557.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="855.24" y="-540.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
-<text text-anchor="start" x="903.24" y="-540.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- goals -->
-<g id="node2" class="node">
-<title>goals</title>
-<path fill="none" stroke="black" d="M79.63,-1084.09C79.63,-1084.09 199.63,-1084.09 199.63,-1084.09 205.63,-1084.09 211.63,-1090.09 211.63,-1096.09 211.63,-1096.09 211.63,-1142.09 211.63,-1142.09 211.63,-1148.09 205.63,-1154.09 199.63,-1154.09 199.63,-1154.09 79.63,-1154.09 79.63,-1154.09 73.63,-1154.09 67.63,-1148.09 67.63,-1142.09 67.63,-1142.09 67.63,-1096.09 67.63,-1096.09 67.63,-1090.09 73.63,-1084.09 79.63,-1084.09"/>
-<text text-anchor="start" x="119.63" y="-1133.69" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">goals</text>
-<polyline fill="none" stroke="black" points="67.63,-1124.09 211.63,-1124.09 "/>
-<text text-anchor="start" x="74.63" y="-1110.49" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="95.63" y="-1110.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="74.63" y="-1093.49" font-family="Helvetica,sans-Serif" font-size="12.00">goal_desc </text>
-<text text-anchor="start" x="138.63" y="-1093.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<title>version</title>
+<path fill="none" stroke="black" d="M786.24,-860.64C786.24,-860.64 906.24,-860.64 906.24,-860.64 912.24,-860.64 918.24,-866.64 918.24,-872.64 918.24,-872.64 918.24,-952.64 918.24,-952.64 918.24,-958.64 912.24,-964.64 906.24,-964.64 906.24,-964.64 786.24,-964.64 786.24,-964.64 780.24,-964.64 774.24,-958.64 774.24,-952.64 774.24,-952.64 774.24,-872.64 774.24,-872.64 774.24,-866.64 780.24,-860.64 786.24,-860.64"/>
+<text text-anchor="start" x="819.24" y="-944.24" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">version</text>
+<polyline fill="none" stroke="black" points="774.24,-934.64 918.24,-934.64 "/>
+<text text-anchor="start" x="781.24" y="-921.04" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="802.24" y="-921.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="781.24" y="-904.04" font-family="Helvetica,sans-Serif" font-size="12.00">version </text>
+<text text-anchor="start" x="829.24" y="-904.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="781.24" y="-887.04" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="831.24" y="-887.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="781.24" y="-870.04" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="818.24" y="-870.04" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
 </g>
 <!-- bmr_eqs -->
-<g id="node3" class="node">
+<g id="node2" class="node">
 <title>bmr_eqs</title>
-<path fill="none" stroke="black" d="M1069.01,-1051.57C1069.01,-1051.57 1189.01,-1051.57 1189.01,-1051.57 1195.01,-1051.57 1201.01,-1057.57 1201.01,-1063.57 1201.01,-1063.57 1201.01,-1109.57 1201.01,-1109.57 1201.01,-1115.57 1195.01,-1121.57 1189.01,-1121.57 1189.01,-1121.57 1069.01,-1121.57 1069.01,-1121.57 1063.01,-1121.57 1057.01,-1115.57 1057.01,-1109.57 1057.01,-1109.57 1057.01,-1063.57 1057.01,-1063.57 1057.01,-1057.57 1063.01,-1051.57 1069.01,-1051.57"/>
-<text text-anchor="start" x="1098.01" y="-1101.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bmr_eqs</text>
-<polyline fill="none" stroke="black" points="1057.01,-1091.57 1201.01,-1091.57 "/>
-<text text-anchor="start" x="1064.01" y="-1077.97" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="1085.01" y="-1077.97" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="1064.01" y="-1060.97" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_eq </text>
-<text text-anchor="start" x="1114.01" y="-1060.97" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<path fill="none" stroke="black" d="M18.8,-589.13C18.8,-589.13 138.8,-589.13 138.8,-589.13 144.8,-589.13 150.8,-595.13 150.8,-601.13 150.8,-601.13 150.8,-647.13 150.8,-647.13 150.8,-653.13 144.8,-659.13 138.8,-659.13 138.8,-659.13 18.8,-659.13 18.8,-659.13 12.8,-659.13 6.8,-653.13 6.8,-647.13 6.8,-647.13 6.8,-601.13 6.8,-601.13 6.8,-595.13 12.8,-589.13 18.8,-589.13"/>
+<text text-anchor="start" x="47.8" y="-638.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bmr_eqs</text>
+<polyline fill="none" stroke="black" points="6.8,-629.13 150.8,-629.13 "/>
+<text text-anchor="start" x="13.8" y="-615.53" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="34.8" y="-615.53" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="13.8" y="-598.53" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_eq </text>
+<text text-anchor="start" x="63.8" y="-598.53" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
 </g>
 <!-- bf_eqs -->
-<g id="node4" class="node">
+<g id="node3" class="node">
 <title>bf_eqs</title>
-<path fill="none" stroke="black" d="M12.39,-629.11C12.39,-629.11 132.39,-629.11 132.39,-629.11 138.39,-629.11 144.39,-635.11 144.39,-641.11 144.39,-641.11 144.39,-687.11 144.39,-687.11 144.39,-693.11 138.39,-699.11 132.39,-699.11 132.39,-699.11 12.39,-699.11 12.39,-699.11 6.39,-699.11 0.39,-693.11 0.39,-687.11 0.39,-687.11 0.39,-641.11 0.39,-641.11 0.39,-635.11 6.39,-629.11 12.39,-629.11"/>
-<text text-anchor="start" x="48.39" y="-678.71" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bf_eqs</text>
-<polyline fill="none" stroke="black" points="0.39,-669.11 144.39,-669.11 "/>
-<text text-anchor="start" x="7.39" y="-655.51" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="28.39" y="-655.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="7.39" y="-638.51" font-family="Helvetica,sans-Serif" font-size="12.00">bf_eq </text>
-<text text-anchor="start" x="44.39" y="-638.51" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-</g>
-<!-- lbm_eqs -->
-<g id="node5" class="node">
-<title>lbm_eqs</title>
-<path fill="none" stroke="black" d="M359.38,-1292.95C359.38,-1292.95 479.38,-1292.95 479.38,-1292.95 485.38,-1292.95 491.38,-1298.95 491.38,-1304.95 491.38,-1304.95 491.38,-1350.95 491.38,-1350.95 491.38,-1356.95 485.38,-1362.95 479.38,-1362.95 479.38,-1362.95 359.38,-1362.95 359.38,-1362.95 353.38,-1362.95 347.38,-1356.95 347.38,-1350.95 347.38,-1350.95 347.38,-1304.95 347.38,-1304.95 347.38,-1298.95 353.38,-1292.95 359.38,-1292.95"/>
-<text text-anchor="start" x="389.38" y="-1342.55" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">lbm_eqs</text>
-<polyline fill="none" stroke="black" points="347.38,-1332.95 491.38,-1332.95 "/>
-<text text-anchor="start" x="354.38" y="-1319.35" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="375.38" y="-1319.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="354.38" y="-1302.35" font-family="Helvetica,sans-Serif" font-size="12.00">lbm_eq </text>
-<text text-anchor="start" x="402.38" y="-1302.35" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<path fill="none" stroke="black" d="M748.8,-666.35C748.8,-666.35 868.8,-666.35 868.8,-666.35 874.8,-666.35 880.8,-672.35 880.8,-678.35 880.8,-678.35 880.8,-724.35 880.8,-724.35 880.8,-730.35 874.8,-736.35 868.8,-736.35 868.8,-736.35 748.8,-736.35 748.8,-736.35 742.8,-736.35 736.8,-730.35 736.8,-724.35 736.8,-724.35 736.8,-678.35 736.8,-678.35 736.8,-672.35 742.8,-666.35 748.8,-666.35"/>
+<text text-anchor="start" x="784.8" y="-715.95" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">bf_eqs</text>
+<polyline fill="none" stroke="black" points="736.8,-706.35 880.8,-706.35 "/>
+<text text-anchor="start" x="743.8" y="-692.75" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="764.8" y="-692.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="743.8" y="-675.75" font-family="Helvetica,sans-Serif" font-size="12.00">bf_eq </text>
+<text text-anchor="start" x="780.8" y="-675.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
 </g>
 <!-- users -->
-<g id="node6" class="node">
+<g id="node4" class="node">
 <title>users</title>
-<path fill="none" stroke="black" d="M559.19,-792.82C559.19,-792.82 679.19,-792.82 679.19,-792.82 685.19,-792.82 691.19,-798.82 691.19,-804.82 691.19,-804.82 691.19,-1054.82 691.19,-1054.82 691.19,-1060.82 685.19,-1066.82 679.19,-1066.82 679.19,-1066.82 559.19,-1066.82 559.19,-1066.82 553.19,-1066.82 547.19,-1060.82 547.19,-1054.82 547.19,-1054.82 547.19,-804.82 547.19,-804.82 547.19,-798.82 553.19,-792.82 559.19,-792.82"/>
-<text text-anchor="start" x="599.19" y="-1046.42" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">users</text>
-<polyline fill="none" stroke="black" points="547.19,-1036.82 691.19,-1036.82 "/>
-<text text-anchor="start" x="554.19" y="-1023.22" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="575.19" y="-1023.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="554.19" y="-1006.22" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="593.19" y="-1006.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="554.19" y="-989.22" font-family="Helvetica,sans-Serif" font-size="12.00">eula </text>
-<text text-anchor="start" x="584.19" y="-989.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-972.22" font-family="Helvetica,sans-Serif" font-size="12.00">email </text>
-<text text-anchor="start" x="591.19" y="-972.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="554.19" y="-955.22" font-family="Helvetica,sans-Serif" font-size="12.00">gender </text>
-<text text-anchor="start" x="601.19" y="-955.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="554.19" y="-938.22" font-family="Helvetica,sans-Serif" font-size="12.00">dob </text>
-<text text-anchor="start" x="581.19" y="-938.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="554.19" y="-921.22" font-family="Helvetica,sans-Serif" font-size="12.00">act_lvl </text>
-<text text-anchor="start" x="596.19" y="-921.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-904.22" font-family="Helvetica,sans-Serif" font-size="12.00">goal_id </text>
-<text text-anchor="start" x="600.19" y="-904.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-887.22" font-family="Helvetica,sans-Serif" font-size="12.00">goal_wt </text>
-<text text-anchor="start" x="604.19" y="-887.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="554.19" y="-870.22" font-family="Helvetica,sans-Serif" font-size="12.00">goal_bf </text>
-<text text-anchor="start" x="602.19" y="-870.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="554.19" y="-853.22" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_id </text>
-<text text-anchor="start" x="600.19" y="-853.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-836.22" font-family="Helvetica,sans-Serif" font-size="12.00">bf_id </text>
-<text text-anchor="start" x="587.19" y="-836.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-819.22" font-family="Helvetica,sans-Serif" font-size="12.00">lbm_id </text>
-<text text-anchor="start" x="597.19" y="-819.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="554.19" y="-802.22" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="604.19" y="-802.22" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- users&#45;&gt;goals -->
-<g id="edge4" class="edge">
-<title>users&#45;&gt;goals</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M547.13,-958.26C459.14,-992.99 310.76,-1051.55 219.4,-1087.61"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="218.25,-1085.06 211.84,-1090.6 220.3,-1090.26 218.25,-1085.06"/>
+<path fill="none" stroke="black" d="M450.37,-394.85C450.37,-394.85 570.37,-394.85 570.37,-394.85 576.37,-394.85 582.37,-400.85 582.37,-406.85 582.37,-406.85 582.37,-605.85 582.37,-605.85 582.37,-611.85 576.37,-617.85 570.37,-617.85 570.37,-617.85 450.37,-617.85 450.37,-617.85 444.37,-617.85 438.37,-611.85 438.37,-605.85 438.37,-605.85 438.37,-406.85 438.37,-406.85 438.37,-400.85 444.37,-394.85 450.37,-394.85"/>
+<text text-anchor="start" x="490.37" y="-597.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">users</text>
+<polyline fill="none" stroke="black" points="438.37,-587.85 582.37,-587.85 "/>
+<text text-anchor="start" x="445.37" y="-573.75" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="466.37" y="-573.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="445.37" y="-556.75" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="484.37" y="-556.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="445.37" y="-539.75" font-family="Helvetica,sans-Serif" font-size="12.00">eula </text>
+<text text-anchor="start" x="475.37" y="-539.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="445.37" y="-522.75" font-family="Helvetica,sans-Serif" font-size="12.00">gender </text>
+<text text-anchor="start" x="492.37" y="-522.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="445.37" y="-505.75" font-family="Helvetica,sans-Serif" font-size="12.00">dob </text>
+<text text-anchor="start" x="472.37" y="-505.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="445.37" y="-488.75" font-family="Helvetica,sans-Serif" font-size="12.00">act_lvl </text>
+<text text-anchor="start" x="487.37" y="-488.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="445.37" y="-471.75" font-family="Helvetica,sans-Serif" font-size="12.00">goal_wt </text>
+<text text-anchor="start" x="495.37" y="-471.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="445.37" y="-454.75" font-family="Helvetica,sans-Serif" font-size="12.00">goal_bf </text>
+<text text-anchor="start" x="493.37" y="-454.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="445.37" y="-437.75" font-family="Helvetica,sans-Serif" font-size="12.00">bmr_id </text>
+<text text-anchor="start" x="491.37" y="-437.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="445.37" y="-420.75" font-family="Helvetica,sans-Serif" font-size="12.00">bf_id </text>
+<text text-anchor="start" x="478.37" y="-420.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="445.37" y="-403.75" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="495.37" y="-403.75" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
 <!-- users&#45;&gt;bmr_eqs -->
-<g id="edge3" class="edge">
+<g id="edge2" class="edge">
 <title>users&#45;&gt;bmr_eqs</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M691.42,-952.03C785.83,-981.06 950.67,-1031.74 1048.85,-1061.93"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="1048.2,-1064.66 1056.67,-1064.33 1049.85,-1059.31 1048.2,-1064.66"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M438.13,-526.06C361,-547.12 239.07,-580.39 159,-602.24"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="157.89,-599.64 150.91,-604.45 159.36,-605.05 157.89,-599.64"/>
 </g>
 <!-- users&#45;&gt;bf_eqs -->
-<g id="edge2" class="edge">
-<title>users&#45;&gt;bf_eqs</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M547.14,-894.81C444.9,-845.13 258.37,-754.49 152.1,-702.84"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="153.01,-700.17 144.59,-699.19 150.56,-705.21 153.01,-700.17"/>
-</g>
-<!-- users&#45;&gt;lbm_eqs -->
 <g id="edge1" class="edge">
-<title>users&#45;&gt;lbm_eqs</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M550.43,-1066.83C512.01,-1143.37 466.78,-1233.5 440.76,-1285.35"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="438.14,-1284.32 437.06,-1292.72 443.15,-1286.83 438.14,-1284.32"/>
-</g>
-<!-- measurements -->
-<g id="node7" class="node">
-<title>measurements</title>
-<path fill="none" stroke="black" d="M735.21,-1084.27C735.21,-1084.27 855.21,-1084.27 855.21,-1084.27 861.21,-1084.27 867.21,-1090.27 867.21,-1096.27 867.21,-1096.27 867.21,-1533.27 867.21,-1533.27 867.21,-1539.27 861.21,-1545.27 855.21,-1545.27 855.21,-1545.27 735.21,-1545.27 735.21,-1545.27 729.21,-1545.27 723.21,-1539.27 723.21,-1533.27 723.21,-1533.27 723.21,-1096.27 723.21,-1096.27 723.21,-1090.27 729.21,-1084.27 735.21,-1084.27"/>
-<text text-anchor="start" x="741.21" y="-1524.87" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">measurements</text>
-<polyline fill="none" stroke="black" points="723.21,-1515.27 867.21,-1515.27 "/>
-<text text-anchor="start" x="730.21" y="-1501.17" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="751.21" y="-1501.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="730.21" y="-1484.17" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
-<text text-anchor="start" x="777.21" y="-1484.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1467.17" font-family="Helvetica,sans-Serif" font-size="12.00">weight </text>
-<text text-anchor="start" x="774.21" y="-1467.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1450.17" font-family="Helvetica,sans-Serif" font-size="12.00">height </text>
-<text text-anchor="start" x="772.21" y="-1450.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1433.17" font-family="Helvetica,sans-Serif" font-size="12.00">wrist </text>
-<text text-anchor="start" x="763.21" y="-1433.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1416.17" font-family="Helvetica,sans-Serif" font-size="12.00">ankle </text>
-<text text-anchor="start" x="767.21" y="-1416.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1399.17" font-family="Helvetica,sans-Serif" font-size="12.00">chest </text>
-<text text-anchor="start" x="767.21" y="-1399.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1382.17" font-family="Helvetica,sans-Serif" font-size="12.00">arm </text>
-<text text-anchor="start" x="758.21" y="-1382.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1365.17" font-family="Helvetica,sans-Serif" font-size="12.00">thigh </text>
-<text text-anchor="start" x="764.21" y="-1365.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1348.17" font-family="Helvetica,sans-Serif" font-size="12.00">calf </text>
-<text text-anchor="start" x="756.21" y="-1348.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1331.17" font-family="Helvetica,sans-Serif" font-size="12.00">shoulders </text>
-<text text-anchor="start" x="792.21" y="-1331.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1314.17" font-family="Helvetica,sans-Serif" font-size="12.00">waist </text>
-<text text-anchor="start" x="765.21" y="-1314.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1297.17" font-family="Helvetica,sans-Serif" font-size="12.00">hips </text>
-<text text-anchor="start" x="758.21" y="-1297.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1280.17" font-family="Helvetica,sans-Serif" font-size="12.00">neck </text>
-<text text-anchor="start" x="763.21" y="-1280.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1263.17" font-family="Helvetica,sans-Serif" font-size="12.00">forearm </text>
-<text text-anchor="start" x="782.21" y="-1263.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="730.21" y="-1246.17" font-family="Helvetica,sans-Serif" font-size="12.00">pectoral </text>
-<text text-anchor="start" x="784.21" y="-1246.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1229.17" font-family="Helvetica,sans-Serif" font-size="12.00">abdominal </text>
-<text text-anchor="start" x="797.21" y="-1229.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1212.17" font-family="Helvetica,sans-Serif" font-size="12.00">quadricep </text>
-<text text-anchor="start" x="794.21" y="-1212.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1195.17" font-family="Helvetica,sans-Serif" font-size="12.00">midaxillary </text>
-<text text-anchor="start" x="800.21" y="-1195.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1178.17" font-family="Helvetica,sans-Serif" font-size="12.00">subscapular </text>
-<text text-anchor="start" x="806.21" y="-1178.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1161.17" font-family="Helvetica,sans-Serif" font-size="12.00">tricep </text>
-<text text-anchor="start" x="769.21" y="-1161.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1144.17" font-family="Helvetica,sans-Serif" font-size="12.00">suprailiac </text>
-<text text-anchor="start" x="791.21" y="-1144.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1127.17" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
-<text text-anchor="start" x="761.21" y="-1127.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="730.21" y="-1110.17" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="780.21" y="-1110.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="730.21" y="-1093.17" font-family="Helvetica,sans-Serif" font-size="12.00">updated </text>
-<text text-anchor="start" x="784.21" y="-1093.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- measurements&#45;&gt;users -->
-<g id="edge5" class="edge">
-<title>measurements&#45;&gt;users</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M723.1,-1157.09C710.61,-1129.76 697.67,-1101.46 685.34,-1074.5"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="687.75,-1073.04 681.88,-1066.93 682.66,-1075.37 687.75,-1073.04"/>
+<title>users&#45;&gt;bf_eqs</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M582.61,-553.55C633.25,-586.64 700.18,-630.37 748.07,-661.67"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="746.77,-664.16 755,-666.19 749.83,-659.47 746.77,-664.16"/>
 </g>
 <!-- biometrics -->
-<g id="node8" class="node">
+<g id="node5" class="node">
 <title>biometrics</title>
-<path fill="none" stroke="black" d="M1090.84,-509.08C1090.84,-509.08 1210.84,-509.08 1210.84,-509.08 1216.84,-509.08 1222.84,-515.08 1222.84,-521.08 1222.84,-521.08 1222.84,-618.08 1222.84,-618.08 1222.84,-624.08 1216.84,-630.08 1210.84,-630.08 1210.84,-630.08 1090.84,-630.08 1090.84,-630.08 1084.84,-630.08 1078.84,-624.08 1078.84,-618.08 1078.84,-618.08 1078.84,-521.08 1078.84,-521.08 1078.84,-515.08 1084.84,-509.08 1090.84,-509.08"/>
-<text text-anchor="start" x="1111.84" y="-609.68" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">biometrics</text>
-<polyline fill="none" stroke="black" points="1078.84,-600.08 1222.84,-600.08 "/>
-<text text-anchor="start" x="1085.84" y="-585.98" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="1106.84" y="-585.98" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="1085.84" y="-568.98" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
-<text text-anchor="start" x="1132.84" y="-568.98" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="1085.84" y="-551.98" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="1124.84" y="-551.98" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="1085.84" y="-534.98" font-family="Helvetica,sans-Serif" font-size="12.00">units </text>
-<text text-anchor="start" x="1118.84" y="-534.98" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="1085.84" y="-517.98" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="1135.84" y="-517.98" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-</g>
-<!-- biometrics&#45;&gt;users -->
-<g id="edge6" class="edge">
-<title>biometrics&#45;&gt;users</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M1078.55,-602.22C1008.58,-635.26 900.89,-689.98 815.71,-750.45 774.23,-779.9 732.07,-817.2 697.49,-850.16"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="695.41,-848.28 691.57,-855.83 699.28,-852.32 695.41,-848.28"/>
+<path fill="none" stroke="black" d="M510.35,-1056.89C510.35,-1056.89 630.35,-1056.89 630.35,-1056.89 636.35,-1056.89 642.35,-1062.89 642.35,-1068.89 642.35,-1068.89 642.35,-1148.89 642.35,-1148.89 642.35,-1154.89 636.35,-1160.89 630.35,-1160.89 630.35,-1160.89 510.35,-1160.89 510.35,-1160.89 504.35,-1160.89 498.35,-1154.89 498.35,-1148.89 498.35,-1148.89 498.35,-1068.89 498.35,-1068.89 498.35,-1062.89 504.35,-1056.89 510.35,-1056.89"/>
+<text text-anchor="start" x="531.35" y="-1140.49" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">biometrics</text>
+<polyline fill="none" stroke="black" points="498.35,-1130.89 642.35,-1130.89 "/>
+<text text-anchor="start" x="505.35" y="-1117.29" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="526.35" y="-1117.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="505.35" y="-1100.29" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="544.35" y="-1100.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="505.35" y="-1083.29" font-family="Helvetica,sans-Serif" font-size="12.00">unit </text>
+<text text-anchor="start" x="532.35" y="-1083.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="505.35" y="-1066.29" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="555.35" y="-1066.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
 <!-- biometric_log -->
-<g id="node9" class="node">
+<g id="node6" class="node">
 <title>biometric_log</title>
-<path fill="none" stroke="black" d="M830.91,-753.65C830.91,-753.65 950.91,-753.65 950.91,-753.65 956.91,-753.65 962.91,-759.65 962.91,-765.65 962.91,-765.65 962.91,-879.65 962.91,-879.65 962.91,-885.65 956.91,-891.65 950.91,-891.65 950.91,-891.65 830.91,-891.65 830.91,-891.65 824.91,-891.65 818.91,-885.65 818.91,-879.65 818.91,-879.65 818.91,-765.65 818.91,-765.65 818.91,-759.65 824.91,-753.65 830.91,-753.65"/>
-<text text-anchor="start" x="840.91" y="-871.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">biometric_log</text>
-<polyline fill="none" stroke="black" points="818.91,-861.65 962.91,-861.65 "/>
-<text text-anchor="start" x="825.91" y="-848.05" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="846.91" y="-848.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="825.91" y="-831.05" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
-<text text-anchor="start" x="872.91" y="-831.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="825.91" y="-814.05" font-family="Helvetica,sans-Serif" font-size="12.00">biometric_id </text>
-<text text-anchor="start" x="903.91" y="-814.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="825.91" y="-797.05" font-family="Helvetica,sans-Serif" font-size="12.00">value </text>
-<text text-anchor="start" x="862.91" y="-797.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="825.91" y="-780.05" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="875.91" y="-780.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="825.91" y="-763.05" font-family="Helvetica,sans-Serif" font-size="12.00">updated </text>
-<text text-anchor="start" x="879.91" y="-763.05" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<path fill="none" stroke="black" d="M403.76,-801.69C403.76,-801.69 523.76,-801.69 523.76,-801.69 529.76,-801.69 535.76,-807.69 535.76,-813.69 535.76,-813.69 535.76,-927.69 535.76,-927.69 535.76,-933.69 529.76,-939.69 523.76,-939.69 523.76,-939.69 403.76,-939.69 403.76,-939.69 397.76,-939.69 391.76,-933.69 391.76,-927.69 391.76,-927.69 391.76,-813.69 391.76,-813.69 391.76,-807.69 397.76,-801.69 403.76,-801.69"/>
+<text text-anchor="start" x="413.76" y="-919.29" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">biometric_log</text>
+<polyline fill="none" stroke="black" points="391.76,-909.69 535.76,-909.69 "/>
+<text text-anchor="start" x="398.76" y="-896.09" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="419.76" y="-896.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="398.76" y="-879.09" font-family="Helvetica,sans-Serif" font-size="12.00">guid </text>
+<text text-anchor="start" x="428.76" y="-879.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="398.76" y="-862.09" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
+<text text-anchor="start" x="445.76" y="-862.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="398.76" y="-845.09" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
+<text text-anchor="start" x="429.76" y="-845.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="398.76" y="-828.09" font-family="Helvetica,sans-Serif" font-size="12.00">biometric_id </text>
+<text text-anchor="start" x="476.76" y="-828.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="398.76" y="-811.09" font-family="Helvetica,sans-Serif" font-size="12.00">value </text>
+<text text-anchor="start" x="435.76" y="-811.09" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
 </g>
 <!-- biometric_log&#45;&gt;users -->
-<g id="edge8" class="edge">
+<g id="edge4" class="edge">
 <title>biometric_log&#45;&gt;users</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M818.81,-851.09C781.96,-865.62 737.02,-883.35 699.11,-898.3"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="698.04,-895.71 691.63,-901.25 700.1,-900.92 698.04,-895.71"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M472.63,-801.31C478.95,-751.91 487.61,-684.27 495.03,-626.23"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="497.83,-626.4 496.07,-618.11 492.28,-625.69 497.83,-626.4"/>
 </g>
 <!-- biometric_log&#45;&gt;biometrics -->
-<g id="edge7" class="edge">
+<g id="edge3" class="edge">
 <title>biometric_log&#45;&gt;biometrics</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M961.94,-753.5C999.46,-716.96 1045.3,-672.33 1082.43,-636.19"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="1084.53,-638.05 1088.31,-630.46 1080.62,-634.03 1084.53,-638.05"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M494.73,-939.91C510.22,-974.52 528.77,-1015.98 543.63,-1049.18"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="541.11,-1050.4 546.93,-1056.56 546.22,-1048.11 541.11,-1050.4"/>
 </g>
 <!-- recipes -->
-<g id="node10" class="node">
+<g id="node7" class="node">
 <title>recipes</title>
-<path fill="none" stroke="black" d="M582.18,-236.6C582.18,-236.6 702.18,-236.6 702.18,-236.6 708.18,-236.6 714.18,-242.6 714.18,-248.6 714.18,-248.6 714.18,-345.6 714.18,-345.6 714.18,-351.6 708.18,-357.6 702.18,-357.6 702.18,-357.6 582.18,-357.6 582.18,-357.6 576.18,-357.6 570.18,-351.6 570.18,-345.6 570.18,-345.6 570.18,-248.6 570.18,-248.6 570.18,-242.6 576.18,-236.6 582.18,-236.6"/>
-<text text-anchor="start" x="615.18" y="-337.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipes</text>
-<polyline fill="none" stroke="black" points="570.18,-327.6 714.18,-327.6 "/>
-<text text-anchor="start" x="577.18" y="-313.5" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="598.18" y="-313.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="577.18" y="-296.5" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
-<text text-anchor="start" x="616.18" y="-296.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="577.18" y="-279.5" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
-<text text-anchor="start" x="624.18" y="-279.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="577.18" y="-262.5" font-family="Helvetica,sans-Serif" font-size="12.00">shared </text>
-<text text-anchor="start" x="622.18" y="-262.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="577.18" y="-245.5" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="627.18" y="-245.5" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<path fill="none" stroke="black" d="M295.84,-240.83C295.84,-240.83 415.84,-240.83 415.84,-240.83 421.84,-240.83 427.84,-246.83 427.84,-252.83 427.84,-252.83 427.84,-349.83 427.84,-349.83 427.84,-355.83 421.84,-361.83 415.84,-361.83 415.84,-361.83 295.84,-361.83 295.84,-361.83 289.84,-361.83 283.84,-355.83 283.84,-349.83 283.84,-349.83 283.84,-252.83 283.84,-252.83 283.84,-246.83 289.84,-240.83 295.84,-240.83"/>
+<text text-anchor="start" x="328.84" y="-341.43" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipes</text>
+<polyline fill="none" stroke="black" points="283.84,-331.83 427.84,-331.83 "/>
+<text text-anchor="start" x="290.84" y="-317.73" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="311.84" y="-317.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="290.84" y="-300.73" font-family="Helvetica,sans-Serif" font-size="12.00">guid </text>
+<text text-anchor="start" x="320.84" y="-300.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="290.84" y="-283.73" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
+<text text-anchor="start" x="337.84" y="-283.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="290.84" y="-266.73" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="329.84" y="-266.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="290.84" y="-249.73" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
+<text text-anchor="start" x="340.84" y="-249.73" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
 <!-- recipes&#45;&gt;users -->
-<g id="edge9" class="edge">
+<g id="edge5" class="edge">
 <title>recipes&#45;&gt;users</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M639.98,-357.76C636.44,-455.24 629.38,-649.46 624.47,-784.39"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="621.66,-784.69 624.17,-792.79 627.26,-784.89 621.66,-784.69"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M401.57,-362.01C411.53,-375.22 422.33,-389.55 433.13,-403.87"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="431.04,-405.75 438.09,-410.45 435.51,-402.38 431.04,-405.75"/>
 </g>
 <!-- recipe_dat -->
-<g id="node11" class="node">
+<g id="node8" class="node">
 <title>recipe_dat</title>
-<path fill="none" stroke="black" d="M346.98,-0.85C346.98,-0.85 466.98,-0.85 466.98,-0.85 472.98,-0.85 478.98,-6.85 478.98,-12.85 478.98,-12.85 478.98,-126.85 478.98,-126.85 478.98,-132.85 472.98,-138.85 466.98,-138.85 466.98,-138.85 346.98,-138.85 346.98,-138.85 340.98,-138.85 334.98,-132.85 334.98,-126.85 334.98,-126.85 334.98,-12.85 334.98,-12.85 334.98,-6.85 340.98,-0.85 346.98,-0.85"/>
-<text text-anchor="start" x="368.98" y="-118.45" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_dat</text>
-<polyline fill="none" stroke="black" points="334.98,-108.85 478.98,-108.85 "/>
-<text text-anchor="start" x="341.98" y="-95.25" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="362.98" y="-95.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="341.98" y="-78.25" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
-<text text-anchor="start" x="399.98" y="-78.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="341.98" y="-61.25" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="389.98" y="-61.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="341.98" y="-44.25" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
-<text text-anchor="start" x="392.98" y="-44.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="341.98" y="-27.25" font-family="Helvetica,sans-Serif" font-size="12.00">amount </text>
-<text text-anchor="start" x="392.98" y="-27.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="341.98" y="-10.25" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="391.98" y="-10.25" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<path fill="none" stroke="black" d="M12.47,-52.46C12.47,-52.46 132.47,-52.46 132.47,-52.46 138.47,-52.46 144.47,-58.46 144.47,-64.46 144.47,-64.46 144.47,-144.46 144.47,-144.46 144.47,-150.46 138.47,-156.46 132.47,-156.46 132.47,-156.46 12.47,-156.46 12.47,-156.46 6.47,-156.46 0.47,-150.46 0.47,-144.46 0.47,-144.46 0.47,-64.46 0.47,-64.46 0.47,-58.46 6.47,-52.46 12.47,-52.46"/>
+<text text-anchor="start" x="34.47" y="-136.06" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_dat</text>
+<polyline fill="none" stroke="black" points="0.47,-126.46 144.47,-126.46 "/>
+<text text-anchor="start" x="7.47" y="-112.86" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
+<text text-anchor="start" x="65.47" y="-112.86" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="7.47" y="-95.86" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="55.47" y="-95.86" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="7.47" y="-78.86" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
+<text text-anchor="start" x="50.47" y="-78.86" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="7.47" y="-61.86" font-family="Helvetica,sans-Serif" font-size="12.00">notes </text>
+<text text-anchor="start" x="44.47" y="-61.86" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
 </g>
 <!-- recipe_dat&#45;&gt;recipes -->
-<g id="edge10" class="edge">
+<g id="edge6" class="edge">
 <title>recipe_dat&#45;&gt;recipes</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M478.51,-138.95C508.66,-168.09 543.62,-201.87 573.47,-230.7"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="571.67,-232.86 579.37,-236.4 575.56,-228.83 571.67,-232.86"/>
-</g>
-<!-- recipe_serv -->
-<g id="node12" class="node">
-<title>recipe_serv</title>
-<path fill="none" stroke="black" d="M869.03,-10.3C869.03,-10.3 989.03,-10.3 989.03,-10.3 995.03,-10.3 1001.03,-16.3 1001.03,-22.3 1001.03,-22.3 1001.03,-119.3 1001.03,-119.3 1001.03,-125.3 995.03,-131.3 989.03,-131.3 989.03,-131.3 869.03,-131.3 869.03,-131.3 863.03,-131.3 857.03,-125.3 857.03,-119.3 857.03,-119.3 857.03,-22.3 857.03,-22.3 857.03,-16.3 863.03,-10.3 869.03,-10.3"/>
-<text text-anchor="start" x="887.03" y="-110.9" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">recipe_serv</text>
-<polyline fill="none" stroke="black" points="857.03,-101.3 1001.03,-101.3 "/>
-<text text-anchor="start" x="864.03" y="-87.2" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="885.03" y="-87.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="864.03" y="-70.2" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
-<text text-anchor="start" x="922.03" y="-70.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="864.03" y="-53.2" font-family="Helvetica,sans-Serif" font-size="12.00">msre_desc </text>
-<text text-anchor="start" x="932.03" y="-53.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="864.03" y="-36.2" font-family="Helvetica,sans-Serif" font-size="12.00">grams </text>
-<text text-anchor="start" x="907.03" y="-36.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="864.03" y="-19.2" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="914.03" y="-19.2" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<path fill="none" stroke="black" stroke-width="0.9" d="M144.71,-154.64C185.17,-182.76 235.69,-217.85 277.15,-246.66"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="275.56,-248.97 283.73,-251.23 278.76,-244.37 275.56,-248.97"/>
 </g>
-<!-- recipe_serv&#45;&gt;recipes -->
-<g id="edge11" class="edge">
-<title>recipe_serv&#45;&gt;recipes</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M857.02,-127.62C815.5,-160.37 763.27,-201.57 720.7,-235.15"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="718.77,-233.11 714.23,-240.26 722.24,-237.51 718.77,-233.11"/>
+<!-- meal_names -->
+<g id="node9" class="node">
+<title>meal_names</title>
+<path fill="none" stroke="black" d="M931.54,-104.77C931.54,-104.77 1051.54,-104.77 1051.54,-104.77 1057.54,-104.77 1063.54,-110.77 1063.54,-116.77 1063.54,-116.77 1063.54,-162.77 1063.54,-162.77 1063.54,-168.77 1057.54,-174.77 1051.54,-174.77 1051.54,-174.77 931.54,-174.77 931.54,-174.77 925.54,-174.77 919.54,-168.77 919.54,-162.77 919.54,-162.77 919.54,-116.77 919.54,-116.77 919.54,-110.77 925.54,-104.77 931.54,-104.77"/>
+<text text-anchor="start" x="946.54" y="-154.37" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">meal_names</text>
+<polyline fill="none" stroke="black" points="919.54,-144.77 1063.54,-144.77 "/>
+<text text-anchor="start" x="926.54" y="-131.17" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="947.54" y="-131.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="926.54" y="-114.17" font-family="Helvetica,sans-Serif" font-size="12.00">name </text>
+<text text-anchor="start" x="965.54" y="-114.17" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
 </g>
 <!-- food_log -->
-<g id="node13" class="node">
+<g id="node10" class="node">
 <title>food_log</title>
-<path fill="none" stroke="black" d="M351.6,-438.04C351.6,-438.04 471.6,-438.04 471.6,-438.04 477.6,-438.04 483.6,-444.04 483.6,-450.04 483.6,-450.04 483.6,-632.04 483.6,-632.04 483.6,-638.04 477.6,-644.04 471.6,-644.04 471.6,-644.04 351.6,-644.04 351.6,-644.04 345.6,-644.04 339.6,-638.04 339.6,-632.04 339.6,-632.04 339.6,-450.04 339.6,-450.04 339.6,-444.04 345.6,-438.04 351.6,-438.04"/>
-<text text-anchor="start" x="380.6" y="-623.64" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_log</text>
-<polyline fill="none" stroke="black" points="339.6,-614.04 483.6,-614.04 "/>
-<text text-anchor="start" x="346.6" y="-600.44" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
-<text text-anchor="start" x="367.6" y="-600.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
-<text text-anchor="start" x="346.6" y="-583.44" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
-<text text-anchor="start" x="393.6" y="-583.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="346.6" y="-566.44" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
-<text text-anchor="start" x="377.6" y="-566.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
-<text text-anchor="start" x="346.6" y="-549.44" font-family="Helvetica,sans-Serif" font-size="12.00">meal_name </text>
-<text text-anchor="start" x="421.6" y="-549.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
-<text text-anchor="start" x="346.6" y="-532.44" font-family="Helvetica,sans-Serif" font-size="12.00">amount </text>
-<text text-anchor="start" x="397.6" y="-532.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
-<text text-anchor="start" x="346.6" y="-515.44" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
-<text text-anchor="start" x="404.6" y="-515.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="346.6" y="-498.44" font-family="Helvetica,sans-Serif" font-size="12.00">msre_id </text>
-<text text-anchor="start" x="397.6" y="-498.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="346.6" y="-481.44" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
-<text text-anchor="start" x="394.6" y="-481.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="346.6" y="-464.44" font-family="Helvetica,sans-Serif" font-size="12.00">created </text>
-<text text-anchor="start" x="396.6" y="-464.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
-<text text-anchor="start" x="346.6" y="-447.44" font-family="Helvetica,sans-Serif" font-size="12.00">updated </text>
-<text text-anchor="start" x="400.6" y="-447.44" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<path fill="none" stroke="black" d="M633.13,-231.21C633.13,-231.21 753.13,-231.21 753.13,-231.21 759.13,-231.21 765.13,-237.21 765.13,-243.21 765.13,-243.21 765.13,-408.21 765.13,-408.21 765.13,-414.21 759.13,-420.21 753.13,-420.21 753.13,-420.21 633.13,-420.21 633.13,-420.21 627.13,-420.21 621.13,-414.21 621.13,-408.21 621.13,-408.21 621.13,-243.21 621.13,-243.21 621.13,-237.21 627.13,-231.21 633.13,-231.21"/>
+<text text-anchor="start" x="662.13" y="-399.81" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">food_log</text>
+<polyline fill="none" stroke="black" points="621.13,-390.21 765.13,-390.21 "/>
+<text text-anchor="start" x="628.13" y="-376.11" font-family="Helvetica,sans-Serif" font-size="12.00">id* </text>
+<text text-anchor="start" x="649.13" y="-376.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">integer</text>
+<text text-anchor="start" x="628.13" y="-359.11" font-family="Helvetica,sans-Serif" font-size="12.00">guid </text>
+<text text-anchor="start" x="658.13" y="-359.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">text</text>
+<text text-anchor="start" x="628.13" y="-342.11" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
+<text text-anchor="start" x="675.13" y="-342.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="628.13" y="-325.11" font-family="Helvetica,sans-Serif" font-size="12.00">date </text>
+<text text-anchor="start" x="659.13" y="-325.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">date</text>
+<text text-anchor="start" x="628.13" y="-308.11" font-family="Helvetica,sans-Serif" font-size="12.00">meal_id </text>
+<text text-anchor="start" x="679.13" y="-308.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="628.13" y="-291.11" font-family="Helvetica,sans-Serif" font-size="12.00">amount </text>
+<text text-anchor="start" x="679.13" y="-291.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="628.13" y="-274.11" font-family="Helvetica,sans-Serif" font-size="12.00">recipe_id </text>
+<text text-anchor="start" x="686.13" y="-274.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="628.13" y="-257.11" font-family="Helvetica,sans-Serif" font-size="12.00">food_id </text>
+<text text-anchor="start" x="676.13" y="-257.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="628.13" y="-240.11" font-family="Helvetica,sans-Serif" font-size="12.00">food_msre_id </text>
+<text text-anchor="start" x="712.13" y="-240.11" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
 </g>
 <!-- food_log&#45;&gt;users -->
-<g id="edge13" class="edge">
+<g id="edge9" class="edge">
 <title>food_log&#45;&gt;users</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M466.69,-644.2C490.11,-688.07 517.81,-739.95 543.13,-787.38"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="540.77,-788.9 547.01,-794.64 545.71,-786.27 540.77,-788.9"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M620.9,-397.1C610.21,-407.67 599.15,-418.6 588.35,-429.28"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="586.1,-427.56 582.38,-435.18 590.03,-431.55 586.1,-427.56"/>
 </g>
 <!-- food_log&#45;&gt;recipes -->
-<g id="edge12" class="edge">
+<g id="edge7" class="edge">
 <title>food_log&#45;&gt;recipes</title>
-<path fill="none" stroke="black" stroke-width="0.9" d="M483.61,-464.86C514.21,-432.48 549.57,-395.08 579.12,-363.82"/>
-<polygon fill="black" stroke="black" stroke-width="0.9" points="581.49,-365.39 584.95,-357.65 577.42,-361.54 581.49,-365.39"/>
+<path fill="none" stroke="black" stroke-width="0.9" d="M620.77,-320.48C566.53,-316.56 492.3,-311.19 436.21,-307.14"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="436.26,-304.34 428.07,-306.55 435.85,-309.92 436.26,-304.34"/>
+</g>
+<!-- food_log&#45;&gt;meal_names -->
+<g id="edge8" class="edge">
+<title>food_log&#45;&gt;meal_names</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M765.37,-280.7C815.02,-249.76 880.33,-209.07 928,-179.36"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="929.59,-181.67 934.9,-175.06 926.63,-176.92 929.59,-181.67"/>
+</g>
+<!-- rda -->
+<g id="node11" class="node">
+<title>rda</title>
+<path fill="none" stroke="black" d="M437.69,-0.67C437.69,-0.67 557.69,-0.67 557.69,-0.67 563.69,-0.67 569.69,-6.67 569.69,-12.67 569.69,-12.67 569.69,-92.67 569.69,-92.67 569.69,-98.67 563.69,-104.67 557.69,-104.67 557.69,-104.67 437.69,-104.67 437.69,-104.67 431.69,-104.67 425.69,-98.67 425.69,-92.67 425.69,-92.67 425.69,-12.67 425.69,-12.67 425.69,-6.67 431.69,-0.67 437.69,-0.67"/>
+<text text-anchor="start" x="485.69" y="-84.27" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="13.00">rda</text>
+<polyline fill="none" stroke="black" points="425.69,-74.67 569.69,-74.67 "/>
+<text text-anchor="start" x="432.69" y="-61.07" font-family="Helvetica,sans-Serif" font-size="12.00">user_id </text>
+<text text-anchor="start" x="479.69" y="-61.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="432.69" y="-44.07" font-family="Helvetica,sans-Serif" font-size="12.00">nutr_id </text>
+<text text-anchor="start" x="478.69" y="-44.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+<text text-anchor="start" x="432.69" y="-27.07" font-family="Helvetica,sans-Serif" font-size="12.00">rda </text>
+<text text-anchor="start" x="456.69" y="-27.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">real</text>
+<text text-anchor="start" x="432.69" y="-10.07" font-family="Helvetica,sans-Serif" font-size="12.00">synced </text>
+<text text-anchor="start" x="478.69" y="-10.07" font-family="Helvetica,sans-Serif" font-weight="bold" font-size="12.00">int</text>
+</g>
+<!-- rda&#45;&gt;users -->
+<g id="edge10" class="edge">
+<title>rda&#45;&gt;users</title>
+<path fill="none" stroke="black" stroke-width="0.9" d="M499.14,-104.71C501.05,-172.94 504.45,-294.71 507.02,-386.34"/>
+<polygon fill="black" stroke="black" stroke-width="0.9" points="504.22,-386.63 507.24,-394.55 509.82,-386.47 504.22,-386.63"/>
 </g>
 </g>
 </svg>
index bea9ae1bba271e8957aa6adadb0eec842a000371..db27a05441ecae510cebb419ada0294e13424078 100644 (file)
@@ -1,30 +1,30 @@
-id,tag,name,unit,created
-1,ht,Height,cm,1580336088
-2,wt,Weight,kg,1580336088
-3,wrist,Wrist,cm,1580336088
-4,ankle,Ankle,cm,1580336088
-5,chest,Chest,cm,1580336088
-6,arm,Upper Arm,cm,1580336088
-7,thigh,Thigh,cm,1580336088
-8,calf,Calf,cm,1580336088
-9,shoulders,Shoulders,cm,1580336088
-10,waist,Waist,cm,1580336088
-11,hips,Hips,cm,1580336088
-12,neck,Neck,cm,1580336088
-13,forearm,Forearm,cm,1580336088
-14,pectoral,Pectoral,mm,1580336088
-15,abdominal,Abdominal,mm,1580336088
-16,quadricep,Quadricep,mm,1580336088
-17,midaxillary,Midaxillary,mm,1580336088
-18,subscapular,Subscapular,mm,1580336088
-19,tricep,Tricep,mm,1580336088
-20,suprailiac,Suprailiac,mm,1580336088
-21,custom_bf,Body Fat,,1580336088
-22,pulse,Pulse,bpm,1580336088
-23,systolic,Systolic Blood Pressure,mmHg,1580336088
-24,diastolic,Diastolic Blood Pressure,mmHg,1580336088
-25,glucose,Blood Glucose,mg/dL,1580336088
-26,cholest_tot,Total Cholesterol,mg/dL,1580336088
-27,cholest_ldl,LDL Cholesterol,mg/dL,1580336088
-28,cholest_hdl,HDL Cholesterol,mg/dL,1580336088
-29,triglycerides,Triglycerides,mg/dL,1580336088
+id,name,unit,created
+1,Height,cm,1580336088
+2,Weight,kg,1580336088
+3,Wrist,cm,1580336088
+4,Ankle,cm,1580336088
+5,Chest,cm,1580336088
+6,Upper Arm,cm,1580336088
+7,Thigh,cm,1580336088
+8,Calf,cm,1580336088
+9,Shoulders,cm,1580336088
+10,Waist,cm,1580336088
+11,Hips,cm,1580336088
+12,Neck,cm,1580336088
+13,Forearm,cm,1580336088
+14,Pectoral,mm,1580336088
+15,Abdominal,mm,1580336088
+16,Quadricep,mm,1580336088
+17,Midaxillary,mm,1580336088
+18,Subscapular,mm,1580336088
+19,Tricep,mm,1580336088
+20,Suprailiac,mm,1580336088
+21,Body Fat (Custom),,1580336088
+22,Pulse,bpm,1580336088
+23,Systolic Blood Pressure,mmHg,1580336088
+24,Diastolic Blood Pressure,mmHg,1580336088
+25,Blood Glucose,mg/dL,1580336088
+26,Total Cholesterol,mg/dL,1580336088
+27,LDL Cholesterol,mg/dL,1580336088
+28,HDL Cholesterol,mg/dL,1580336088
+29,Triglycerides,mg/dL,1580336088
diff --git a/sql/data/food_log.csv b/sql/data/food_log.csv
new file mode 100644 (file)
index 0000000..8c69c02
--- /dev/null
@@ -0,0 +1,23 @@
+id,guid,user_id,date,meal_id,amount,food_id,food_msre_id
+1,365e2f316ea39c578a63ec0f59c0d0f0,1,2020-09-20,1,100,13047,
+2,71d5d8cbbc591d22cb210ae6323249a1,1,2020-09-20,1,28,1270,
+3,295f1cd568fc03b760ff9a3a985c4658,1,2020-09-21,1,55,9038,
+4,30bb19b8d57492fee6cb1ebbdc9196a,1,2020-09-21,1,20,11251,
+5,d2e64b1da42c2e12bd3dc9f029fb1bb5,1,2020-09-22,1,35,11529,
+6,b169e76aa7ccd833a3f7d0e1a5f6935b,1,2020-09-22,1,15,11282,
+7,2c53dca9604ea742c39184201d41eed4,1,2020-09-23,1,210,11828,
+8,edad78872ae5d7e2a444756a336dce40,1,2020-09-23,1,40,28313,
+9,c78bb27a7c756763d10d4bb7f860ba23,1,2020-09-24,1,100,9112,
+10,490ffdd0063fcfc79ce5f825a7f2d370,1,2020-09-24,2,140,20137,
+11,7fe9a33f24010f1738ddf73010041ced,1,2020-09-25,2,100,5062,
+12,a54ddeafde280fd76a0cbbd63b9539e7,1,2020-09-25,2,45,12136,
+13,6dfcfbbd5d0cb563343260d287cbdff5,1,2020-09-26,2,50,11821,
+14,4704b0288bf626799dc2c09cbb75f28,1,2020-09-26,2,15,44005,
+15,7053ec55502f3dccccf16d59c2a38873,1,2020-09-27,3,150,20545,
+16,8f7d5caef9dac0d7102a4d90ae9f36c8,1,2020-09-27,3,85,16146,
+17,79949cb0b9914d63892b89d91a4a4ad0,1,2020-09-28,3,40,1270,
+18,85a4ab5a6da9fa84285dece0f2c7fa2a,1,2020-09-28,3,60,9037,
+19,16f98e0382dece4799dd41325b292c70,1,2020-09-29,3,100,15076,
+20,bcab83a1676a3ac8f6aadd63dd032e06,1,2020-09-29,3,60,11090,
+21,44aa12a8695bfd84a513e24bb65896d9,1,2020-09-30,3,35,11938,
+22,252045bc8ba3f133d4006d82a467b053,1,2020-09-30,3,25,11282,
diff --git a/sql/data/meal_names.csv b/sql/data/meal_names.csv
new file mode 100644 (file)
index 0000000..94770b5
--- /dev/null
@@ -0,0 +1,11 @@
+id,name
+1,BREAKFAST
+2,LUNCH
+3,DINNER
+4,SNACK
+5,MEAL 2
+6,MEAL 4
+7,MEAL 6
+8,SNACK 2
+9,SNACK 3
+10,BRUNCH
diff --git a/sql/data/rda.csv b/sql/data/rda.csv
new file mode 100644 (file)
index 0000000..117fe94
--- /dev/null
@@ -0,0 +1,80 @@
+user_id,nutr_id,rda,synced
+3,203,18,1
+3,204,25,1
+3,205,60,1
+3,208,501,1
+3,269,15,1
+3,291,9,1
+3,301,300,1
+3,303,4,1
+3,304,100,1
+3,305,250,1
+3,306,1300,1
+3,307,350,1
+3,309,3,1
+3,312,0.2,1
+3,315,0.6,1
+3,317,15,1
+3,318,1000,1
+3,320,250,1
+3,324,100,1
+3,328,5,1
+3,337,900,1
+3,338,2000,1
+3,401,30,1
+3,404,0.3,1
+3,405,0.35,1
+3,406,4,1
+3,410,1.25,1
+3,415,0.4,1
+3,417,100,1
+3,418,0.6,1
+3,421,110,1
+3,430,30,1
+3,501,0.1,1
+3,502,0.3,1
+3,503,0.5,1
+3,504,1,1
+3,505,0.8,1
+3,506,0.3,1
+3,508,0.3,1
+3,509,0.4,1
+3,510,0.5,1
+3,511,0.3,1
+3,512,0.2,1
+3,513,0.3,1
+3,514,0.3,1
+3,515,0.5,1
+3,516,0.2,1
+3,517,0.2,1
+3,518,0.4,1
+3,601,50,1
+3,605,0,1
+3,606,7,1
+3,621,0.1,1
+3,629,0.05,1
+3,645,10,1
+3,646,6,1
+3,710,8,1
+3,711,4,1
+3,713,11,1
+3,731,5,1
+3,734,10,1
+3,735,5,1
+3,736,5,1
+3,737,2,1
+3,738,1,1
+3,749,10,1
+3,750,10,1
+3,751,10,1
+3,752,10,1
+3,753,15,1
+3,759,20,1
+3,762,15,1
+3,770,8,1
+3,773,5,1
+3,785,5,1
+3,786,1.5,1
+3,788,0.5,1
+3,789,5,1
+3,851,0.3,1
diff --git a/sql/data/recipe_dat.csv b/sql/data/recipe_dat.csv
new file mode 100644 (file)
index 0000000..2f62aa2
--- /dev/null
@@ -0,0 +1,39 @@
+recipe_id,food_id,amount,notes
+1,20045,180,white rice
+1,16042,25,pinto beans
+1,11282,45,onions
+1,11260,45,mushrooms
+1,11821,35,bell peppers
+1,11233,25,kale
+1,23293,85,"beef (grass-fed, 85/15)"
+1,11529,40,tomatoes
+1,9037,40,avocados
+1,1009,20,cheese (cheddar)
+2,18351,55,roll (mixed-grain)
+2,23293,85,"beef (grass-fed, 85/15)"
+2,1009,20,cheddar cheese
+2,11251,25,lettuce (romaine)
+2,11529,40,tomatoes
+2,11282,20,onions
+2,9037,40,avocados
+3,11355,300,potatoes (red)
+3,4053,30,olive oil
+3,11297,30,parsley (fresh)
+4,20011,60,flour (buckwheat)
+4,20140,30,flour (spelt)
+4,20080,30,flour (whole wheat)
+4,1123,56,egg
+4,1079,244,milk (2%)
+4,19911,25,syrup (maple)
+4,16122,20,protein (soy or whey)
+4,2047,1.5,salt
+4,18372,1.5,baking soda
+4,18370,0.75,baking powder
+5,12061,50,almonds
+5,12220,30,flaxseed
+5,12012,20,hemp (seed/protein)
+5,16122,28,protein (soy or whey)
+5,9050,50,blueberries
+5,9040,80,bananas
+5,9176,40,mangos
+5,1289,140,kefir
diff --git a/sql/data/recipes.csv b/sql/data/recipes.csv
new file mode 100644 (file)
index 0000000..1cabfd0
--- /dev/null
@@ -0,0 +1,6 @@
+id,guid,created,name
+1,72217324e92840852242c165aa778a67,1601235568,Burrito bowl (Everyday)
+2,21613decf46873f07027886907d2a4ad,1601235568,"Burger (Grass fed, Beef)"
+3,b4d0016ca8d8d0c2cbc9aa715944637f,1601235568,Baked potato wedges
+4,fe653c350987bffbca2a738889009e4f,1601235568,Buckwheat pancake (w/ syrup)
+5,8359446f074f8ee8ed3f26b4b3c66b3f,1601235568,Blueberry-hemp Smoothie
index 7fe04d84eaec659bf4488653bfd43185e3142f54..d0356e262296f81d26dfae091f34fd1235f9a405 100644 (file)
@@ -1,4 +1,4 @@
-id,name,eula,email,gender,dob,act_lvl,goal_wt,goal_bf,bmr_id,bf_id,created
-1,Shane,1,nutratracker@gmail.com,MALE,1993-01-01,2,78,0.12,1,1,1601067725
-2,Mark,1,kinomark6@gmail.com,MALE,1957-01-01,2,72,0.14,1,1,1601068574
-3,Rocky,1,,DOG,2007-08-01,2,7.3,,1,1,1601068718
+id,name,guid,created,eula,gender,dob,act_lvl,goal_wt,goal_bf,bmr_id,bf_id
+1,Shane,a0fdac7ab369de43f029a460879c854f,1601067725,1,MALE,1993-01-01,2,78,0.12,1,1
+2,Mark,7abf05c84beb849628a44336acfe7a5b,1601068574,1,MALE,1957-01-01,2,72,0.14,1,1
+3,Rocky,2454c8ab7c575cd2610f9977ed3b2b61,1601068718,1,DOG,2007-08-01,2,7.3,,1,1
index 5f402c981316c268f63834de25b30a7fd744daab..ea61145803445a183e9067fe09867796eaaefcca 100644 (file)
 
 .import '| tail -n +2 ./data/bmr_eqs.csv' bmr_eqs
 .import '| tail -n +2 ./data/bf_eqs.csv' bf_eqs
+.import '| tail -n +2 ./data/meal_names.csv' meal_names
 
 .import '| tail -n +2 ./data/biometrics.csv' biometrics
 .import '| tail -n +2 ./data/users.csv' users
+.import '| tail -n +2 ./data/rda.csv' rda
+
+.import '| tail -n +2 ./data/recipes.csv' recipes
+.import '| tail -n +2 ./data/recipe_dat.csv' recipe_dat
+
+.import '| tail -n +2 ./data/food_log.csv' food_log
 
 .header on
 .mode column
index 24095bef43b36c70323734788e6c91fece89fac8..1e21bb81ffb4cfc1dd4aff8fbc36a663e8471f47 100644 (file)
 
 PRAGMA foreign_keys = 1;
 
-CREATE TABLE test (
-  id blob text UNIQUE
-);
-
 CREATE TABLE version( id integer PRIMARY KEY AUTOINCREMENT, version text NOT NULL, created date NOT NULL, notes text
 );
 
@@ -28,7 +24,7 @@ INSERT INTO version(version, created, notes)
 
 --
 ---------------------------------
--- Goals, equations, & statics
+-- Equations
 ---------------------------------
 
 CREATE TABLE bmr_eqs (
@@ -38,7 +34,7 @@ CREATE TABLE bmr_eqs (
 
 CREATE TABLE bf_eqs (
   id integer PRIMARY KEY AUTOINCREMENT,
-  bf_eq text DEFAULT 'NAVY'
+  bf_eq text
 );
 
 --
@@ -49,8 +45,9 @@ CREATE TABLE bf_eqs (
 CREATE TABLE users (
   id integer PRIMARY KEY AUTOINCREMENT,
   name text NOT NULL UNIQUE,
+  guid text NOT NULL DEFAULT (lower(hex (randomblob (16)))) UNIQUE,
+  created int DEFAULT (strftime ('%s', 'now')),
   eula int DEFAULT 0,
-  email text UNIQUE,
   gender text,
   dob date,
   act_lvl int DEFAULT 2, -- [1, 2, 3, 4, 5]
@@ -58,7 +55,6 @@ CREATE TABLE users (
   goal_bf real,
   bmr_id int DEFAULT 1,
   bf_id int DEFAULT 1,
-  created int DEFAULT (strftime ('%s', 'now')),
   FOREIGN KEY (bmr_id) REFERENCES bmr_eqs (id) ON UPDATE CASCADE,
   FOREIGN KEY (bf_id) REFERENCES bf_eqs (id) ON UPDATE CASCADE
 );
@@ -69,8 +65,8 @@ CREATE TABLE users (
 --------------------------------
 
 CREATE TABLE biometrics (
+  -- TODO: support custom biometrics and sync?
   id integer PRIMARY KEY AUTOINCREMENT,
-  tag text NOT NULL UNIQUE,
   name text NOT NULL UNIQUE,
   unit text,
   created int DEFAULT (strftime ('%s', 'now'))
@@ -78,11 +74,11 @@ CREATE TABLE biometrics (
 
 CREATE TABLE biometric_log (
   id integer PRIMARY KEY AUTOINCREMENT,
+  guid text NOT NULL DEFAULT (lower(hex (randomblob (16)))) UNIQUE,
   user_id int NOT NULL,
   date date DEFAULT CURRENT_DATE,
   biometric_id int NOT NULL,
   value real NOT NULL,
-  UNIQUE (user_id, date, biometric_id),
   FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE CASCADE,
   FOREIGN KEY (biometric_id) REFERENCES biometrics (id) ON UPDATE CASCADE
 );
@@ -94,33 +90,24 @@ CREATE TABLE biometric_log (
 
 CREATE TABLE recipes (
   id integer PRIMARY KEY AUTOINCREMENT,
-  name text NOT NULL,
-  shared int DEFAULT 1,
-  created int DEFAULT (strftime ('%s', 'now'))
-);
-
-CREATE TABLE recipe_serv (
-  id integer PRIMARY KEY AUTOINCREMENT,
-  recipe_id int NOT NULL,
-  msre_desc text NOT NULL,
-  grams real NOT NULL,
-  FOREIGN KEY (recipe_id) REFERENCES recipes (id) ON UPDATE CASCADE
+  guid text NOT NULL DEFAULT (lower(hex (randomblob (16)))) UNIQUE,
+  created int DEFAULT (strftime ('%s', 'now')),
+  name text NOT NULL
 );
 
 CREATE TABLE recipe_dat (
   recipe_id int NOT NULL,
   -- TODO: enforce FK constraint across two DBs?
   food_id int NOT NULL,
-  msre_id int NOT NULL,
-  amount real NOT NULL,
+  grams real NOT NULL,
+  notes text,
   UNIQUE (recipe_id, food_id),
-  FOREIGN KEY (recipe_id) REFERENCES recipes (id) ON UPDATE CASCADE,
-  FOREIGN KEY (msre_id) REFERENCES recipe_serv (id) ON UPDATE CASCADE
+  FOREIGN KEY (recipe_id) REFERENCES recipes (id) ON UPDATE CASCADE
 );
 
 --
 --------------------------------
--- Food logs
+-- Food (and recipe) logs
 --------------------------------
 
 CREATE TABLE meal_names (
@@ -128,26 +115,32 @@ CREATE TABLE meal_names (
   name text NOT NULL
 );
 
-INSERT INTO meal_names (name)
-  VALUES ('BREAKFAST'), ('LUNCH'), ('DINNER'), ('SNACK');
-
 CREATE TABLE food_log (
   id integer PRIMARY KEY AUTOINCREMENT,
+  guid text NOT NULL DEFAULT (lower(hex (randomblob (16)))) UNIQUE,
   user_id int,
   date date DEFAULT CURRENT_DATE,
   meal_id int,
-  amount real NOT NULL,
-  recipe_id int,
-  rec_msre_id int,
+  amount real NOT NULL, -- grams, if `food_msre_id` IS NULL
   -- TODO: enforce FK constraint across two DBs?
+
   food_id int,
   food_msre_id int,
-  UNIQUE (user_id, date, meal_id, recipe_id),
-  UNIQUE (user_id, date, meal_id, food_id),
+  FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE CASCADE,
+  FOREIGN KEY (meal_id) REFERENCES meal_names (id) ON UPDATE CASCADE
+);
+
+CREATE TABLE recipe_log (
+  id integer PRIMARY KEY AUTOINCREMENT,
+  guid text NOT NULL DEFAULT (lower(hex (randomblob (16)))) UNIQUE,
+  user_id int,
+  date date DEFAULT CURRENT_DATE,
+  meal_id int,
+  grams real NOT NULL,
+  recipe_id int,
   FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE CASCADE,
   FOREIGN KEY (meal_id) REFERENCES meal_names (id) ON UPDATE CASCADE,
-  FOREIGN KEY (recipe_id) REFERENCES recipes (id) ON UPDATE CASCADE,
-  FOREIGN KEY (rec_msre_id) REFERENCES recipe_serv (id) ON UPDATE CASCADE
+  FOREIGN KEY (recipe_id) REFERENCES recipes (id) ON UPDATE CASCADE
 );
 
 --
@@ -156,11 +149,34 @@ CREATE TABLE food_log (
 --------------------------------
 
 CREATE TABLE rda (
-  id integer PRIMARY KEY,
-  user_id integer NOT NULL,
+  user_id int NOT NULL,
   -- TODO: enforce FK constraint across two DBs?
-  nutr_id integer NOT NULL,
+  nutr_id int NOT NULL,
   rda real NOT NULL,
+  synced int DEFAULT 0,
+  UNIQUE (user_id, nutr_id),
   FOREIGN KEY (user_id) REFERENCES users (id) ON UPDATE CASCADE
 );
 
+CREATE TRIGGER rda_sync
+  AFTER UPDATE OF rda ON rda
+BEGIN
+  UPDATE rda SET synced = 0
+WHERE
+  NEW.user_id = user_id AND NEW.nutr_id = nutr_id;
+
+END;
+
+--
+--------------------------------
+-- Custom RDAs
+--------------------------------
+
+CREATE TABLE sync_data (
+  id integer PRIMARY KEY AUTOINCREMENT,
+  tablename text NOT NULL,
+  guid text,
+  `constraint` text, -- e.g. "(a, b)" in "UNIQUE (a, b)" or "ON CONFLICT (a, b) DO ..."
+  action text NOT NULL -- insert, delete, update
+);
+