我需要帮助来模拟MongoDB中的数据库。MongoDB中的架构设计
下面的模型显示了性能问题。
- Collection users
- email
- hash
- store
- name
- adress
- logo
- products
- name
- value
- description
- image
- featured
- categories
- id_category
- Collection category
- id
- name
在系统中,用户可以有一个店铺,店铺有很多产品,产品有很多种类。
问题是当我想在主页上放置一个产品时,系统会搜索所有用户,这是不好的。
我想过把产品放在另一个集合中,但这会想到“关系”模式,而MongoDB不是。