Eat Well Database Structure.pdf Eat Well Database Structure.pdf
Size : 51.209 Kb
Type : pdf

Structure and Validation Rules

The database consists of a single table I have named "Eat Well Table" which is used to store information about the foods that are available in the challenge. This information could be used for ingredients at a later date. The table record structure consists of 8 Fields, labeled:

  • Food Item - Data Type: Text - 50 char
    This is a field where the name of the food item will be displayed and is a heavily required field
  • Group- Data Type: Text - 2 char
    This is the field where the food group will be displayed. I have added a validation rule on this field, limiting the data to 2 characters. This is because each food group has a 2 character code to correspond to the group, e.g. CG for Cereals and Grains 
  • Unit- Data Type: Text - 10 char
    This field is used to specify the unit that the food item/ingredient is measured in
  • Quantity- Data Type: Number - Integer
    This field is used to specify the quantity/amount the food item comes in - this is closely linked with the Unit field
  • Carbs (g) - Data Type: Number - Long Integer
    This field is used to specify the number of carbohydrates (measured in grams) that the food item contains, given the quantity and unit the item comes in
  • Fibre (g) - Data Type: Number - Integer
    This field is used to specify the amount of Fibre (measured in grams) that the food item contains, given the quantity and unit the item comes in
  • Fat (g) - Data Type: Number - Integer
    This field is used to specify the amount of Fat (measured in grams) that the food item contains, given the quantity and unit the item comes in
  • Calories - Data Type: Number - Integer
    This field is used to specify the number of calories in the specified food item

General Validation is applied to ensure data integrity (so that invalid data or incomplete data is not inputted into the database). Also, Validation limits field sizes and thus prevents the database from becoming too large. When used in conjunction with entry control  types such as drop list or radio buttons and a restrictive set of values, Validation can speed up data input.

 

Rejected Records

In my database table definition where we have specified Validation Rules, we have also specified a Validation Text message which will be displayed to the user upon input of an invalid range of values and the cursor will remain on the entry field column, thus forcing the user to enter correct data before the record can be saved.

In this project however, the data for our databases was provided us in a text file from the DiDA Project Brief website, and so there wasn't any rejected records fortunately.

3 New Database Records.pdf 3 New Database Records.pdf
Size : 40.259 Kb
Type : pdf

Three New Database Records

My database contains a wide variety of foods contained within various food groups, such as Meat, Pulses and Grains, Fish, etc. I added three new foods, which I felt would add a spark of uniqueness to the reasonably ordinary data list. The three foods I added were Caviar, Halibut, and Turtle. 

The foods are all very widespread throughout the world which means that students will be able to experience different culinary cultures from around the world. The Olympic spirit is all about bringing the entire world together in unity, and through sport and food, this challenge is aimed at doing just that.

Query Reviews.pdf Query Reviews.pdf
Size : 50.291 Kb
Type : pdf

Search Criteria for Reports

For this part of the project, a list of 3 food dishes have to be created. These foods were to be used in the challenge. To determine which types of foods were appropriate, I looked at the data from my questionnaire, which gave me information on which foods people liked and did not like. From these results, I was able to determine that the best food type to be used for a main course was 

To determine which ones to use, I collected data from my questionnaire, to work out which foods people liked and which ones people ate very little of. From these results I was able to determine that for a Main Course Meat was a very popular course (Though it was not the most popular overall, I chose it as it gave me a wider variety of foods then 'Fruit' did. 

For the least favourite foods, I chose Fish for the Main course, and for Dessert Cereal and Grains. Fro this point, I needed to narrow down my choice of foods for the Meal Cards later on in the project. 

To do this, I used my database and made three queries to find all of the meat, then all of the fish and then all of the CG. I had to chose a criteria for what I wanted to chose, and this is explained in the document to the left. 

This free website was made using Yola.

No HTML skills required. Build your website in minutes.

Go to www.yola.com and sign up today!

Make a free website with Yola