Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8230535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:10:17+00:00 2026-06-07T17:10:17+00:00

Looking at the Mongoose ODM docs , it doesn’t really say much about what

  • 0

Looking at the Mongoose ODM docs, it doesn’t really say much about what are ObjectId's and how they can be used. I think its something like foreign keys in MongoDB?

If so, Embedded Documents seem to achieve the same purpose, when do I use which?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T17:10:20+00:00Added an answer on June 7, 2026 at 5:10 pm

    It would be very worthwhile to read the MongoDB documentation or a quick MongoDB intro such as The Little MongoDB Book (it’s free) for some background on MongoDB concepts.

    To answer your question:

    • An ObjectID is a unique 12-byte identifier which can be generated by MongoDB as the primary key (_id) for a collection. There is a specification for the ObjectID.

    • A DBRef (database reference) is an ObjectID referencing an object in another collection. A DBRef does require require another query to fetch the related object, and is a convention supported by the client drivers rather than MongoDB server. The Mongoid equivalent is called referenced relations.

    • Embedded documents are nested arrays or subdocuments within a document. In Mongoid these are embedded relations.

    The approach to data modelling and schema design in MongoDB is very different from relational databases. There are (intentionally) no joins or foreign keys, but the document-oriented approach allows large amounts of related data to be stored and fetched in a single document. Depending on how you plan to query and update your data, embedding or linking may be a more suitable choice. The schema design page on the MongoDB wiki has some helpful tips to get you started.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for a C++ async HTTP library so I can download some zip files
looking for windows software who can draw a Use Case diagram like yuml.me anyone
Looking at all the examples of Operational Transformation Frameworks out there, they all seem
Looking for opinions on if OpenCV could be or has been used to detect
I am trying to learn how to use Node, Mongoose, and Mongo by looking
Looking through the Django docs and trying to figure out the use of the
I am using http://code.google.com/p/mongoose/ server inside my c++ application. I am looking a way
How much overhead does Mongoose add to the node-mongodb-native driver? If I just wanted
Looking to add RXTXcomm.jar (the javax.comm replacement) from http://rxtx.qbang.org/ I can add RXTXcomm.jar to
looking into the nodejs server stack with nodejs/express and mongoose What is considered a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.