Paper Menu >>
Journal Menu >>
![]() J. Software Engineering & Applications, 2009, 2: 200-205 doi:10.4236/jsea.2009.23027 Published Online October 2009 (http://www.SciRP.org/journal/jsea) Copyright © 2009 SciRes JSEA Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML Shixi TANG YanCheng Teachers University College of Science & Te chn ology, Yancheng, China. Email: tsxlyh@163.com Received May 11th, 2009; revised July 1st, 2009; accepted July 15th, 2009. ABSTRACT The problem of sharing heterogeneous database for accessing different educational resources has to be con sidered . The study is carried ou t to realize the heterogeneou s database sharing for ed ucational resources using multi-media educa- tional resources as the researching object. XML is applied as middleware for the practical requirements of education. The study has important practical significance for the intellectualization of educational and teaching resource platform. Keywords: Heterogeneo us Da t abase, XML, Educatio n Resource 1. Introduction Nowadays, material resource, energy resource and in- formation resource are three pillar resources during the development of technology and economics. Educational information resource, as an important part of information resource, plays an important role in improving the teach- ing quality and mining the potential of education. There- fore, many countries have set up national educational resources centers, such as the National Educational Re- sources Information Center of United States, the National Network for Basic Education Resource held by Basic Education Curriculum Development Center of Ministry of Education and Central Audio-Visual Education Center of China. The construction of educational resources base with corporations such as Resource of China School, K12, Clever, ZhongJiaoYuxing, Cisco Tong Fang, Tuteng, Tinghua Tangfang, becomes more and more mature. Education resource has already become an im- portant part of network resource. It plays important role in solving the problems such as information selection, information identification, information digestion, and information individuation when users get amount of in- formation through education resource base. It turns out to be the most potential resource for g lobal information transferring and sharing with the rapid de- velopment of WWW. The requirements and development of new fields, such as e-commerce, e-books and distance education have made Web data more complex and di- verse. Therefore, it is difficult to store and manage all the different Web data by traditional database technology. XML is becoming the data description and exchange standard on Internet. Meanwhile, XML and a series of related standards have been widely accepted and used, including the generation, storage, analysis of XML documents, which lay the foundation for XML as data- base, as well as offer the possibility to realize th e sharing of data in heterogeneous databases. The automatic trans- forming XML into different relational databases effec- tively has different ways. Oracle XML SQL Utility mod- els XML documents element as a group of nesting tables, through the elemen t that oracle object data type modeled; IBM DB2 XML Extender saves the XML documents as BLOB type object, decomposes them to a group of tables, and defines the XML collection by the XML1.0 grammar. Microsoft solves the problem through expanding SQL-92 and involving the OPENXML line collection; Sybase Adaptive Server takes ResultSetXml Java class as the foundation of processing XML documents in two direc- tions [1-3]. However, all manufacturers have a general character that the XML durability establishes in a special founda- tion, and there is no general facility to save all the XML documents. If the XML documents use a new grammar, it needs a special mapping. This is very disadvantageous for the visiting and sharing the different heterogeneous education resource. Firstly, education resource’s descrip- tion is very complex, each education resource’s compre- hensive description reaches more than 160 terms based on international standard, which has the internationaliza- tion request, and needs a standardized description frame. Secondly, the existing edu cation resource’s description is not normal, on the one hand we need to preserve its original description; on the other hand, we need a stan- ![]() Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML201 dardized description mapping. Thirdly, when users use an education resource, its description must personalize to meet the users’ especial requirements by cutting out and transforming its description. Fourthly, education re- source’s description attribute value is dissimilar from different understanding aspects based on education re- source belonging to different disciplines. Fifthly, the education resource has very wide manifestation, includ- ing text, image, sound, video, animation and so on. Its respective description must reflect both the general char- acter and the difference. Only using existing tools given by manufacturers can not solve these problems. This ar- ticle takes the XML documents as the middle data ex- changing model to study the sharing problem of educa- tion resource heterogeneous database by taking the mul- timedia education resource as the study object, embarked from the actual requirements of education teaching. 2. Sharing Technology Selecting for Heterogeneous Database of Education Resource Heterogeneous database systems [4] are collections of many related database systems which could achieve sharing and transparent accessing the data. Each database system with its own DBMS has already existed before adding in the heterogeneous database system. All com- ponents of the heterogeneous database have their own autonomy; each database system still remains its own application characteristics, the in tegrity control and secu - rity control when sharing the data. After carrying out data conversion, on the one hand, all the information to be shared is converted from source database to the desti- nation database; on the other hand, such a conversion can not contain related redundant information. We use the interoperability technology and data integrity technology of heterogeneous database to achieve the tasks of data sharing in heterogeneous database. Heterogeneous data- bases interoperability is a pr erequisite for data integration. The core is data accessing, so as to provide underlying technology for achieving data integration [5–6]. The methods used to achieve the exchanging of data among databases are various. Development tools with data transfer tool, such as data pipeline in the Power- Builder, can be used, but it relies on the database struc- ture, and its flexibility is poor. E-mail system can not meet the data exchange requirement between heteroge- neous database systems, but you must connect two data- bases before data transmission, which in turn lower its flexibility. We solve the referred problems by using XML as a middleware of heterogeneous databases sys- tem. First of all, as a middleware, XML makes heteroge- neous database system independent, and incompatibility of heterogeneous database systems is solved. If only front desk application can support XML, it can transfer the exchange of information among heterogeneous data- base systems to mapping relationship between XML. Secondly, XML documents are easy to read and modify. XML documents could be opened and modified by an ordinary WordPad, and the structure is relatively simple which is easy to read, modify and convert. All these in- crease the flexibility of information exchanging hetero- geneous database system and the scalability of XML. Thirdly, XML document format is simple, which reduces the complexity in the pro cess of programming procedur e, lowers the workload of programmers, and XML docu- ments’ code is easy as well. In view of this, we choose XML as a middleware to achieve data exchange among heterogeneous database systems [7–9]. In this research, education resource in the database in- cludes image, text, video, music, flash and so on. Data- base’s heterogeneities are mainly the DBMS heteroge- neities including Oracle database, IBM DB2, Sybase database, Microsoft SQLserver2000 and MySQL. These already operated database systems display differently in many aspects, including data type definition, data access mode, data manifestation and so on. Therefore different database management systems cannot be connected di- rectly to exchang e the information. Oracle database, IBM DB2, Sybase database, Microsoft SQLserver2000 and MySQL have provided powerful support to XML. We transform the communication between various business databases into the data transformation between various business databases and the XML, and take image, video, text, music and flash deposited in various business data- bases into XML documents and import all the data into the dynamic standard database. Therefore, we adopt the following technical option. We preserve the normal primitive tree data by using various manufacturers map- ping rule. The data processing frame is established. The database clusters are controlled by code distributing in the pure application procedure, business process, the da- tabase level and the app lication log ic between th e storage process, and the data processing frame guiding layer is formed by taking the education resource international standard as the foundation. The dynamic unification education resource database is established based on edu- cation resource’s multiplicity and the education resource description’s multiple perspectives of different discipline. User’s personalized request is obtained by cutting out unification education resource database with data proc- essing frame. 3. Education Resource Database System Heterogeneous structure The design of the system structure is divided into three points: the presentation layer, the database layer and the logic layer, as shown in Figure 1. Copyright © 2009 SciRes JSEA ![]() Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML Copyright © 2009 SciRes JSEA 202 Figure 1. The design of system structure imaID Type Major Object Source Author TTimeKey Word FormatsLenght resolution SweepColor 01001 animal Bio-engine ering Graduate Students Southeast University Na Tang2007/05yeast, bacteria gif 36 640*480 72 002244 01002 figures history Undergraduate Students Nanjing University Wei ZHAO2004/06background, achievements jpeg80 1024*768 300 FF0022 01003 equipment sports Undergraduate Students Suzhou University Liang-Qian Li 2002/06 function, using methodsjpeg45 320*240 72 000044 01004 board computer Graduate Students Yancheng Teachers University Xia Wang2007/06CPU, graphics, memory jpeg68 1024*768 350 110033 01005 monitor computer Undergraduate Students Wuhan University Xiaoli Wang 2001/06 LCD, brightness jpeg55 1024*768 300 2244CC 01006 natural geography Graduate Students Southeast University Yao Wu2000/06Earthquake, plate movementgif 38 640*480 72 320C14 01007 plant medicine Graduate Students Southeast University Hang SUN2005/02panda, artificial rearing gif 74 1280*1024 300 05232B 01008 animal computer Undergraduate Students Peking University Xia Li 2005/06lily, photosynthesis jpeg38 750*453 72 204A15 Figure 2. Education resource data The presentation is the browser . User s view the r esults and the displaying form through brow ser. The database layer is composed by Oracle database, IBM DB2, Sybase database, Microsoft SQLserver2000, MySQL, dynamic standard database and the XML documents. We attribute XML document to this layer although XML itself is not a database, since it can be seen as a complete database system with some other tools. Logic layer consists of two modules: data export/im- port module and the education resource data frame mod- ule. Data export module’s function is to export various business databases da ta and produce co rrespond ing XML documents. Data import module’s function is to analyze XML documents and import the data to various business databases. The education resource data frame modular controls all database clusters, and it is responsible to es- tablish the dynamic unification education resource data- base. 4. Implement of Heterogeneous Database of Education Resource Oracle XSU draws the XML documents to DOM, and decomposes the XML documents into a group of sub-documents by using XSLT. IBM DB2 XML Ex- tender establishes the mapping through DAD between the database table and the XML documents’ structure, storing by DB2 CLOB data type. Microsoft SQLserver OPENXML uses sp_xml_preparedocument as storing process, gaining a XML documents handle through translating XML documents into the internal DOM ex- pression. Sybase uses XML documents type ResultSet to describe a XML documents metadata and the actual line data. The selected data is shown in Figure 2. Document Object Model is a set of standards set by W3C, which provides an interface parsing the document. Various program languages achieve these interfaces in accordance with the DOM standards, and the parser is Logic Layer Database Layer Presentation Layer Oracle database IBM DB2 Sybase database Microsoft database Dynamic standard database Data export/import m oduleFrame m odule Internet Explorer XML DOC ![]() Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML 203 <?xml version=" 1. 0" encoding="UTF -8" standalone="no"?> -<image> -<imageinformation> <imaID.> 01001</imaID> <Type> animal</Type> <Major> Bio-engineering</Major> <Object> Graduate Students</Object> <Source> Southeast University</Source> <Author> Na Tang</Author> <TTime>2007/05</TTime> <Ke y Word>yeast,bacteria</Key Word> <Formats> gif</Formats> <Lenght> 36</Lenght> <Resolution>640*480</Resolution> <Sweep> 72</Sweep> <Color> 002244</Color> <Address>..\\DataSharing\src\image\1.gif</ Address > </imageinformation> -<image> -<imageinformation> <imaID.> 01002</imaID> <Type> figures</Type> <Major> history</Major> <Object> Undergraduate Stud ents </Object> <Source> Nanjing University</Source> <Author>Wei Zhao</Author> <TTime> 2004/06</TTime> <Ke y Word> background, a ch i evements</Key Word> <Formats> jpeg</Formats> <Lenght> 80</Lenght> <Resolution> 1024*768</Resolution> <Sweep> 300</Sweep> <Color> FF0022</Color> <Address> ..\\DataSharing\src\image\2.gpeg</ Address > </imageinformation> Figure 3. Education resource spanning tree given to parse the documents. The parser establishes a tree in memory through reading XML documents. The tags of XML document, tagged text content and entities correspond to a certain node of the tree in the memory. It’s easy to deal with XML documents, to read, traverse, modify, add and delete the documents through operating the node of tree in memory. We use DOM parser to do XML programming for an application, which can easily handle XML documents by operating the node of tree in memory to obtain the data needed. DocumentBuilderFactory class is responsible for cre- ating the instance. DocumentBuilderFactory class calls its newInstance () method to instantiate a Document- BuilderFactory object. Factory object calls newDocu- mentBuilder () method to return a DocumentBuilder ob- ject. And finally the bu ilder object calls newDocument () method to achieve instantiating Document interface. DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder build er = factory.newDocumentBuilder(); Document doc = builder.newDocument(); doc.setXmlVersion("1.0"); Element root = doc.createElement("image"); doc.appendChild(root); The CreateXML.xml documents are produced as fol- lows: File file = new File("F:/temp/MatPrj/WebRoot/CreatXml.xml"); if( !file.exists()||!file.isFile()){ new FileOutput- Stream("F:/temp/MatPrj/WebRoot/CreatXml.xml"); file = new File("F:/temp/MatPrj/WebRoot/CreatXml.xml"); } StreamResult streamResult = new StreamResult(file); Source inputSource = new DOMSource(doc); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); trans- former.transform(inputSource, streamResult); The XML documents are produced, and the data is imported to XML documents, its education resource spanning tree is shown in Figure 3. The data processing frame is established to control the database clusters, and the dynamic uniform education Copyright © 2009 SciRes JSEA ![]() Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML 204 WU.dbo.image table imaID Type Major Object Source Author TTimeKey WordFormatsLenght resolution SweepColor 01001 animal Bio-engineeringGraduate Students Southeast University Na Tang2007/05yeast, bacteria gif 36 640*480 72 002244 01002 figures history Undergraduate Students Nanjing University Wei ZHAO2004/06background, achievements jpeg80 1024*768 300 FF0022 01003 equipment sports Undergraduate Students Suzhou University Liang-Qian Li 2002/06function, using methodsjpeg45 320*240 72 000044 WU.dbo.text table TxtID TxtType TxtMajor TxtObject TxtSourceTxtAuthor Txt Time TxtKey Word 02001 Economics Paper Internationa l economic Graduate St u d e nt sEconomicsLi Zhang 2007/05 Bubble economy, Economic globalization 02002 Economics Paper China's economy Undergraduate Stu- dents EconomicsKe Ban 2004/06 China imported inflation, Real estate and living 02003 Management Paper Business Management Undergraduate Stu- dents ManagementXiao-ming WU2002/06 Enterprise Project Management WU.dbo.vedio tabl e VedID VedType VedMajor VedObject VedSource VedAuthor VedTime VedKey Word 05001 Computer An Introductio n to Computer Graduate S t ud entsSouthern Yangtze UniversityKequn Wang 2006/05 computer, chip 05002 Computer Computer Application Graduate StudentsSuzhou University Liang Ke 2004/06 computer, NET,J2EE WU.dbo.flash tab l e FlaID FlaType FlaMajor FlaObject FlaSource FlaAuthor FlaTime FlaKey Word 03001 Computer Software Eng i neering Graduate Students Shenyang Polyt e c h ni c U ni v e rsityXing Liu 2005/05 computer, C++ 03002 Education Chinese Language & Literature Underrad uate Stu dent sCentral China Normal UniversityChuan Zhao 2004/06 literature, education WU.dbo.m usic ta ble MusID MusType MusMajor MusObject MusSource MusAuthor MusTime MusKey Word 04001 Education Chinese Langua ge and Lite rature Graduate Students Southeast UniversityKeyi Zhang 2007/05 literature, education 04002 Education Chinese Language and Li t e rature Undergraduate StudentsNankai UniversityGuosheng Huang 2003/06 literature, education Figure 4. Dynamic uniform education resource database resource database is also established as shown in Figure 4 according to the multiplicity of education resource's manifestation and the multiple perspective of the educa- tion resource description of different discipline based on international standard of education resource. The personalization description of education resource is obtained by cutting the dynamic unification education resource database using the data processing frame ac- cording to the user's personalized request, as shown in Figure 5. Imageinformation 0 imaID 01001 Type animal Major Bio-engineering Object Graduate Students Source Southeast University Author Na Tang Ttime 2007/05 Key Word yeast, bacteria Formats gif Length 36 Resolution 640*480 Sweep 72 Color 002244 Address ..\\DataSharing\src\image\1.gif Figure 5. The personalization education resource result in client after cutting out 5. Conclusions The paper defines a XML document which describes the database structure. We fill the information of the educa- tion resource database into self-explanatory XML docu- ments in order to let users create database friendly. And a scheme is made as designing a middleware between the database and its outside. A data processing frame is ad- vanced to process each kind of actual problems which are brought by the complexity, the dynamic and the person- alization of the education resource data. The exchanging requests of internal or external education resource data are submitted to the middleware with XML. The interac- tion of specific education resource database is realized by the middleware and the results are fed back to the re- quester through XML. All the details in the process hav e been shielded to achieve transparent sharing access of heteroge neous educat i on resource database. REFERENCES [1] Oracle XML-SQL Utility, http: // www. oracle.com /technology/ index.html. Last accessed on July 27, 2009. [2] IBM DB2 XML Extender, www.ibm.com/ software/ data/ db2/ extenders/xmlext. Last accessed on July 27, 2009. Copyright © 2009 SciRes JSEA ![]() Sharing and Implementation of Heterogeneous Database for Education Resource Based on XML205 [3] XML Perspective, In control with FOR XML Explicit. SQL Server Magazine, http://msdn.mcrosoft. com/ li- brary/ periodic/. Last ac cessed on July 27, 2009. [4] A. P. Sheth and J. A. Larson, “Federated database sys- tems or managing distributed, heterogeneous, and autonomous databases,” ACM Computing Survey, Vol. 22, No. 3, pp. 183–236, 1990. [5] Q. Feng, H. Q. Lv and H. Feng, “The connection of Het- erogeneous databases,” Computer and Information Tech- nology, Vol. 9, 2001. [6] X. Wang and S. M. Wei, “Java technology-based distrib- uted heterogeneous database Web access technology,” Computer Engineering and Applications, pp. 135–138, 2000. [7] D. Martin, “XML High-level Programming,” Beijing Machinery Industry Press, pp. 77–103, 2001. [8] D. Motton, “XML programming technology [M],” Bei- jing Machinery Industry Press, pp. 134–200, 2001. [9] X. H. Dong [EB/OL], http://www.XML.org.cn, Applica- tions to build XML. Copyright © 2009 SciRes JSEA |