How to organize this database collection?

Hi all, I’m not sure I’m understanding how to move forward. I’m trying to create a food app. I want my database to look something like this:


  • Apple
  • Banana
  • Tomatoes
  • Corn
  • Chicken
  • Beef

I want all foods to go into categories and add a picture for all:

  • Fruit: Apple, Banana
  • Vegetables: Tomatoes, Corn
  • Meat: Chicken, Beef

I also want the same items from the first list to go into another category:

  • Salad: Tomatoes, Corn
  • Soup: Tomatoes, Chicken

Is this possible? If it is, can someone explain to me where to put things where and how to link them, please?

Hi @marina_f_s,

This depends slightly on how you are using it in your app, but here’s how I would initially guide you.

Create a new collection for All Food, Fruit, Vegetables, and Meat. All Food contains Name field only. Fruit, Vegetables, and Meat collections contain Name and Image.

Then, create a collection called Meals which contain Name and a relationship field with All Foods. Use the last option for relationship.

This allows you to select multiple ingredients for each meal.

However, this may not be the best way to do this if you just want a list of ingredients instead of a selection option. Instead of a relationship field, it may be better to create another category named Ingredients and list the ingredients as a description to the meal.

Hope some of this was helpful :slight_smile: