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.