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

140
Views
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
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!