Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

101
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda