Efficiency when querying the database: list vs thing

I have a scenario where a User can place many Orders of different (or same) Items.

The initial way to approach this was to create three types: User, Item, Order.

Every time a user would place an order, the app creates a new Order, which contains both the item and the user that placed the order.

This approach is the standard RDB normal form. When the user has already ordered that Item for the specific date, the app won’t allow the user to add the item again. This ofcourse requires the app to query the Orders table, which is quite large. This results in significant delays.

I was thinking that in the bubble database, it could make sense to add each order in a list field, directly on the User row. Do you think this could improve performance? What problems do you think I would run into?


I would set it up like this
User has a list of orders
Order has a list of items
Then when a user tries to add an item to an order, you would only add it if it wasn’t already in the list of items for that order

1 Like

That sounds like a small variation to what I described (which wouldn’t work in my scenario but only because I didn’t share all of the related details).
My question is not how you’d set it up but why. Which method is less process intensive and what kind of problems would I run into the future?