Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Pardon the brevity but: I am currently working on a project which requires users to create a 12 week diet/exercise regime. I basically need to store 3 meal options for each day which can be made up of multiple different food items. I would appreciate any advice or suggestions - thanks

share|improve this question
I'm not even sure what you're asking. What are your business needs? What do you want to do? What have you already considered? You need to give us more information, or we're going to have to close this as "Not a real question: too vague" – jcolebrand Oct 21 '11 at 15:50
Not quite a duplicate but elements of… might be useful for you. – Mark Storey-Smith Oct 21 '11 at 18:51
@jcolebrand - thats what 'pardon the brevity' was indicating! I be sure to include more details next time - thanks! – rebelbass Oct 24 '11 at 0:54

I will be brief as well:

You need a table for each of the following:

Users FoodItems Meals 12WeekPlan

The 12WeekPlan table would have a record for every meal of every day in the plan. The Meals table would have a record for every meal. The FoodItems table would have a record for every individual food item.

You need a table to join Meals to 12WeekPlan, as the 12WeekPlan has many meals in it (and they may repeat). (many to many relationship)

You also need a table to join Meals to FoodItems, as a meal consists of one or more food items. FoodItems can exist in more than one meal. (many to many relationship)

share|improve this answer

You can check this free data model for a Dieter Decision Support System. I guess you will need to expand it (add also exercise part), to fit your needs.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.