I saw a shopping item in github. all user orders created a schema1 to store all user orders. the user’s personal information created schema 2. besides the basic information, schema 2 also has a personal order: to store personal orders.
There is a doubt that since schema1 stores all user orders, it is also ok for users to check whether their orders are directly checked in schema1. if the data volume is large, an index is created in the personal userID of the order, so users should check their orders quickly. is it not necessary to build oredr:.
In addition, when querying according to the order number, mongodb generates a unique _id when creating data. Can you use this _id to do some processing as the order number?
- Maybe this project has so-called
problem left over by historyFirst
schema2.order. Another one
- He is also a technical boss who wants to try it out.
ArreySub-set paging query is good or bad.
- Space changes time. The database easily breaks TB.
The above is purely a lie. .
_idDirectly used for orders
idAlso can ah, itself
_idGeneration algorithm is a distributed id generation algorithm. Time stamp+machine code+process Id+ random number