Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Many-to-many relationship?

$
0
0
Hi there,

I'm building a database intended for menu planning for a backpacking trip. Currently, I have three tables:
  • A list of the days for which menus must be planned
  • A list of the meals planned for these days
  • A list of all the food items, their weights and calorific content
There are many-to-one relationships between the food items and meals tables, and between the meals and days tables. So I can put in meal types and calorie targets without redundancy.
However, at the moment I can't have a food item appearing in more than one meal, or quantities of more than one of a food item per meal. This means if I want to include the same thing multiple times (eg cereal bars) I have to type everything in again.
Is the solution to this a many-to-many relationship (a food item can be in multiple menus and a menu can contain multiple food items)? If so, what would the junction table be?

Secondly, is there a way round the fact Access can only use the current table for calculated fields? (I'd like to be able to sum the calories and weights of individual food items to give figures for each meal)

Thanks in advance for your help :)

Attached Images
File Type: png Relationships.PNG (13.7 KB)

Viewing all articles
Browse latest Browse all 13329

Trending Articles