Help thinking of database layout


So ive got an app that allows users to place an order from a table to the pub / restaurant their sat in. I have a drink, food, and snack category. However i’d like to break the food and drink one down into maybe another 3/4 sub categories.

Ive been trying to think of the best way to do this in the database and was wondering if anyone had any ideas. Maybe a new collection for each with relationships??


Hi @mightyels,

In my opinion, I would avoid creating extra DB collections unless they are absolutely necessary, i.e. you need to create records for something with very different characteristics.

In my opinion, data structure for food/drink/snack is pretty much the same: smth like Name, Article, Price, Ingredients, Picture(s), smth else. So why would one want separate collections for Pizzas and Burgers?

I would start with 2 initial collections: one for Menu Items, where all food/drinks will be stored, and another for Menu Categories for classification (a Menu Item can belong only to one Category).
With this it will be easy to organise lists on the screens with necessary filters, so that users can select what they want.
This could be extended with a subcategories (either separate collection or a “tree” with links in one collection), but IMHO for this industry it is not really needed: “flat” category list works pretty well up until 10-15 entries, which is pretty ok for a bar/pub/resto.

Please note, this is my personal opinion - there may be other ideas with different rationale.


I upvote Victor, I am currently developing the same app. I am using 2 collections as Victor refers. Adding more collections and filters will just bloat the UX, in my opinion, keep it simple.

1 Like

Thanks Victor I think you’re right. My only issue with that is being able to add drink options. So you might select Gin, but then you need to add Tonic and there can be multiple options for tonic each costing a different amount, or ice and no ice etc.

Ideal these would be in a modal but how would I do this with the structure you recommend?

1 Like

Hi @mightyels,

I see two options here:

  • have 2 categories, smth like “Spirits” and “Cocktails”. Put Gin to 1st one, and Gin-Tonic to another one;
  • make an additional “Menu Item Options” collection, one Menu Item can have zero or several Options. There you can put options for the drinks. However, this will make configuration of the order & pricing a bit more complicated. You will need not only to create Cart Item based on Menu Item, but will also need to add options.

I guess the first option is the easiest with a filter for if it contains gin then show the list. That way you could select spirits then gin, then mixers. It’ll be a messy way of doing it but the only way I can think really. Ideally I’d like to use a multi select drop down with different prices

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.