I have a set of enginetypes, which have a name and a set of references. Each reference is composed by its name and a set of calibrations. Each calibration is composed by 3 parameters, A, B and C.
I need to store this information in a MongoDB database. My first idea is to create three collections : enginetypes, references and calibrations.
The main goal is to show the data in a primeng-treetable in my angular project.
What's the best way to set my database, and how should I formulate the query to my database so that I directly get a set of TreeNodes in order to make it easy to bind my treetable to the date that comes from the database? Should I manually build my treenode structure in the frontend or is there a way to get it automatically from the mongodb?
Thanks