【正文】
ON 作為數(shù)據(jù)交換格式,來整合異構(gòu)數(shù)據(jù)庫系統(tǒng)成為了一種可能。 基于 JSON 的 異構(gòu)數(shù)據(jù)庫 整合 研究 JSON Based Heterogeneous Database Integration Research 目錄 目 錄 摘 要 ...............................................................I Abstract ............................................................II 第 1 章 緒 論 ........................................................1 課題背景 .....................................................1 研究意義 .....................................................2 研究現(xiàn)狀 .....................................................2 所做工作及文章結(jié)構(gòu) ...........................................3 第 2 章 異構(gòu)數(shù)據(jù)庫整合 ...............................................5 數(shù)據(jù)庫 .......................................................5 數(shù)據(jù)庫簡介 .............................................5 本文所研究的數(shù)據(jù)庫 .....................................6 異構(gòu)數(shù)據(jù)庫 ...................................................6 異構(gòu)數(shù)據(jù)庫整合的背景和意義 ...................................7 異構(gòu)數(shù)據(jù)庫整合的目標 .........................................8 異構(gòu)數(shù)據(jù)庫整合的 基本方法 .....................................9 異構(gòu)數(shù)據(jù)庫整合基本方式 .................................9 異構(gòu)數(shù)據(jù)庫整合常用方式 ................................10 異構(gòu)數(shù)據(jù)庫數(shù)據(jù)整合重難點 ....................................12 本章小結(jié) ....................................................12 第 3 章 JSON 與 POJO 之間的映射研究 ...................................13 JSON 的解碼 .................................................13 JSON 與 XML 的比較 ...........................................16 JSON 與 POJO 的相互轉(zhuǎn)化 ......................................17 POJO 的序列化與反序列化 ................................18 將 POJO 轉(zhuǎn)化為 JSON .....................................20 將 JSON 轉(zhuǎn)化為 POJO .....................................21 將 JSON 融入 ORM .............................................21 目錄 本章小結(jié) ....................................................22 第 4 章 異構(gòu)數(shù)據(jù)庫與 JSON 的映射研究 .................................23 JSON 與異構(gòu)數(shù)據(jù)庫整合系統(tǒng)設(shè)計 ...............................23 JSON 與異構(gòu)數(shù)據(jù)庫的映射技術(shù) .................................24 基于模板的映射方法 ....................................24 基于數(shù)據(jù)庫模型的 JSON 映射方法 .........................25 將關(guān)系數(shù)據(jù)庫的數(shù)據(jù)轉(zhuǎn)化為 JSON ...............................26 將 JSON 轉(zhuǎn)化為關(guān)系數(shù)據(jù)庫的數(shù)據(jù) ...............................27 單表映射 ..............................................27 多表一對多映射 ........................................28 多表多對多映射 ........................................28 映射算法總結(jié) ...........................................29 本章小結(jié) ....................................................29 第 5 章 基于 JSON 的數(shù)據(jù)庫映射中間件的開發(fā)、測試及評價 ...............31 開發(fā)平臺簡介 ................................................31 中間件分析 ..................................................31 中間件設(shè)計 ..................................................33 選取工程 ..............................................33 選擇框架 ..............................................33 框架整合使用 ..........................................33 編碼實現(xiàn)中間件 ..............................................33 引入 Spring 和 Hibernate ................................34 將數(shù)據(jù)庫的表映射為 POJO 類 .............................34 定義中間件訪問接口 ....................................34 單元測試 ..............................................35 測試環(huán)境搭建 ................................................35 系統(tǒng)環(huán)境 ..............................................35 使用 Badboy 錄制腳本 ...................................35 目錄 使用 JMeter 測試 .......................................36 數(shù)據(jù)庫映射中間件性能評價 ....................................37 JMeter 圖形報表 ........................................38 JMeter 表格報表 ........................................38 中間件性能分析 ........................................39 數(shù)據(jù)庫映射中間件功能評價 ....................................39 本章小結(jié) ....................................................40 第 6 章 總結(jié)與展望 ..................................................41 總結(jié) ........................................................41 展望 ........................................................41 參 考 文 獻 .........................................................42 摘要 I 摘 要 從數(shù)據(jù)庫誕生到現(xiàn)在,經(jīng)過長期的積累,互聯(lián)網(wǎng)里有著相當數(shù)量的異構(gòu)數(shù)據(jù)庫系統(tǒng)。 在此構(gòu)思的基礎(chǔ)上, 本文在現(xiàn)有的基于 XML 的異構(gòu)數(shù)據(jù)庫 系統(tǒng) 整合方法的基礎(chǔ)上提出了基于 JSON 的異構(gòu)數(shù)據(jù)庫系統(tǒng)整合方法 ,該方法 可以大幅度的降低 異構(gòu)數(shù)據(jù)系統(tǒng)的開發(fā)、維護 和 升級成本,避免異構(gòu)數(shù)據(jù)庫系統(tǒng)帶來的各種弊端 ,提高了程序開發(fā)的效率 。 關(guān)鍵詞: JOSN; 異構(gòu)數(shù)據(jù)庫 ; POJO; Java; ORMAbstract II Abstract Born from the database to the present, longterm accumulation of the Inter with a considerable number of heterogeneous database systems. Due to the needs of theconstruction of modern information technology, many systems need to accessheterogeneous database systems. For developers, databasecentric system, becauseof the presence of heterogeneous databases, their development, maintenance andupgrade costs higher than the conventional single database system. Since JSON is a universal data exchange format that is independent of any puter language and platformindependent, using JSON as a data exchange format, to integrate heterogeneous database system has bee a possibility. On the basis ofthis idea, proposed in the existing heterogeneous database system XMLbasedintegration method based on JSONbased heterogeneous database systems integration, the approach can significantly reduce the development of heterogeneous data systems maintenance and upgrade costs and avoid all the disadvantages ofheterogeneous database systems, improve the efficiency of program development. This paper studies the JSON and heterogeneous database data mapping algorithmspecific to include the following: 1) the JSON as the data integration of heterogeneous database systems to exchangethe feasibility of the format。 heterogeneous databases。在互聯(lián)網(wǎng)普及之后,數(shù)據(jù)庫應(yīng)用以井噴式的速度增長。我們?nèi)粘I畹姆椒矫婷娑家呀?jīng)離不開數(shù)據(jù)庫了。若多個數(shù)據(jù)庫系統(tǒng)之間一直以異構(gòu)數(shù)據(jù)庫系統(tǒng)的的形式存在,這對現(xiàn)代