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

97
Views
Should I use 1 or 2 models in Mongoose for scalability and good practice reasons?

I'm using (MongoDb) mongoose to store data for a making a educational platform, and I have two models: teachers and students, both of them share most of the fields, so the question I have is, for scalability and good practice reasons. Should I use 1 or 2 models in Mongoose for scalability and good practice reasons?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I'm not a true expert in databases, but I think the models are really similar, and you're sure that you won't be adding new stuff to the models, you can just do it in one model, but it's much better in my opinion to have separate models for students and for teachers, because students don't have a lot of things in common with teachers, so if for example, you want to add a grade parameter to the students, well it also gets added to teachers which doesn't make any sense.

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