Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 97001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:55:16+00:00 2026-05-10T23:55:16+00:00

For some school groupwork, I’m making a Generic Pizza Delivery Everything Management System, and

  • 0

For some school groupwork, I’m making a Generic Pizza Delivery Everything Management System, and got stumped on a problem during data modelling that I can’t figure out without using at least several layers of ugly.

The restaurant keeps stock of ingredients and beverages/snacks/etc. (I’ll refer to these as ‘drinks’). Drinks have a selling price. The app stores recipes for dishes – each dish has a collection of ingredients and the amount used, as well as its selling price. An order has a collection of recipes and drinks, but not ingredients – it doesn’t make sense to sell flour directly.

From that I have the need for both a ‘stockable’ generalisation between ingredients and drinks, and a ‘sellable’ (or ‘menu item’) generalisation between drinks and recipes; and I can’t really recall ERD modelling allowing for multiple generalisations.

(Currently I just went with the menu item one and decided to let the stockable stuff have separate entity hierarchies, and handle it in application code. And am considering dropping the separate hierarchies and not express the ingredient/drink difference in the data model at all, instead using an ‘is ingredient’ flag attribute.)

Is there something I’m missing that would let me model this without having to handle anything (or as little as possible) in application code?

For more fun if someone likes to do this kind of thing as a mental exercise / puzzle, dropped features involve:

  • drinks coming in categories with different tax rates – think soft drinks and liquor being taxed differently; dishes also have a tax rate, but don’t belong into a category
  • it makes sense to sell /some/ of the ingredients – the toppings (for people who want extra bacon but no olives); we’d also have to store how many units of the topping is in a single ‘extra’ serving.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T23:55:17+00:00Added an answer on May 10, 2026 at 11:55 pm

    Isn’t there a simple solution where you have a table of ingredients or stockable items, which includes drinks and other ingredients that might be listed in their own right. None of these can be ordered directly.

    You then have a table of menu items which are all a collection of ingredients / stockable items. A menu item collection may have only a single item – in the case of drinks this may always be the case, but could also include e.g. a slice of lemon.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 73k
  • Answers 73k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Portfiles must be organized in the following fashion: $LOCAL_PORT_DIR/{category}/{portname}/ All… May 11, 2026 at 1:51 pm
  • added an answer You might find some good ideas in this article, which… May 11, 2026 at 1:51 pm
  • added an answer If I understand what you are trying to do, you… May 11, 2026 at 1:51 pm

Related Questions

No related questions found

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.