I have two different collections in my database, and at this point I need to link a document from first collection to a document form second collection with native NodeJs driver.
How can I do that? Should I hold the
_id from first collection in second collection?
Yes, I would suggest storing the
_id of the related document, manually, as you described. I’ve done that a lot, and it works well.
A more complex (and seemingly unnecessary in the case you describe), would be to use a DBRef.