From: Shane Jaroch Date: Thu, 6 Aug 2020 13:16:57 +0000 (-0400) Subject: small changes X-Git-Tag: 0.0.2~2 X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=af5f213e1799792febdf5b7323367e76945f1449;p=nutratech%2Fusda-sqlite.git small changes --- diff --git a/README.rst b/README.rst index f64d7ef..90e23d5 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,14 @@ Building the database bash setup.sh python3 process.py -3. Create the database with :code:`sqlite3 nutra.db`, AND FOLLOW STEP 4 FROM INSIDE THE SQL SHELL +3. Create the database with + +.. code-block:: bash + + cd ../sql + sqlite3 nutra.db + +NOTE: FOLLOW STEP 4 FROM INSIDE THE SQL SHELL 4. Create the tables, import the data, and save: diff --git a/docs/nutra.svg b/docs/nutra.svg index 37e129d..9d45777 100644 --- a/docs/nutra.svg +++ b/docs/nutra.svg @@ -4,14 +4,38 @@ - + undefined - -nutra.db - + +nutra.db + +nt_ver + +nt_ver + +id* +integer +version +text +created +timestamp + + + +sqlite_sequence + +sqlite_sequence + +name + +seq + + + + nutr_def nutr_def @@ -35,19 +59,8 @@ flav_class text - - -sqlite_sequence - -sqlite_sequence - -name - -seq - - - + fdgrp fdgrp @@ -58,7 +71,7 @@ text - + food_des food_des @@ -85,10 +98,10 @@ text n_factor float -pro_factor_ -float -fat_factor_ -float +pro_factor +float +fat_factor +float cho_factor float @@ -99,7 +112,7 @@ - + src_cd src_cd @@ -110,7 +123,7 @@ text - + deriv_cd deriv_cd @@ -121,7 +134,7 @@ text - + nut_data nut_data @@ -188,7 +201,7 @@ - + lang_desc lang_desc @@ -199,7 +212,7 @@ text - + langual langual @@ -222,7 +235,7 @@ - + data_src data_src @@ -247,7 +260,7 @@ text - + datsrcln datsrcln @@ -278,7 +291,7 @@ - + footnote footnote @@ -307,7 +320,7 @@ - + serv_desc serv_desc @@ -318,7 +331,7 @@ text - + serving serving diff --git a/docs/sqleton.sh b/docs/sqleton.sh index feb12dd..e5e52c1 100755 --- a/docs/sqleton.sh +++ b/docs/sqleton.sh @@ -2,6 +2,6 @@ # cd to script's directory cd "$(dirname "$0")" -cd ../data +cd ../sql sqleton -o ../docs/nutra.svg nutra.db diff --git a/sql/format-sql.sh b/sql/format-sql.sh index 07a986b..32b0965 100755 --- a/sql/format-sql.sh +++ b/sql/format-sql.sh @@ -3,4 +3,4 @@ cd "$(dirname "$0")" pg_format -s 2 tables.sql -o tables.sql -# pg_format -s 2 functions.sql -o import.sql +# pg_format -s 2 import.sql -o import.sql