1

I have been tasked with designing a cloud platform that allows a user to manage the menus of a chain of restaurants from one place. The menus are basically massive TVs at the ordering counter. These currently run MySQL and are updated manually.

What is the design pattern to store all of these store's menus in one database? For example, the name of the product, price and category(drink, burger etc.) is not going to be unique at each store.

The best solution I've come up with so far, is to add in a restaurant table and use the restaurantID as the foreign key in the products table and only sync the relevant products. However, this makes things difficult on the restaurant side because the product IDs will have big gaps in them.

Is there another way to do this? Or is this the general design idea for this sort of application?

  • 2
    Why do you care if the product keys have gaps? Surely no one ever sees them? – Max Vernon Oct 15 '15 at 1:39
  • I just like IDs to be sequential. You can tell if something is missing much quicker. But that's about it. If it's fine to have an ID that 37 then 13048 then that's what I'm going to do. – Darren Oct 15 '15 at 4:26
  • 1
    If your IDs are sequential, what will happen when a restaurant has a different daily special? Or changes the whole menu? Abandon "sequential". – Rick James Oct 21 '15 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.