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

  • SEARCH
  • Home
  • 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 61k
  • Answers 61k
  • 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 KeyValuePair<K,V> is a struct, not a class. It's like doing:… May 11, 2026 at 9:54 am
  • added an answer I do not believe that F# has a conversion from… May 11, 2026 at 9:54 am
  • added an answer I'll go with IDataAccessOperation/IDataAccessService. This clearly shows the responsibility of… May 11, 2026 at 9:54 am

Related Questions

For some school groupwork, I'm making a Generic Pizza Delivery Everything Management System, and
At school we have been programming in MIPS assembly language for some time. I'm
For some reason I never see this done. Is there a reason why not?
For some strange, bizarre reason, my images in my website just will not display
For some reason when I attempt to make a request to an Ajax.net web
For some reason when I create a new namespace in Visual Studio 2008 its
For some reason, when I try to install SQL Server 2008 Express , I
For some reason, lately the *.UDL files on many of my client systems are
For some of the customers that we develop software for, we are required to
For some reason, Section 1 works but Section 2 does not. When run in

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.