I'm using MLab to host a MongoDB database for a node.js project I'm working on. I want to use the uids automatically given to document to identify specific documents across collections. I was wondering if the default ids are unique only in the collection the document is in, or if they are unique throughout the entire database.
{
"_id": { // <<<< this is what I'm talking about
"$oid": "5c0754d8d0d1c81b400690a3"
},
"owned": [],
"equipped": [],
"prospects": [],
"username": "Urist",
"password": "dcddb75469b4b4875094e14561e573d8",
"date": {
"$date": "2018-12-05T04:32:24.690Z"
},
"trades": [],
"__v": 0
}