Is it not recommended to use multi-table queries for mongodb non-relational databases?

question: is it not recommended to use multi-table queries for mongodb non-relational databases?


there is no absolute. The difficulty of Mongo is that there is no normal form constraint, the design of data model needs to be flexible and changeable according to the requirements, and beginners are easy to make mistakes on it. For example, if it is also the relationship between the author and the book, we can design different data models:

{
    isbn: '...',
    title: '...',
    author: {
        name: '',
        birthday: '1988-10-10'
    }
}

if the author's information changes frequently, I may choose the first design; otherwise, I may choose the second. Obviously, the second kind is efficient when querying, and inefficient when it comes to the modification of the author's information. So is the efficiency of reading more important to you or the efficiency of revision more important to you? This will determine which design you use. In the end, whether it is to look up the single table or the multi-table will be changed accordingly.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b330c8-2b3ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b330c8-2b3ad.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?