Mongodb Database, Computer Room Database 4-Layer Nesting Design Problem

  mongodb, question

Mongodb Database Design, Computer Room Database Design Issues

Before, I only used relational databases and read some mongodb books, but I was still confused. For the multi-layer nesting of mongodb,
The following table is an excel table that needs to be made into a database. I directly used mongodb for multi-level nesting.
图片描述
According to this table, if you directly make mongodb’s nested format, you need 4 layers of nested json data as follows:
{

"_id" : ObjectId("5858f844d5155de57df5efb3"),
 "SITEID" : 1,
 "ZONE": "Shinan District",
 "SITENAME": "Wanxiang City Computer Room",
 "ZADDRESS": "no.10 shandong road",
 "CLASS" : "D",
 "LNG" : 120.339943,
 "LAT" : 36.089903,
 "SITE" : "",
 "COSTINFO" : [
 {
 "RENT":[
 {
 "RENTALAGREEMENTNO": "Agreement label",
 "RENTPRICE":"3:" 30,000 ",
 "CONTRACTPERIOD":"1 year",
 "EXPLANATION": "Not yet."
 }
 ],
 "POWERRATE":[
 {
 "supply": "Owner's Transfer of Supply",
 "ELECAGREEMENTNO":1234,
 "PRICEOFELEC":1,
 "METERLOCATION": "First floor power room",
 "ELECBILLPAYMENTCYCLE": "Annual Payment"
 }
 ]
 }
 ]

}
Please help to see if there are any errors in this database construction, and what are the problems in the later data maintenance and query statistics? Thank you very much.

It is suggested to consider the following aspects before further modifying the data model:

1. What are the main methods of inquiry in the future?

2. What are the main statistical methods in the future? Designing data models for major query/statistical methods.

3. What is the mode/frequency of data update?

4. What is the amount of data?

In addition to the basic data model, it is also necessary to consider the establishment of indexes.

For reference!

Love MongoDB! Have Fun!