mongodb - How to design NoSQL database to represent inheritance? -


how design nosql database (mongodb) represent hierarchy ?

public abstract class customer {   guid id;   string name;   decimal balance; }  public class vipcustomer: customer {   string address;   string phonenumber;       }  public class nonvipcustomer: customer {   string visitingreason;   int queuenumber; } 

are using object data mapper mongoose manage schemas? if so, might try extension github handle inheritance:

https://github.com/briankircho/mongoose-schema-extend


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -