1

I am newbie in Mongodb.

Currently I am working on a project using MEAN stack. I am using schema less orientation for storing data i.e mongodb as client and not mongoose.

After my research from internet I found that schema less database performs(speed) well when compared to schema based nosql database and hence decided for schema less approach.

Scenario I am facing:

I have few entities that share common properties. Say for Entity A has name,location,phone no and Entity B has additional properties in common with those properties from that of A.

Suppose considering my application will scale upto 1 billion users

Question for the above scenario discussed

1) Is it better to store as different collection for different types 
   or prefer inheritance type of approach for storing those entities.
   If inheritance type is preferred how it is done in mongodb.

Few other general questions(considering large scalability)

1) Is my schema less approach right choice 
2) Is it better to use ODM tool or directly write code in my dao 
   layer to access the database without using object approach

Many may feel that this is totally out of scope from mongodb, I am asking this question basically from design and performance perspective.

So need advice from experts who has really worked on large scale application development using mongodb.

Chandan
  • 394
  • 6
  • 16
  • I don't think there is a right answer to some of your questions. This might be helpful: [Why do we need, what advantages to use mongoose](https://stackoverflow.com/a/18531821/1022914). Mongoose also offers [discriminators](http://mongoosejs.com/docs/discriminators.html) for schema inheritance. – Mikey Jul 01 '17 at 19:10
  • @Mikey. Thanks for the response. Will go through the link you have mentioned – Chandan Jul 02 '17 at 07:55

0 Answers0