首页 > 解决方案 > 在 SQL Server 中保存 JSON 文件

问题描述

嵌套的 JSON 文件将 SQL Server 保存为一条记录。

如何在一张表中设计层次模型?

{
    "SSAAResponse": {
        "TheCTerRegRequest": {
            "ParentCompanyRegOrgE": "",
            "StartMonth": 1,
            "TheCTerRegRequestNoticesList": [
                {
                    "CreateDateTime": "1397/11/02-12:09",
                    "NoticeType": 6,
                    "RequestNoticeText": "Language Journal offers 6 or 7 essays or research studies per quarterly issue, a professional calendar of events and news, a listing of relevant articles in other journals, an annual survey of doctoral degrees in all areas concerning foreign and second languages, and reviews of scholarly books, textbooks, videotapes, and software."
                },
                {
                    "CreateDateTime": "1397/11/01-10:36",
                    "NoticeType": 10,
                    "RequestNoticeText": "c version of The Modern Language Journal is available at"
                },
                {
                    "CreateDateTime": "1397/10/29-09:18",
                    "NoticeType": 8,
                    "RequestNoticeText": "A board of directors for a company composed entirely of one gender or race
                                            Before Civil Rights laws, public schools in the South admitted only white studentsشاه"
                }
            ],
            "TheReceiveUnit": {
                "UnitName": "Strategies That",
                "State": 1,
                "Code": "16519"
            },
            "TheCTerRegRequestNamesList": [
                {
                    "Name": "Corp 1",
                    "status": 2,
                    "Seqnumber": 4
                },
                {
                    "Name": "Corp 2",
                    "status": 2,
                    "Seqnumber": 5
                },
                {
                    "Name": "Corp 3",
                    "status": 2,
                    "Seqnumber": 3
                },
                {
                    "Name": "Corp 4",
                    "status": 4,
                    "Seqnumber": 1
                },
                {
                    "Name": "Corp 5",
                    "status": 2,
                    "Seqnumber": 2
                }
            ],
            "TheCTerRegRequestNewspaperList": [
                {
                    "TheGNewspaper": {
                        "State": 2,
                        "Code": "0352",
                        "Title": "آواي کرمانشاه"
                    }
                }
            ],
            "ApplicantNationalCode": "3240953501",
            "SignBookMobileNumber4SMS": "",
            "TheCTerRegRequestStocksList": [],
            "FounderMember": "",
            "CapitalDescription": "",
            "TheCTerRegRequestDefectsList": [],
            "MinuteStartTime": "12:00",
            "DirectMemberMinuteDate": "1397/10/25",
            "MinuteDate": "1397/10/25",
            "ParentCompanyPublicNumber": "",
            "Declaration": "programs delivering customized professional development. A former master teacher, she has been in education for more than 25 years and works with administrators and teachers in groups of varying sizes from kindergarten through high school. She is the author of Complex Text Decoded: ",
            "EmaiLAddress": "",
            "OwnerShipType": 1,
            "CreateDateTime": "1397/10/26-11:33",
            "SignBookFamily": "مژگاني",
            "ParentCompanyRegOrg": "",
            "TheCTerRegRequestRejectReasonsList": [
                {
                    "RejectDesc": "Kathy Glass consults nationally with schools and districts, presents at conferences, and teaches seminars for university and county",
                    "RejectDateTime": "1397/11/02-11:58",
                    "TheCIMinutesRejectType": {
                        "State": 1,
                        "Code": "004",
                        "Title": "Kathy Glass consults nationally with schools and districts, presents at conferences, and teaches seminars for university and county"
                    }
                }
            ],
            "TotalCapital": 1000000,
            "SignBookLawyerState": 1,
            "ApplicantFirstName": "کسري",
            "AfterRegNationalCode": "",
            "InvitationLetterNumber": "",
            "TheCIInstitutionType": {},
            "DirectorMember": "",
            "TheCTerRegRequestPersonList": [
                {
                    "CapitalStatus": 2,
                    "FirstNameFA": "mostafa",
                    "LastNameFA": "sholeh",
                    "FatherNameLA": "",
                    "PhoneNumber": "083-37225212",
                    "RecordNo": "",
                    "FirstNameLA": "",
                    "MobileNumber4SMS": "09904040946",
                    "TheCTerRegRequestPersonStocksList": [
                        {
                            "AmountStocks": 500000,
                            "TheCISharesType": {
                                "State": 1,
                                "Code": "005",
                                "Title": "cash"
                            }
                        }
                    ],
                    "BirthDateSH": "1371/11/05",
                    "PersonType": 1,
                    "PostCode": "6713945936",
                    "Address": "3634 N Fm 2869, Winnsboro, TX, 75494  ",
                    "FatherNameFA": "amir",
                    "TheCICompanyType": {},
                    "NationalityCode": "3240953501",
                    "ExternalNationalStatus": 1,
                    "LastNameLA": "",
                    "IdentityNo": "3240953501",
                    "TheCTerRegRequestPersonPostsList": [
                        {
                            "EndDateValidity": "1398/10/25",
                            "Description": "",
                            "TheCIPostType": {
                                "State": 1,
                                "Code": "004",
                                "Title": "Director"
                            },
                            "StartDate": "1397/10/25",
                            "IsNonPartnership": 2,
                            "PeriodTime": 1,
                            "PostTitle": "",
                            "IsNonDirectMember": 2
                        },
                        {
                            "EndDateValidity": "1398/10/25",
                            "Description": "",
                            "TheCIPostType": {
                                "State": 1,
                                "Code": "001",
                                "Title": "Boss"
                            },
                            "StartDate": "1397/10/25",
                            "IsNonPartnership": 2,
                            "PeriodTime": 1,
                            "PostTitle": "",
                            "IsNonDirectMember": 2
                        }
                    ],
                    "Sex": 2
                },
                {
                    "CapitalStatus": 2,
                    "FirstNameFA": "mahdi",
                    "LastNameFA": "salefdkjf",
                    "FatherNameLA": "",
                    "PhoneNumber": "083-37225212",
                    "RecordNo": "",
                    "FirstNameLA": "",
                    "MobileNumber4SMS": "09189954983",
                    "TheCTerRegRequestPersonStocksList": [
                        {
                            "AmountStocks": 500000,
                            "TheCISharesType": {
                                "State": 1,
                                "Code": "005",
                                "Title": "cash"
                            }
                        }
                    ],
                    "BirthDateSH": "1370/11/23",
                    "PersonType": 1,
                    "PostCode": "6713945936",
                    "Address": "3634 N Fm 2869, Winnsboro, TX, 75494  ",
                    "FatherNameFA": "mohamad",
                    "TheCICompanyType": {},
                    "NationalityCode": "3240739070",
                    "ExternalNationalStatus": 1,
                    "LastNameLA": "",
                    "IdentityNo": "3240739070",
                    "TheCTerRegRequestPersonPostsList": [
                        {
                            "EndDateValidity": "1398/10/25",
                            "Description": "",
                            "TheCIPostType": {
                                "State": 1,
                                "Code": "045",
                                "Title": "ghaem magham"
                            },
                            "StartDate": "1397/10/25",
                            "IsNonPartnership": 2,
                            "PeriodTime": 1,
                            "PostTitle": "",
                            "IsNonDirectMember": 2
                        },
                        {
                            "EndDateValidity": "1398/10/25",
                            "Description": "",
                            "TheCIPostType": {
                                "State": 1,
                                "Code": "002",
                                "Title": "boss heyat"
                            },
                            "StartDate": "1397/10/25",
                            "IsNonPartnership": 2,
                            "PeriodTime": 1,
                            "PostTitle": "",
                            "IsNonDirectMember": 2
                        }
                    ],
                    "Sex": 2
                }
            ],
            "ApplicantLastNameEn": "",
            "ActivityTimeState": 2,
            "TheObjectState": {
                "StateType": 2,
                "Code": "001126",
                "Title": "تadmin"
            },
            "SignBookDate": "",
            "WebAddress": "",
            "FaxNumber": "",
            "AfterRegRegisterDate": "",
            "CashCapital": 1000000,
            "RequestNoticeText": "Interest in the relations between discourse and
                                    (social) context has been limited mostly to sociolinguistics (Ammon, 2005) and
                                    Critical Discourse Analysis (CDA)(Wodak, & Meyer, 2001). In these approaches,
                                    a more or less direct link is established between social structures (for instance
                                    conceptualized as social ‘variables’ such as gender, class or age in",
            "SignBookFamilyEn": "",
            "ParentCompanyRegisterDateM": "",
            "Turn": 1,
            "TheCTerRegRequestPledgedCapitalList": [],
            "SignatureAuthorityDesc": "mostafa sholeh",
            "ApplicantLastName": "sholeh",
            "LicenseState": 1,
            "ParentCompanyAddress": "",
            "AfterRegName": "",
            "ParentCompanyName": "",
            "TheCTerRegRequestActivitiesList": [
                {
                    "ActivityDesc": "Teaching this skill supports self-agency so students can define unfamiliar words independently"
                }
            ],
            "ParentCompanyRegisterDate": "",
            "ParentCountryStatuteE": "",
            "ApplicantNationalityType": 1,
            "PostCode": "6713945936",
            "ParentCompanyType": "",
            "ParentCompanyLetterDate": "",
            "ParentCompanyCurrency": "",
            "RequestReceipt": "A refereed publication, The Modern Language Journal is dedicated to promoting scholarly exchange among teachers and researchers of all modern foreign languages and English as a second language. This journal publishes documented essays, quantitative and qualitative research studies, response articles, and editorials that challenge paradigms of language learning and teaching. The Modern Language Journal offers 6 or 7 essays or research studies per quarterly issue, a professional calendar of events and news, a listing of relevant articles in other journals, an annual survey of doctoral degrees in all areas concerning foreign and second languages, and reviews of scholarly books, textbooks, videotapes, and software. JSTOR provides a digital archive of the print version of The Modern Language Journal. The electronic version of The Modern Language Journal is available at http://www.interscience.wiley.com. Authorized users may be able to access the full text articles at this site. The Modern Language Journal also offers a fifth issue each year which alternates between a Focus Issue and a Monograph.",
            "SignBookNationalityType": 1,
            "CompanyLetter": "Wiley is a global provider of content and content-enabled workflow solutions in areas of scientific, technical, medical, and scholarly research; professional development; and education. Our core businesses produce scientific, technical, medical, and scholarly journals, reference works, books, database services, and advertising; professional books, subscription products, certification and training services and online applications; and education content and services including integrated online teaching and learning resources for undergraduate and graduate students and lifelong learners. Founded in 1807, John Wiley & Sons, Inc. has been a valued source of information and understanding for more than 200 years, helping people around the world meet their needs and fulfill their aspirations. Wiley has published the works of more than 450 Nobel laureates in all categories: Literature, Economics, Physiology or Medicine, Physics, Chemistry, and Peace. Wiley has partnerships with many of the world’s leading societies and publishes over 1,500 peer-reviewed journals and 1,500+ new books annually in print and online, as well as databases, major reference works and laboratory protocols in STMS subjects. With a growing open access offering, Wiley is committed to the widest possible dissemination of and access to the content we publish and supports all sustainable models of access. Our online platform, Wiley Online Library (wileyonlinelibrary.com) is one of the world’s most extensive multidisciplinary collections of online resources, covering life, health, social and physical sciences, and humanities.",
            "PresenceDate": "",
            "ApplicantPost": 1,
            "SignBookNationalCode": "3240953501",
            "SignBookPost": 1,
            "SignBookLicenseDate": "",
            "MinuteText": "umented essays, quantitative and qualitative research studies, response articles, and editorials that challenge paradigms of language learning and teaching. The Modern Language Journal offers 6 or 7 essays or research studies per quarterly issue, a professional calendar of events and news, a listing of relevant articles in other journals, an annual survey of doctoral degrees in all areas concerning foreign and second languages, and reviews of scholarly books, textbooks, videotapes, and software. JSTOR provides a digital archive of the print version of The Modern Language Journal. The electronic version of The Modern Language Journal is available at http://www.interscience.wiley.com. Authorized users may b",
            "InvitationSessionTime": "",
            "DirectMemberMinuteStartTime": "12:00",
            "ParentCompanyLetterNumber": "",
            "Statute": "Because youngsters with reading disabilities typically have problems involving poor phonological skills, they generally benefit from instructional approaches that provide highly explicit, systematic teaching of phonemic awareness and phonics. However, if children are taught systematic phonics in one part of the reading program but are encouraged to use context to guess at words when reading passages, they may not apply their phonics skills consistently. Thus, the phonics component of the reading program may be seriously undermined. Also, children must be placed for reading instruction in books that are a good match to their word identification accuracy and phonics skills. If they are placed in reading materials that are too difficult for their current skill levels, they may be left with few options other than guessing at words.

            However, like normally-achieving readers, children with reading disabilities do benefit from encouragement to use context as an aid to comprehension. This kind of context use can occur when children are listening to text as well as when they are reading. For instance, in reading stories to children, teachers can encourage the use of sentence context or pictures to determine the meanings of unfamiliar words by modeling this process aloud: "Hmmm, what can I do if I am not sure what the word pale means? Well, the sentence says that D. W. put baby powder on her face to look pale, so I can think about what baby powder looks like…" Because youngsters with reading disabilities usually have listening comprehension that far outstrips their reading skills, oral comprehension activities often are the best ways to challenge and develop their comprehension abilities.",
            "TheCTerRegRequestLicenseList": [],
            "ApplicantBirthDate": "",
            "AddressDesc": "he use of context in comprehension refers to something quite different from the use of context in word identification. Returning to the previous sentence about D.W.",
            "FinancialCalenderType": 1,
            "ApplicantFirstNameEn": "",
            "DirectMemberMinuteText": "Black? Book? Box? (The guesses are often accompanied by more attention to the expression on the face of the teacher than to the print, as the child waits for this expression to change to indicate a correct guess.) Even when children are able to use context to arrive at the correct word, reliance on context to compensate for inaccurate or nonautomatic word reading creates a drain on comprehension. This kind of compensation becomes increasingly problematic as children are expected to read more challenging texts that have few or no pictures, sophisticated vocabulary, and grammatically complex sentences.",
            "ParentCompanyNameE": "",
            "NumOfDirectMember": 2,
            "SignBookLicenseNo": "",
            "FixPhoneNumber": "083-37225212",
            "TheCTerRegRequestAdvertisingList": [],
            "Authority": "",
            "TheCICompanyType": {
                "State": 1,
                "Code": "001",
                "Title": "Corp limited"
            },
            "SignBookBirthDate": "",
            "SignBookNameEn": "",
            "StartDay": 1,
            "ActivityEndDate": "",
            "SignBookName": "hamid",
            "AccessNo": "3694361110607356378",
            "ParentCountryStatute": "",
            "TheCTerRegRequestBranchList": [],
            "TheCTerRegRequestStatuteList": [
                {
                    "Description": "phonics skills to decode occasional unknown words rapidly.",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 2
                },
                {
                    "Description": "systems" to read words. Skilled readers do not need to rely on pictures or sentence context in word identification, because they can read most words automatically",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 3
                },
                {
                    "Description": "increasingly accurate and automatic word identification skills, ",
                    "Clause": 0,
                    "Note": 1,
                    "Article": 3
                },
                {
                    "Description": "Scientific evidence strongly demonstrates that the development of skilled reading involves",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 4
                },
                {
                    "Description": "When children encounter an unfamiliar word in reading, they may make use of context cues, that is, information from pictures or from sentences surrounding the unknown word.",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 5
                },
                {
                    "Description": "monitor their reading to see if it was accurate",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 6
                },
                {
                    "Description": "select the information that they need to focus on",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 7
                },
                {
                    "Description": "Unfortunately for many students, choosing effective strategies does not come automatically. Often, students who have difficulty reading simply browse or skim through texts without a specific strategy in mind because they don’t have a clear reason for reading. ",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 8
                },
                {
                    "Description": "For example, a situation that involves understanding and recalling details requires a different set of strategies from a situation where the reader is seeking specific information but memorization is not necessary.",
                    "Clause": 0,
                    "Note": 1,
                    "Article": 8
                },
                {
                    "Description": "Some students will do leisure reading because they are interested in a particular topic.",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 9
                },
                {
                    "Description": " In fact, students may read a variety of texts for enjoyment: newspapers or magazines",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 10
                },
                {
                    "Description": "Functional reading is what students will need to do all the time to get things done at school, at work and in their everyday lives. ",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 11
                },
                {
                    "Description": "It may seem that only functional reading is important,",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 12
                },
                {
                    "Description": "Students can learn to recognize contexts of reading and choose appropriate strategies through teacher-guided practice and reflection on the reading they do in various situations for various purposes.",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 13
                },
                {
                    "Description": "Unfortunately for many students, choosing effective strategies does not come automatically. ",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 14
                },
                {
                    "Description": "Teaching students about contexts of reading will help them be more confident and strategic in their reading",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 15
                },
                {
                    "Description": "Contexts of reading are all the elements that influence how we read in different situations. The context includes: 1) the setting, 2) the text, and 3) the purpose for reading. There are two main types of reading contexts. In leisure contexts we choose to read for our own interest, pleasure or entertainment..",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 16
                },
                {
                    "Description": "i am a teacher",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 17
                },
                {
                    "Description": "i am a student",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 18
                },
                {
                    "Description": "i am a student",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 19
                },
                {
                    "Description": "asds was a replace",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 20
                },
                {
                    "Description": "fghqwr hgfiqehk ewrjgfoqhg  krjg",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 21
                },
                {
                    "Description": "lkrdhgkhkhkfdg rtgerg wt,
                    "Clause": 0,
                    "Note": 0,
                    "Article": 22
                },
                {
                    "Description": "dgwejrfgjwegfk rgjwle  ertehrgho",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 23
                },
                {
                    "Description": "erewktlkrewhjgkw rkgjwgjkl",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 24
                },
                {
                    "Description": "safddf dkjhaskjfgjka eirhweyhi",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 25
                },
                {
                    "Description": "Test",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 26
                },
                {
                    "Description": "test",
                    "Clause": 0,
                    "Note": 0,
                    "Article": 1
                }
            ],
            "ApplicantMobileNumber4SMS": "09904040946",
            "FinalAcceptanceDate": "1397/10/27",
            "Name": "test Corp",
            "ParentCompanyAgentAuthority": "",
            "AuthorityE": "",
            "InvitationSessionDate": "",
            "TheCTerRegRequestClusterGroupList": []
        },
        "Result": {
            "Description": "send successful",
            "Successful": true,
            "Message": "423424",
            "No": "-1",
            "Code": "1000"
        }
    },
    "CBIResponse": {
        "respCode": 0,
        "accessNo": "3694361110607356378"
    }
}

我设计如下图:

桌子 下面的设计是真的吗?

USE [NFC]
GO

/****** Object:  Table [dbo].[tbl_NFCInquiryStructure]    Script Date: 2021-09-04 09:42:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[tbl_NFCInquiryStructure](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [NodeName] [nvarchar](500) NULL,
    [ParentId] [int] NULL,
    [IsValue] [bit] NULL
) ON [PRIMARY]
GO

它显示了我认为是正确的表格设计。包含父字段。

是真的?我想在一个表中实现这个分层文件。请帮帮我

标签: jsonsql-server

解决方案


推荐阅读