NUTDB(1)

NAME

SYNOPSIS
nutdb [dbname]

DESCRIPTION

NUTDB allows you to record what you eat and analyze your meals for nutrient composition. The database included is the USDA Nutrient Database for Standard Reference, Release 17, which contains 6,839 foods and 128 nutrients. This database of food composition tables contains values for calories, protein, carbohydrates, fiber, total fat, etc., and includes all the nutrient data in the USDA database, including the Omega-6 and Omega-3 polyunsaturated fatty acids. Nutrient levels are expressed as a percentage of the DV or Daily Value, the familiar standard of food labeling in the United States. The essential fatty acids, Omega-6 and Omega-3, are not currently mentioned in these standards, and a reference value has been supplied. You may search this list of foods and view nutrient values for different serving sizes; you may also rank foods in order of level of a particular nutrient. You may change the daily calorie level to correspond to your personal metabolism, and the levels for fat, carbohydrates, fiber, and protein are automatically adjusted. You may customize the ratios of carbohydrates to protein to fat to suit your personal regimen. You may add your own recipes to the database, by creating them from the foods in the database. You can also add foods from the information on commercial food labels. The program is completely menu-driven and there are no commands to learn. NUTDB can be called with an optional argument to specify a database subdirectory. For example, if a user tracks meals for other family members, each person can have his own database, and each database is entirely separate. The database subdirectory name (if there is one) is displayed on all screens. The functions included are: Record Meals: Foods are found in the database, a number of servings, weight, or calories is entered, and thus a meal is recorded showing the amount of each food eaten. An analysis screen can be brought up by typing a dot. For the analysis to come out right you must record all the meals the program is set for. For instance, if set for three meals, and you eat more than three, combine them into three; if you eat less than three, record some mimimal item such as an ounce of water for each missing meal. (See below under "Delete Meals and Set Meals Per Day" for the means to set the program to between 1 and 19 meals per day instead of the default 3.) Analyze Meals and Food Suggestions: An analysis of meals in the database is presented in terms of the percentage of each nutrient, where 100% signifies a rate of 100% of the DV (Daily Value) per day. The program will analyze any subset of the latest meals recorded, considering each meal to be an appropriate fraction of a day. By pressing "s" on the analysis screen, nutrients for which the DV have not been achieved are listed, and some random foods are chosen from the database which contain the additional nutrients. By pressing "c" the ratios are reset to cause the meals being analyzed to represent 100% of calories (but see "Set Personal Options" below for options that can be locked in place and not reset from the analysis screen). By pressing "m" the macronutrient ratios are reset to the absolute values in the analysis, including calories, protein, carbohydrates, and fats. (There is also an "n" option, not shown in the prompt, which works just like "m" but does not set the groups of fatty acids or fiber, and sets the personal options by carb percentage and fat-to-protein ratio rather than absolute amounts.) By pressing "e" all values are reset to the absolute values in the analysis. By pressing "o" all DV defaults are restored. By pressing "d" the display alternates between DV percentages, absolute values of the DV nutrients, and a series of screens of all additional nutrients in the database. When you leave the analysis screen (or the "View Foods" screen) with a particular set of nutrients showing, that set of nutrients will be used in the other functions in the program, including printing menus, ranking foods, and drawing graphs. If the value "(nd)" shows up on a screen, it signifies the database has no data for that particular nutrient for the foods viewed. If the analysis screen is brought up during "Record Meals", it analyzes backwards from the meal being viewed, which might not be the last meal; however, the "Analyze Meals" screen from main menu option 2 always analyzes from the last meal in the database. Delete Meals and Set Meals Per Day: Some or all of the collected meals may be removed from the database; or an automatic feature may be selected which keeps the meal database from getting unnecessarily huge, deleting the oldest meals in excess of a number of meals set by the user. When all meals are deleted, an option may be set to change the program's default from 3 meals a day to 1 to 19 meals a day. View Foods: Foods can be viewed using the same interface as for "Record Meals," specifying whatever serving size the user wishes to see analyzed for nutrient content, and if necessary typing a "d" to change the display to a different set of nutrients. You can type just the beginning of a food name or a part of a food name, and a numbered menu of all possible completions continues to be shown until a unique food is chosen. If the value "(nd)" shows up on a screen, it signifies the database has no data for that particular nutrient for the foods viewed. Add Foods and Modify Serving Sizes: This item has three selections, "Add a Recipe," "Add a Labeled Food," and "Modify Serving Sizes." To add a recipe, foods are selected in exactly the same way as adding a meal, a number of servings or weight is entered for each food, and the recipe is recorded. Then the software divides the recipe into the number of servings desired, and provides an opportunity to adjust the weight of the servings to allow for water gained or lost in preparation. NUTDB allows you to add a labeled food with an ordered list of ingredients and a nutrition statement, The new food will have additional nutrients that were not on the nutrition statement, but that the database says are in the food. First, the labeled food is named. Next the program requests that the food's listed ingredients be found in the order of greatest to least. Do not worry about ingredients you cannot find. No amount or weight is set for any ingredient--the ingredient is simply selected. Then the nutrient lists are presented so the nutritional information can be copied into the program. Whenever you quit a nutrient screen, an opportunity is presented to select a different set of nutrients. The "DV" percentages for this part of the program are the USA standard 2000-calorie Daily Values, and not any customized options--but users can always set the label's nutrient information in grams. Only Daily Value nutrients greater than zero are considered as constraints when NUTDB constructs an approximate recipe in order to fill in nutrient values that were not expressed on the food label. After the recipe is displayed there is an additional opportunity to edit the nutrient values. Perhaps the food was so heavily fortified with vitamins that the user waited until after NUTDB constructed a recipe to specify the additional vitamin amounts. Whatever the rationale for additional editing, the user has total control over the nutritional information no matter what NUTDB's approximate recipe suggested. The new food record is saved in the database in the same manner as a recipe. To modify the serving size of an existing food, the food is selected and the serving sizes on file are displayed so one can be selected. Alternately, the user may simply type in his own serving size consisting of number of grams, the serving unit (such as cups or tablespoons) and the serving quantity. View Nutrients and Rank Foods: The nutrients are reviewed and one of the nutrients is selected to list all the foods rich in that nutrient. The food database can be queried in this manner for nutrients per 100 grams, per 100 grams dry weight, per 100 calories, per serving, per serving minimizing some other nutrient, and per recorded meals (average intake per day). The set of nutrients operated on are the last set viewed or analyzed. The "Rank Foods per Recorded Meals" option is useful for discovering which foods contribute the most to your intake of a particular nutrient. When you use "Record Meals" to view a meal earlier than your last meal, this "per recorded meals" option looks back from that same meal, to show which foods you were eating during that earlier period. Likewise, the program remembers how many meals were last analyzed, and only searches that subset of meals to find which foods to list. Note that processed foods which contain hydrogenated vegetable oil or significant "trans-" fats may not contain as much of the essential fatty acids as the program shows because the USDA database does not yet completely distinguish between essential fatty acids and the "trans-" fats, which cannot serve for essential fatty acids in the body. Set Personal Options: This screen sets and removes options, locking options in place so they cannot be reset from the analysis screen. Options are to change the DV for calories and the levels for fats, carbohydrates, fiber, protein, and essential fatty acids are then adjusted appropriately (there is also an automatic feature to do this for you from your average calories); make the program not adjust essential fatty acids in relation to calories, but rather use absolute amounts; set the saturated fat percentage; set the fiber absolute amount; set the carbohydrate percentage; set the protein percentage; set the carbohydrate absolute amount; set the protein absolute amount; set the fat to protein ratio; and restore all program defaults. Some of the carbohydrate and protein settings are mutually exclusive and affect the fat percentages as carbs, protein, and fat of course must total 100%; however, calories per gram vary from food to food, so the percentage of calories from carbs, protein, and fat will vary even if grams of each remain constant, so consider these settings approximations. Plot Daily and Monthly Trends: The list of nutrients is presented and one nutrient is chosen for its level to be graphed facing a plot of protein, fat, and carbohydrate calories. The user enters the number of the nutrient plus a letter, either "d" or "m" to specify "daily" or "monthly" i.e., "22m". It is only necessary to enter the "d" or "m" once in order to set the mode. Monthly graphs cover the entire period of the meal database; daily graphs cover 36 days back from the last meal viewed or analyzed. The graphs of Daily Values for fat are special and show the constituent fat types symbolically where . = non-fatty acid constituents, s = saturated, m = monounsaturated, 6 = unspecified Omega-6, 3 = unspecified Omega-3, L = linoleic acid, A = arachidonic acid, n = linolenic acid, e = EPA, and d = DHA. In a similar vein, the "Total Carb" graph shows non-fiber carb as "." and fiber as ":". Record 'The Usual'--Customary Meals: When NUTDB asks what you are having, you can answer "the usual." Specifically, this function allows you to record a customary meal, and give it a name. Later, when recording a regular meal, all these foods can be added to the meal quickly by typing "theusualname", where "name" is the name you gave to the customary meal. Foods added this way can be individually deleted from the meal, and other foods added, because this function does not make the individual foods lose their identity as in "Add a Recipe." Print Menus from Meal Database: Makes a printable file (called "menus.txt" in the current directory) which lists foods and quantities recorded for each meal, and a nutrient analysis that is the sum of nutrients for each meal, not the rate of nutrient intake as on the "Analyze Meals" screen. In common with other functions in the program, it looks back from the last meal recorded or analyzed, only prints the number of meals last analyzed, and prints that set of nutrients last displayed on an analysis or "View Foods" screen.

FILES
sr17.nut        Joined text version of USDA Nutrient Database
FOOD_DES.txt    USDA-format food records for user recipes and edits
NUT_DATA.txt    USDA-format nutrient records for user recipes and edits
WEIGHT.txt      USDA-format weight records for user recipes and edits
WEIGHT.lib      Joined serving sizes from USDA Nutrient Database
food.db         Food database
meal.db         Meal database
theusual.db     Customary Meals database
OPTIONS.txt     Personal Options records
version         NUTDB software version number
menus.txt       ASCII print file of meal database

AUTHOR

Jim Jozwiak (jozwiak@gmail.com, av832@lafn.org)
http://www.lafn.org/~av832/

COPYING

Copyright (C) 2005 Jim Jozwiak