Database Design Challenge - please help

#1

Hi Experts,

How may I approach database design for this problem:

[Challenge]

What Can I Buy at the Supermarket?

Milo gets a lot done at the local Megamart grocery store. In particular, they carry a store brand cereal, Mega Munchy that Milo loves.

[Tasks]

  • paper towels & peanut butter (filed under groceries)
  • buy Mega Munchy (filed under Megamart)
  • buy ice cream (filed under frozen foods)
  • first class stamps (filed under stamps)

[Relationships]

And here’s how Milo uses his knowledge to help him organize his tasks:

  • I buy groceries at supermarket
  • The category groceries includes the subcategory frozen foods
  • I buy stamps at supermarket
  • I buy stamps at post office
  • Megamart is the name of a supermarket
  • There’s a Megamart located in Bellevue
  • The area Eastside includes the smaller area Bellevue

[Queries]

Milo distinguishes frozen foods as a subcategory of groceries because he picks those up last.

One morning Milo stops a supermarket outside his regular area, and searches on "supermarket" in What To Do:

[Answers]

  • supermarket
    • groceries
      • buy ice cream
      • paper towels & peanut butter
    • stamps
      • first class stamps

He decides not to stop. Later Milo is on the Eastside, and searches on that in What To Do:

  • Eastside
    • Bellevue
      • buy Mega Munchy
      • buy ice cream
      • paper towels & peanut butter
      • first class stamps

Milo drills down on successive headings to see full details:

  • Eastside
    • Bellevue
      • Megamart
        • buy Mega Munchy
        • supermarket
          • groceries
            • paper towels & peanut butter
            • frozen foods
              • buy ice cream
          • stamps
            • first class stamps
#2

Hi,

Please have a look on the post;

https://coda.io/d/Inventory_dRLpJVL5VE_/All-Equipment_su0Nd#Equipment_tu3oM/r188

Hopeful this will give you the inspiration, I suggest start building a “fake” scenario, share your questions in this community in case you can’t find the solution and you will be proud on the results and feeling well by what you have been learing.

:bulb:
Try to take little steps :footprints:

Coda is for makers,
//JP

2 Likes
#3

Much appreciated Jean Pierre. I did create a small scenario. A bit embarrassed showing it off.

Thanks for the pointers. I will take a look.

1 Like