Font Size: a A A

The Design And Analysis For The Data Mapping Tool Based On ORM

Posted on:2009-08-15Degree:MasterType:Thesis
Country:ChinaCandidate:F ZhaoFull Text:PDF
GTID:2178360272471699Subject:Computer technology
Abstract/Summary:PDF Full Text Request
The object-oriented design mechanism is different from the relational model, which has created both of them mismatch. Object-oriented design based on theories like coupling, polymerization, encapsulation and so on, data binding on object, and processing by method in object, The background of this issue is the establishment of such a mismatch on the basis.But the relational model based on mathematics principle stores data by the line, row and the table form. The different theoretical principle has caused the different good and bad points. The object model stresses in the use of object which contains the data and the behavior to constructs the application procedure; then the relational model mainly aims at data storage. When seeks one appropriate method for accessing data, this mismatch has become the principal contradiction. Use object model to access data frequently through relations among of the objects. But according to the relational theory, accessing data is through the table connection, the ranks duplication . This basic difference causes unions of two kind of mechanism not to be ideal. In other words, needs one kind of mapping mechanism to resolve this contradiction, thus obtains the successful design.The main topic of this work is to develops one kind of data mapping tool based on the ORM. The goal is to solves the above questions of using objects in the application procedures which take the database as the center. This tool may enable the application procedure to use one relational database to store and retrieve objects transparently. The solution is how to corresponding using metadata plan to describe the service object and the database . When running, this tool uses metadata to produce SQL, the run request and errichten object according to the result. This meant not only you do not need to your service object to carry on any hard code based on the SQL, does not need to establish the specifical perclass or to use produced code, but also not need to understand any SQL or the database knowledge. You only need the direct processing object, just like processing any ordinary Java object. This tool is composed by two function modules: Mapping Workbench and Data Access Object. Mapping Workbench provides graphics interface to construct metadata which object maps to the database. This tool enables you to map the Java class to the relational database table which stores its example, simultaneously a kind of attribute of the class will also map to the field of correlation table. How this tool does correspond to use produced metadata to describe the service object by Mapping Workbench with a specific database mode. The second function module data accessing level has sealed accessing to the database, which permits development person to concentrate the commercial domain question. Namely meant, sealing accessing database provides enough simple CRUD interfaces to enable increase, delete, change functions and so on inquiry of the database. Moreover, has also provided the seal to the database design, causes the exploiter not to need to understand the database the private realization. The DAO level hid the access mechanism thoroughly, has isolated the possible revision. The data accessing level need metadata provides the information of the mapping object. When the commercial rule like formerly changed, the DAO level code should not need to change. Moreover, when database changed, possibly installing the new database or DBA reorganizing data table, only needs to modify the metadata information. When you operate the service object, this tool can construct the SQL inquiry to update the database. This is an automated process, like this reduced dependence to the database, even more is convenient to the maintenance, simultaneously enables development person not familiar to the SQL sentence also to code query according to the service domain. This tool is responsible to produce SQL and return represents the result the object.The subject of this theory and practical significance is providing the automatic data mapping tool which easy to use , which is helpful to solve the questions of using objects in the application procedures which take the database as the center. This tool may enable the application procedure to use one relational database to store and retrieve objects transparently. This technology automatically map between the object-oriented technical construction system and the traditional relational database, which does not need to coding the SQL sentence and access permanently. Even the complex inquiry also can not need to coding the SQL sentence manually, reduces the development work.
Keywords/Search Tags:object-oriented, relational database, ORM, information modeling
PDF Full Text Request
Related items