Access Video Quiz X0.2
By Richard Rost
16 hours ago
Find Missing Pantry Ingredients With Query? What is the best table design when recipes and ingredients have a many-to-many relationship? Welcome to another Microsoft Access Video Quiz. You will be asked five Expert-level questions covering junction tables, calculated query expressions, unmatched records, table-level validation rules, and HAVING criteria for shopping lists. Answer each question, check your score, and see how well you know Microsoft Access. Recommended CoursesWant More?KeywordsAccess Video Quiz, many-to-many relationship, junction table, RecipeIngredientT, calculated query expressions, scaled recipe quantities, left join Is Null, unmatched records query, table-level validation rule, cross-field validation, HAVING criteria, shopping list totals query, pantry inventory comparison
More InformationTranscript Welcome to another video quiz, Thanksgiving edition, brought to you by Access Learning Zone.
I got five questions about Microsoft Access. You'll have three seconds to answer each question, so hit that pause button if you need more time.
Keep track of your score so we can see how you did at the end.
Are you ready to save Thanksgiving from the giant mutant turkey? Here we go.
Question one.
Thanksgiving recipes can use many ingredients, and an ingredient can appear in many recipes. What's the best table design?
Store all ingredient names in one long text field in RecipeT. Create RecipeIngredientT with RecipeID, IngredientID, and Quantity. Add Ingredient1 through Ingredient20 fields to RecipeT. Or copy every ingredient into a separate RecipeT record.
That's going to be B. Create RecipeIngredientT, a junction table with RecipeID, IngredientID, and Quantity.
Question two.
A stuffing recipe makes eight servings and uses three cups of broth. Which calculated query expression returns the broth needed for a guest count stored in PlannedServings?
Here are your four options.
The correct answer is C. Multiply the quantity by the planned servings and divide by the base servings.
Question three.
You want a query showing ingredients required by selected recipes that have no matching record in PantryT. Which approach is most appropriate?
Use an inner join and set PantryT.IngredientID criteria to Is Null. Use a left join from RecipeIngredientT to PantryT and test PantryT.IngredientID Is Null. Use a right join and test RecipeIngredientT.IngredientID Is Not Null. Or use a total query with Count(*) on RecipeIngredientT.
That's going to be B. Use a left join from RecipeIngredientT to PantryT and test PantryT.IngredientID Is Null. In other words, it's missing a record in PantryT.
Question four.
GuestT has both InviteDate and RSVPDate. You want to prevent an RSVP date earlier than the invitation date while still allowing a blank RSVP date. Where should this rule normally go?
In the validation rule property of RSVPDate only, in the table-level validation rule property, in the default value property of InviteDate, or in a relationship between GuestT and RSVPDate.
That would go in a table-level validation rule property.
Question five. This is a tough one.
A shopping list totals query combines RecipeIngredientT with PantryT. For each ingredient, it sums the required quantity and compares it with pantry quantity. If PantryT has at most one record per ingredient, which HAVING criteria correctly shows only ingredients that must be purchased?
There are your four options.
And remember, hit that pause button if you need more time.
And there's the correct answer. It is option D.
All right, how'd you do? Did you get all five right? Did you save Thanksgiving with a perfectly normalized feast plan? Or did you hear a gobble outside and hide under the table?
If you missed any of these topics, and a lot more are covered in my Microsoft Access Expert Series, you'll find more information on my website at the link shown.
Thanks for playing. Post your score in the comments and let us know whether your feast plan survived the gobble apocalypse.
And until next time, live long and prosper, and enjoy your turkey day. Intro What is the best table design when recipes and ingredients have a many-to-many relationship? Welcome to another Microsoft Access Video Quiz. You will be asked five Expert-level questions covering junction tables, calculated query expressions, unmatched records, table-level validation rules, and HAVING criteria for shopping lists. Answer each question, check your score, and see how well you know Microsoft Access.
|