Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
Storing user information in multiple collections using same id

I have three collections. User, Address, and Workplace. To maintain my data easily, I have used the _id of User collection as the ids of Location and Workplace collections. For example, if I want to store a user's information, I will store it like this -

A document in User collection

{
  _id: ObjectId("605d6d93e1715f3650a8e8c2"),
  name: A
}

A document in Address collection

{
  _id: ObjectId("605d6d93e1715f3650a8e8c2"),
  address: District B
}

A document in Workplace collection

{
  _id: ObjectId("605d6d93e1715f3650a8e8c2"),
  workplace: District C
}

Is it a good idea to use the same id? If no, what problems I might face in the future? Any help would be appreciated. Thanks in advance.

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!