The elements of the collection should basically be three levels of nesting
{"province":{"pname":p1,"city":[{"cname":c11,"area":[{"aname":a11}]}]}}
{"province":{"pname":p2,"city":[{"cname":c21,"area":[{"aname":a21}]}]}}
{"province":{"pname":p3,"city":[{"cname":c31,"area":[{"aname":a31}]}]}}
When used, retrieve the name of the province based on province, then iterate over the city (array) embedded in the province document to obtain the name, and iterate over the area (area) embedded in each city document to obtain the names of all districts
The elements of the collection should basically be three levels of nesting
{"province":{"pname":p1,"city":[{"cname":c11,"area":[{"aname":a11}]}]}}
{"province":{"pname":p2,"city":[{"cname":c21,"area":[{"aname":a21}]}]}}
{"province":{"pname":p3,"city":[{"cname":c31,"area":[{"aname":a31}]}]}}
When used, retrieve the name of the province based on province, then iterate over the city (array) embedded in the province document to obtain the name, and iterate over the area (area) embedded in each city document to obtain the names of all districts
Array Collection
How to implement it under sql database? (The physical design part of the database is not code) Please give me some advice