公司規模的不斷擴大令行政部的管理工作日益繁重,所以其迫切需要開發一個MIS(Management Information System)系統來使其行政管理規范化、制度化、所需各種數據標準化。在大型系統的開發過程中,使用Hibernate作為業務邏輯層和數據庫層之間的持久層,實現對象到關系數據庫的持久存儲,不但解決了對象模型與關系模型之間的“阻抗不匹配”問題,也提高了項目開發的效率。所以,某公司決定開發基于Hibernate技術的Equipment Management System。
Hibernate是目前最流行的開源對象關系映射框架,是面向對象的程序設計語言和關系數據庫之間的橋梁。它對JDBC作了輕量級的封裝,不僅提供ORM映射服務,還提供數據查詢和數據緩存功能。作為優秀的持久層框架實現,Hibernate提供了強大、高性能的對象到關系數據庫的持久化服務,其良好的持久層映射機制,使得操作完全面向對象。
本文研究了Hibernate技術,分析了Hibernate的對象關系映射框架實現機制及其工作原理。最后,結合實踐,介紹了基于Hibernate技術的Equipment Management System的開發。
關鍵詞:Hibernate,持久化,對象關系映射
Hibernate –Based
Equipment Management System Development
Abstract
With the company expanding the scale, the workload of Administration Department is increasing. So their urgent need is to develop a MIS (Management Information System), which makes the administration to be standardization and institutionalization. In the process of large systems development, it uses Hibernate between business logic layer and database layer as the persistence layer, implementing the persistent store from objects to relationship database. It solves the impedance mismatch difficulties between the object model and the relationship model, and improves the efficiency of the project development. Therefore, the company decides to develop Equipment Management System of Hibernate-based.
Hibernate is the most popular open source object-relational mapping framework, and also a bridge between the object-oriented programming language and the relational database. It makes JDBC a lightweight package. And, it not only provides ORM mapping services, but also provides data query and data cache function. As a good framework for achieving persistence layer, Hibernate provides a powerful, high-performance persistence service from objects to the relational database. Its good mechanism for persistence mapping makes operations object-oriented fully.
In this paper, some research has been done on the Hibernate technology, and also analysis object-relational mapping framework for the realizing mechanism of the Hibernate and its working principles. Finally, according to practices, it introduces the development of Equipment Management System, which is based on Hibernate technology.