[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Table Design

Posted on 2014-08-04
6
Medium Priority
?
317 Views
Last Modified: 2014-08-05
I am designing a food database. The purpose of the database is to maintain the data used to track the dates on which meals, snacks, etc. were made. A snack can be a left over meal plus a single ingredient. I only need help with some table names. I am not working on the field names yet. Please comment on the proposed tables.

Here are the tables:
Books
Ingredients
Meals
Recipes
Snacks
0
Comment
Question by:Mark01
6 Comments
 
LVL 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1000 total points
ID: 40239045
That's not really much to go on. From your writeup, the only real entities we know are Meals, Snacks, and Ingredients, and that a Snack could possibly consist of a Meal plus one or more Ingredients. From that, we could derive the following as a start:

Meal
Snack
Ingredient
Meal_Ingredient

Meal_Ingredient would be a Join table to associate all the Ingredients needed for a Meal, assuming (of course) that a Meal consists entirely of Ingredients.

Since a Snack could consist of a Meal plus one or more Ingredient:

Snack_Items

Snack_Items is probably a poor choice for this table name, and I'm sure you could come up with something better. The gist of this would be that a Snack would consist of several "items", and one of those could be a Meal - so do you link to a record from the Meal table, or do you simply list out the Ingredients for a Snack (which would, essentially, duplicate a Meal and add one or more Ingredients to it).

But again, I think you need to flesh out your overall idea a bit more before you can get to the point of table design.

Also, you mentioned Book and Recipe, but there's no information regarding how those fit into your design, so we cannot include them.
0
 
LVL 70

Accepted Solution

by:
Scott Pletcher earned 1000 total points
ID: 40239078
Technically you should be dealing with "entities" and not "tables" at this point, since you should be in the logical design phase rather than the physical design phase.  That is more than just semantics.  It's integral and fundamental to a proper design.

Single or plural names is up to you, but be consistent.  Either all singular or all plural, not a mix.

Also, be consistent on other naming when possible.  For example:

Meals
Meal_Ingredients
Recipes
Recipe_Ingredients
Snacks
Snack_Ingredients

but only if that is an accurate reflection of the actual data, of course.
0
 

Author Closing Comment

by:Mark01
ID: 40239118
Thank you, Scott McDaniel and ScottPletcher.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40239138
A snack can be a left over meal plus a single ingredient.
In general "food service" terms, this is to broad...

If a snack can be a "Meal" + an ingredient, ...then it is really a "meal".
(or are we talking about partial or leftover meals?)

How can you call a full meal (Meat, Veg, Starch) plus another ingredient (Ice cream, ...for example), ...a "Snack"?

As the two experts above ave stated, ....you really need to iron all of this out first.

A snack can be a left over meal plus a single ingredient.
...and what else can a snack be...?
You need to clearly define what a Meal, snack, ingredient is:
A Meal?
A meal + an ingredient?
an ingredient alone?
Up to two ingredients?
What about things like a bag of potato chip? (since this is not a meal, or an ingredient, ...is it still a "snack")

You need to clearly define what each entity is and if it can contain other entities...

So perhaps you could give us more detail please?

Thanks

JeffCoachman
0
 

Author Comment

by:Mark01
ID: 40240524
Jeff, I appreciate your comments. My statement about a snack being composed of a meal plus an ingredient was  incorrect. I meant that a snack can be composed of a quantity of a leftover recipe plus another ingredient. I am not explaining this well so here is an example. A snack can be 2 cups of fruit salad and 1 tablespoon of ice cream.

My goal of this question was to check to see if I was on the right track with the early formation of the entities. The question was answered in 20 minutes. I was surprised that I received excellent answers so quickly.
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 40241195
...ok great...
;-)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question