Home > Net >  From a database to ask, is there any way to find out the data of the corresponding table structure r
From a database to ask, is there any way to find out the data of the corresponding table structure r

Time:01-14

To ask the great spirit, is there any way to find out the corresponding table in the database data structure relationship?
Such as table structure: school (id, name) grade (id, name, schoolid) class (id, name, gradeid) the teacher (id, name)
I use the SQL data can only be identified by a line left connection of the data, this data is too messy,
Now I want to found out such () after converting the json data is:
{
"Data" : [
{" id ": 1," name ":" xx school ", "grade" : [
{" id ": 1," name ":" grade a ", "class" : [
{" id ": 1," name ":" class ", "headteacher" : {" id ": 1," name ":" xiao Ming "}},
{" id ": 1," name ":" class 2 ", "headteacher" : {" id ": 2," name ":" little red "}}
]
}]}
]
}

School and grade, grade and class are a one-to-many relationship, class and the teacher is a one-to-one relationship,
So is there any way to solve it, now project framework not big change, but the project seems to have an EF, don't know how should operate,

CodePudding user response:

The detected data, their recursive
https://blog.csdn.net/hanjun0612/article/details/50563136

CodePudding user response:

Feeling involving multiple tables so that is not too good

CodePudding user response:

It's is a table himself found out after the restructuring, is to be

CodePudding user response:

EF in completes the mapping relationship between the Entity and the real-time load line,
  • Related