for example, if there is a relationship between an article and a tag, an article (page) has multiple tags (tag), and a tag (tag) can be shared by multiple article (page)
< H2 > get the page list, hope to get the corresponding tag, then get the tag list, and then want to get the page corresponding to each tag < / H2 >. if you design as follows, if you get the page list and then get the tag information for each page, do you want to traverse the page array, then traverse the page tag array and query the corresponding tag information?
get the tag list, traverse the tag list, and then traverse the page array of each tag to get the corresponding page?.
this seems too cumbersome. = and when saving each page, not only save to the page table, but also update the corresponding tag table.
page:
_id: ""
tag: []
tag:
_id: ""
page: []