If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > database design help

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-21-10, 20:38
xion.truth xion.truth is offline
Registered User
 
Join Date: Jan 2010
Posts: 1
database design help

I am building a database that handles food and nutrition intake. The database i am designing is fairly difficult so i was hopping i could get some help from the community.


--------------------The database does the following----------------------
1. track food intake aka total 'sugar', 'protein', vitamin B12 for all users
2. track food nutrition based off of individual products aka eggs, toast, etc.. or track via a combination of foods that make a recipe aka

[nutrition info]------>[nutrition line]<------[foods]----->[food line]<----[recipe]

the measurements are done on a daily basis so users can see a running total for the current day or a history of previous days of nutrition elements they are consuming.

This would be relatively easy without the recipe field but now Im in a situation where recipe's have many food groups which have many nutrition values as opposed to just having the food groups.

an example of my diagram attached



Anyway with the fact that I have nutrition values applied to food applied to recipe's i dont know how to distinguish between individual foods and full recipe's which causes a problem because the user might have 1 egg for breakfast but have cake made with two eggs and other products at lunch.

Please help
Attached Thumbnails
database design help-dbview.png  
Reply With Quote
Reply

Tags
design, develope, structure

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On