]> Softwares of Agnibho - dietsurvey.git/blob - dietsurvey.sql
Rewritten in PHP/Javascript
[dietsurvey.git] / dietsurvey.sql
1 /**********************************************************************
2 * Title: Diet-Survey
3 * Description: Application for calculating nutrient intake
4 * Author: Agnibho Mondal
5 * Website: http://code.agnibho.com
6 **********************************************************************
7 Copyright (c) 2013-2015 Agnibho Mondal
8 All rights reserved
9 **********************************************************************
10 This file is part of Diet-Survey.
11
12 Diet-Survey is free software: you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 Diet-Survey is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with Diet-Survey. If not, see <http://www.gnu.org/licenses/>.
24 **********************************************************************/
25 -- phpMyAdmin SQL Dump
26 -- version 4.5.2
27 -- http://www.phpmyadmin.net
28 --
29 -- Host: localhost
30 -- Generation Time: Dec 03, 2015 at 09:02 PM
31 -- Server version: 10.0.22-MariaDB-log
32 -- PHP Version: 5.6.15
33
34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
35 SET time_zone = "+00:00";
36
37
38 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
39 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
40 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
41 /*!40101 SET NAMES utf8mb4 */;
42
43 --
44 -- Database: `dietsurvey`
45 --
46
47 -- --------------------------------------------------------
48
49 --
50 -- Table structure for table `food`
51 --
52
53 CREATE TABLE `food` (
54 `id` int(11) NOT NULL,
55 `name` varchar(128) NOT NULL,
56 `food_group` varchar(16) NOT NULL,
57 `energy` decimal(6,2) NOT NULL,
58 `protein` decimal(6,2) NOT NULL,
59 `fat` decimal(6,2) NOT NULL,
60 `iron` decimal(6,2) NOT NULL,
61 `calcium` decimal(6,2) NOT NULL,
62 `vitA` decimal(6,2) NOT NULL,
63 `vitC` decimal(6,2) NOT NULL,
64 `thiamine` decimal(6,2) NOT NULL,
65 `riboflavin` decimal(6,2) NOT NULL
66 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
67
68 --
69 -- Dumping data for table `food`
70 --
71
72 INSERT INTO `food` (`id`, `name`, `food_group`, `energy`, `protein`, `fat`, `iron`, `calcium`, `vitA`, `vitC`, `thiamine`, `riboflavin`) VALUES
73 (1, 'Rice', 'Cereals', '348.00', '6.40', '0.40', '1.00', '9.00', '0.00', '0.00', '0.21', '0.05'),
74 (2, 'Wheat', 'Cereals', '341.00', '12.10', '1.70', '4.90', '48.00', '29.00', '0.00', '0.49', '0.17'),
75 (3, 'Dal', 'Pulses', '348.00', '24.50', '1.20', '3.90', '75.00', '49.00', '0.00', '0.47', '0.21'),
76 (4, 'Lentil', 'Pulses', '343.00', '25.10', '0.60', '7.60', '69.00', '270.00', '0.00', '0.45', '0.20'),
77 (5, 'Soyabean', 'Pulses', '432.00', '43.20', '19.50', '10.40', '240.00', '426.00', '0.00', '0.73', '0.39'),
78 (6, 'Ground Nut', 'Nuts & Oilseeds', '567.00', '25.30', '40.10', '2.50', '90.00', '37.00', '0.00', '0.90', '0.13'),
79 (7, 'Amaranth', 'GLV', '45.00', '4.00', '0.50', '3.49', '397.00', '5520.00', '99.00', '0.03', '0.30'),
80 (8, 'Cabbage', 'GLV', '27.00', '1.80', '0.10', '0.80', '39.00', '120.00', '124.00', '0.06', '0.09'),
81 (9, 'Spinach', 'GLV', '26.00', '2.00', '0.70', '1.14', '73.00', '5580.00', '28.00', '0.03', '0.25'),
82 (10, 'Bottle Guard', 'Other Vegetables', '12.00', '0.20', '0.10', '0.46', '20.00', '0.00', '0.00', '0.03', '0.01'),
83 (11, 'Brinjal', 'Other Vegetables', '24.00', '1.40', '0.30', '0.38', '18.00', '74.00', '12.00', '0.04', '0.11'),
84 (12, 'Cauliflower', 'Other Vegetables', '30.00', '2.60', '0.40', '1.23', '33.00', '30.00', '56.00', '0.04', '0.10'),
85 (13, 'Cucumber', 'Other Vegetables', '13.00', '0.40', '0.10', '0.60', '10.00', '0.00', '7.00', '0.03', '0.00'),
86 (14, 'Ladies Finger', 'Other Vegetables', '35.00', '1.90', '0.20', '0.35', '66.00', '52.00', '13.00', '0.07', '0.10'),
87 (15, 'Papaya (green)', 'Other Vegetables', '27.00', '0.70', '0.20', '0.90', '28.00', '0.00', '12.00', '0.00', '0.00'),
88 (16, 'Parwar', 'Other Vegetables', '20.00', '2.00', '0.30', '1.70', '30.00', '153.00', '29.00', '0.50', '0.60'),
89 (17, 'Pumpkin', 'Other Vegetables', '25.00', '1.40', '0.10', '0.44', '10.00', '50.00', '2.00', '0.60', '0.40'),
90 (18, 'Plantain', 'Other Vegetables', '64.00', '1.40', '0.20', '6.27', '10.00', '30.00', '24.00', '0.05', '0.02'),
91 (19, 'Carrot', 'Roots & Tubers', '48.00', '0.90', '0.20', '1.03', '80.00', '1890.00', '3.00', '0.04', '0.02'),
92 (20, 'Onion', 'Roots & Tubers', '50.00', '1.20', '0.10', '0.60', '47.00', '0.00', '11.00', '0.06', '0.01'),
93 (21, 'Potato', 'Roots & Tubers', '97.00', '1.60', '0.10', '0.48', '10.00', '24.00', '17.00', '0.10', '0.01'),
94 (22, 'Radish', 'Roots & Tubers', '32.00', '0.60', '0.30', '0.37', '50.00', '3.00', '17.00', '0.06', '0.02'),
95 (23, 'Amla', 'Fruits', '58.00', '0.50', '0.10', '1.20', '50.00', '9.00', '600.00', '0.03', '0.01'),
96 (24, 'Apple', 'Fruits', '59.00', '0.20', '0.66', '1.00', '10.00', '0.00', '1.00', '0.00', '0.00'),
97 (25, 'Banana', 'Fruits', '116.00', '1.20', '0.36', '0.90', '17.00', '78.00', '7.00', '0.05', '0.08'),
98 (26, 'Grape', 'Fruits', '71.00', '0.50', '0.30', '0.50', '20.00', '0.00', '1.00', '0.00', '0.00'),
99 (27, 'Lemon', 'Fruits', '57.00', '1.00', '0.90', '0.26', '70.00', '0.00', '39.00', '0.02', '0.01'),
100 (28, 'Guava', 'Fruits', '51.00', '0.90', '0.30', '0.27', '10.00', '0.00', '212.00', '0.03', '0.03'),
101 (29, 'Mango', 'Fruits', '74.00', '0.60', '0.40', '1.30', '14.00', '2743.00', '16.00', '0.06', '0.09'),
102 (30, 'Orange', 'Fruits', '48.00', '0.70', '0.20', '0.32', '26.00', '1104.00', '30.00', '0.00', '0.00'),
103 (31, 'Papaya (ripe)', 'Fruits', '32.00', '0.60', '0.10', '0.50', '17.00', '666.00', '57.00', '0.04', '0.25'),
104 (32, 'Tomato', 'Fruits', '20.00', '0.90', '0.20', '0.64', '48.00', '351.00', '27.00', '0.12', '0.06'),
105 (33, 'Milk (cow)', 'Milk & Products', '67.00', '3.20', '4.10', '0.20', '120.00', '53.00', '2.00', '0.05', '0.19'),
106 (34, 'Milk (human)', 'Milk & Products', '65.00', '1.10', '3.40', '0.00', '28.00', '41.00', '3.00', '0.02', '0.02'),
107 (35, 'Egg', 'Flesh Foods', '173.00', '13.30', '13.30', '2.10', '60.00', '420.00', '0.00', '0.10', '0.40'),
108 (36, 'Fish (rohu)', 'Flesh Foods', '92.00', '16.60', '1.40', '1.00', '650.00', '0.00', '22.00', '0.05', '0.07'),
109 (37, 'Chillies', 'Spices', '29.00', '2.90', '0.60', '4.40', '30.00', '175.00', '111.00', '0.19', '0.39'),
110 (38, 'Oil', 'Fats & Oils', '900.00', '0.00', '100.00', '0.00', '0.00', '0.00', '0.00', '0.00', '0.00'),
111 (39, 'Sugar', 'Sugar & Jaggery', '398.00', '0.10', '0.00', '0.16', '12.00', '0.00', '0.00', '0.00', '0.00');
112
113 -- --------------------------------------------------------
114
115 --
116 -- Table structure for table `rda`
117 --
118
119 CREATE TABLE `rda` (
120 `id` int(11) NOT NULL,
121 `subject` varchar(16) NOT NULL,
122 `energy` decimal(6,2) NOT NULL,
123 `protein` decimal(6,2) NOT NULL,
124 `iron` decimal(6,2) NOT NULL,
125 `vitA` decimal(6,2) NOT NULL,
126 `thiamine` decimal(6,2) NOT NULL,
127 `riboflavin` decimal(6,2) NOT NULL,
128 `vitC` decimal(6,2) NOT NULL
129 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
130
131 --
132 -- Dumping data for table `rda`
133 --
134
135 INSERT INTO `rda` (`id`, `subject`, `energy`, `protein`, `iron`, `vitA`, `thiamine`, `riboflavin`, `vitC`) VALUES
136 (1, 'infant_0m-6m', '500.00', '0.00', '0.00', '0.00', '0.20', '0.30', '25.00'),
137 (2, 'infant_6m-9m', '670.00', '13.40', '5.00', '2100.00', '0.30', '0.40', '25.00'),
138 (3, 'infant_9m-12m', '670.00', '14.90', '5.00', '2100.00', '0.30', '0.40', '25.00'),
139 (4, 'male_1y', '1060.00', '15.10', '9.00', '3200.00', '0.50', '0.60', '40.00'),
140 (5, 'male_2y', '1060.00', '16.00', '9.00', '3200.00', '0.50', '0.60', '40.00'),
141 (6, 'male_3y', '1060.00', '17.20', '9.00', '3200.00', '0.50', '0.60', '40.00'),
142 (7, 'male_4y', '1350.00', '18.30', '13.00', '3200.00', '0.70', '0.80', '40.00'),
143 (8, 'male_5y', '1350.00', '19.80', '13.00', '3200.00', '0.70', '0.80', '40.00'),
144 (9, 'male_6y', '1350.00', '23.50', '13.00', '3200.00', '0.70', '0.80', '40.00'),
145 (10, 'male_7y', '1690.00', '26.60', '16.00', '4800.00', '0.80', '1.00', '40.00'),
146 (11, 'male_8y', '1690.00', '29.70', '16.00', '4800.00', '0.80', '1.00', '40.00'),
147 (12, 'male_9y', '1690.00', '33.00', '16.00', '4800.00', '0.80', '1.00', '40.00'),
148 (13, 'male_10y', '2190.00', '36.30', '21.00', '4800.00', '1.10', '1.30', '40.00'),
149 (14, 'male_11y', '2190.00', '39.60', '21.00', '4800.00', '1.10', '1.30', '40.00'),
150 (15, 'male_12y', '2190.00', '43.70', '21.00', '4800.00', '1.10', '1.30', '40.00'),
151 (16, 'male_13y', '2750.00', '49.80', '32.00', '4800.00', '1.40', '1.60', '40.00'),
152 (17, 'male_14y', '2750.00', '54.70', '32.00', '4800.00', '1.40', '1.60', '40.00'),
153 (18, 'male_15y', '2750.00', '58.20', '32.00', '4800.00', '1.40', '1.60', '40.00'),
154 (19, 'male_16y', '3020.00', '60.80', '28.00', '4800.00', '1.50', '1.80', '40.00'),
155 (20, 'male_17y', '3020.00', '62.20', '28.00', '4800.00', '1.50', '1.80', '40.00'),
156 (21, 'female_1y', '1060.00', '14.10', '9.00', '3200.00', '0.50', '0.30', '40.00'),
157 (22, 'female_2y', '1060.00', '15.10', '9.00', '3200.00', '0.50', '0.30', '40.00'),
158 (23, 'female_3y', '1060.00', '16.80', '9.00', '3200.00', '0.50', '0.30', '40.00'),
159 (24, 'female_4y', '1350.00', '17.80', '13.00', '3200.00', '0.70', '0.80', '40.00'),
160 (25, 'female_5y', '1350.00', '19.30', '13.00', '3200.00', '0.70', '0.80', '40.00'),
161 (26, 'female_6y', '1350.00', '23.00', '13.00', '3200.00', '0.70', '0.80', '40.00'),
162 (27, 'female_7y', '1690.00', '26.10', '16.00', '4800.00', '0.80', '1.00', '40.00'),
163 (28, 'female_8y', '1690.00', '29.50', '16.00', '4800.00', '0.80', '1.00', '40.00'),
164 (29, 'female_9y', '1690.00', '32.60', '16.00', '4800.00', '0.80', '1.00', '40.00'),
165 (30, 'female_10y', '2010.00', '36.80', '27.00', '4800.00', '1.00', '1.20', '40.00'),
166 (31, 'female_11y', '2010.00', '40.00', '27.00', '4800.00', '1.00', '1.20', '40.00'),
167 (32, 'female_12y', '2010.00', '44.50', '27.00', '4800.00', '1.00', '1.20', '40.00'),
168 (33, 'female_13y', '2330.00', '49.00', '27.00', '4800.00', '1.20', '1.40', '40.00'),
169 (34, 'female_14y', '2330.00', '52.80', '27.00', '4800.00', '1.20', '1.40', '40.00'),
170 (35, 'female_15y', '2330.00', '53.80', '27.00', '4800.00', '1.20', '1.40', '40.00'),
171 (36, 'female_16y', '2440.00', '54.90', '26.00', '4800.00', '1.00', '1.20', '40.00'),
172 (37, 'female_17y', '2440.00', '56.00', '26.00', '4800.00', '1.00', '1.20', '40.00'),
173 (38, 'male_sedentary', '2320.00', '60.00', '17.00', '4800.00', '1.20', '1.40', '40.00'),
174 (39, 'male_moderate', '2730.00', '60.00', '17.00', '4800.00', '1.40', '1.60', '40.00'),
175 (40, 'male_heavy', '3490.00', '60.00', '17.00', '4800.00', '1.70', '2.10', '40.00'),
176 (41, 'female_sedentary', '1900.00', '55.00', '21.00', '4800.00', '1.00', '1.10', '40.00'),
177 (42, 'female_moderate', '2230.00', '55.00', '21.00', '4800.00', '1.10', '1.30', '40.00'),
178 (43, 'female_heavy', '2850.00', '55.00', '21.00', '4800.00', '1.40', '1.70', '40.00'),
179 (44, 'pregnant', '350.00', '78.00', '35.00', '6400.00', '0.20', '0.30', '60.00'),
180 (45, 'lactating_below6', '600.00', '74.00', '25.00', '7600.00', '0.30', '0.40', '80.00'),
181 (46, 'lactating_above6', '520.00', '68.00', '21.00', '7600.00', '0.20', '0.30', '80.00');
182
183 --
184 -- Indexes for dumped tables
185 --
186
187 --
188 -- Indexes for table `food`
189 --
190 ALTER TABLE `food`
191 ADD PRIMARY KEY (`id`);
192
193 --
194 -- Indexes for table `rda`
195 --
196 ALTER TABLE `rda`
197 ADD PRIMARY KEY (`id`);
198
199 --
200 -- AUTO_INCREMENT for dumped tables
201 --
202
203 --
204 -- AUTO_INCREMENT for table `food`
205 --
206 ALTER TABLE `food`
207 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;
208 --
209 -- AUTO_INCREMENT for table `rda`
210 --
211 ALTER TABLE `rda`
212 MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;
213 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
214 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
215 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;