join - How to merge two collections in mongodb -
i have 2 collections called company_details , company_ranks...comp_id common in 2 collections. how merge these 2 collections complete details of company.
please me
thanks satyam
to make long story short, either on client-side or consider benefits of embedding documents.
mongodb not support joins, opposed relational databases. both pro , con. has helped mongodb's developers focus on scalability harder implement when have joins , transactions.
you can follow dbref specification. lots of drivers support dbref , composition seamlessly you. can manually. importantly, can take advantage of embedding documents.
embedding documents in mongodb unique ability on relational databases. meaning, can create 1 collection consisting of compound documents. you'll enjoy atomicity, there no "partial success", , data locality: spinning disks better in accessing data in sequence.
Comments
Post a Comment