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

Related Questions

I am developing some school grading software and decided to use Github to host
I have been learning C++ with some books from school that are from the
At school we have been programming in MIPS assembly language for some time. I'm
I'm working on a school project and I'm getting some weird errors from Xcode.
I am part of a high school robotics team, and there is some debate
Some web applications, like Google Docs, store data generated by the users. Data that
Some WPF controls (like the Button ) seem to happily consume all the available
Some API returns me XmlCursor pointing on root of XML Document. I need to
Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and

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.