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

145
Vistas
Nodejs app with mongo database tables schema

I have a question that decide my big project. I want to do a big project API where people can login with Google, send the token and when logged in do some actions saved to Mongo DB.

The problem is the tables structure, or schema. So, I want to do a good app scalable.

I have some tables like Users (with users loggin information) and I want user save his tasks, memories, works and more for him self, and when logged in in another device, get this information and modify.

The question:

I need to do every table for every user or use same table filtered by user?

For example, I have now this model for product:

    nameOfProduct: {
        type: String,
        require: [ true, 'Required name' ],
        unique: true
    },
    state: {
        type: Boolean,
        default: true,
        required: true
    },
    userOwner: {
        type: Schema.Types.ObjectId,
        ref: 'Usuario',
        required: true
    },
    priece: {
        type: Number,
        default: 0
    },
    category: {
        type: Schema.Types.ObjectId,
        ref: 'Category',
        required: true
    },
    description: {
        type: String
    },
    disponibility: {
        type: Boolean,
        default: true
    },
    img: {
        type: String
    },
});

Is this correct or this is not scalabe and I need to do all tables for every user?

Thanks in advanced and sorry for my english, It's hard to write when I'm not english native language (help or correct me if necessary).

about 4 years ago · Juan Pablo Isaza
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