xml and database interface chao-hsien chu, ph.d. school of information sciences and technology the...
TRANSCRIPT
![Page 1: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/1.jpg)
XML and Database InterfaceXML and Database Interface
Chao-Hsien Chu, Ph.D.School of Information Sciences and Technology
The Pennsylvania State University
ODBCJDBC
ADO
DSO
![Page 2: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/2.jpg)
Information
Information AgeInformation Age
Processing
Representation
Storage
Retrieval
Search Sharing
Management
Interchange
![Page 3: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/3.jpg)
IS there
such a creation ?
The Needs for Information InterchangeThe Needs for Information Interchange
Power Flexibility Simplicity Fault tolerance Scalability Interoperability Open standard Extensible Character-based Human-readable
![Page 4: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/4.jpg)
IS There Such a Creation?
Power Flexibility Simplicity Fault tolerance Scalability Interoperability Open standard Extensible Character-based Human-readable
HTML SGML XML
X XX X
? XX XX X
? ? ?? ? ?
X XX X X
X X
Criteria
![Page 5: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/5.jpg)
Potential Applications of XMLPotential Applications of XML
Three-Tier Applications: Personalized Web Site On-Line Auction E Commerce Integration Content Acquisition Content Management Portals Publishing Databases Schemas management
Product Catalog E-commerce vocabulary Voice Transformation Mobile XML Voice Semantic Web Knowledge Navigation Metadata Description Topic maps Web services Infrastructure
![Page 6: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/6.jpg)
Types of Information SharingTypes of Information Sharing
Information Posting /Publishing: Paper; CD-ROM; HTML/XHTML.
Data Integration: cXML (Ariba); tpaML (IBM); xCBL (ConmmerceOne); BizTalk (Microsoft); eCo (CommerceNet); eConcert (RosettaNet); ebXML (UN/CEFACT and OASIS).
Automated Trading: Electronic Data Interchange (EDI).
![Page 7: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/7.jpg)
XML for Information InterchangeXML for Information Interchange
CADPackage
WordProcessor
StatisticalProcessing
SpreadsheetPackage
XML
XSL
CSSXSL
CSS
![Page 8: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/8.jpg)
XSL
CSS
XML and Databases InterfaceXML and Databases Interface
XMLDocument
Print out
CD ROM
Web
WAP, etc.
RDBMS
OODBMS
OtherDBMSs
ADO
ODBC
JDBC
![Page 9: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/9.jpg)
XML Application InterfacesXML Application Interfaces
ADO: ActiveX Data Objects
DOM: Document Object Model
DSO: Data Source Object
ODBC: Open DataBase Connectivity
JDBC: Java DataBase Connectivity
CSS: Cascading Style Sheets
XSL – XML Stylesheet Language
![Page 10: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/10.jpg)
Wireless IntegrationWireless Integration
XMLHTMLWML
ASP / Java
![Page 11: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/11.jpg)
XMLXSL
ASP / Java
Wireless IntegrationWireless Integration
![Page 12: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/12.jpg)
Application Interfaces for XMLApplication Interfaces for XMLD
ocument
XML
Application
XML
Parser
XMLDOM
SAX
DOM: Document Object ModelSAX: Simple APIs for XML
![Page 13: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/13.jpg)
ADO
ODBC
JDBC
XSL
CSS
XML Application ConnectorsXML Application Connectors
XMLDocument
Print out
CD ROM
Web
WAP, etc.
RDBMS
OODBMS
OtherDBMSs
Applications
DOM SAX
![Page 14: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/14.jpg)
XML Information Retrieval MechanismXML Information Retrieval Mechanism
Application Programs / Browsers
DOM DSO CSS XSL
XMLDocuments
XML SQL
Data
SQL Server Oracle
Others
ADO
HTTP + SQL
ODBCJDBC
![Page 15: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/15.jpg)
Example of ADOExample of ADO<%@language = "VBScript" %><% Response.ContentType ="text/xml" %><%dim cConn, rsData
'connects to the Access driver and Access database strProvider = "Driver={Microsoft Access Driver (*.mdb)};
DBQ="& server.mappath ("ROSTER.mdb")
'creates an instance of an Active Server componentset cConn = Server.CreateObject("ADODB.Connection")
'opens the connection to the data basecConn.Open strProvider
‘SQL QuerySet rsData = cConn.Execute("select * from roster")
%>
![Page 16: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/16.jpg)
Example of ODBCExample of ODBC
<%@language = "VBScript" %><% Response.ContentType ="text/xml" %><%
dim cConn, rsData
‘Setup ODBC Connection (ROSTER ID:sa)
'creates an instance of an Active Server component set cConn = Server.CreateObject("ADODB.Connection")
'opens the connection to the data base cConn.Open "ROSTER","sa",""
‘SQL Query Set rsData = cConn.Execute("select * from roster")%>
![Page 17: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/17.jpg)
ODBC Example 2ODBC Example 2
<%@language = "VBScript" %>
<?xml version = "1.0" standalone = "no"?>
<?xml-stylesheet type="text/xsl" href="roster.xsl"?>
<Roster>
<%set conn=server.createobject ("adodb.connection")
conn.open "driver={Microsoft Access Driver (*.mdb)}; dbq="& server.mappath ("ROSTER.mdb")
set rs=conn.execute("select * from roster")
do while not rs.eof
%>
![Page 18: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/18.jpg)
ODBC Example 2ODBC Example 2<Student>
<Name> <%=rs("Name")%> </Name>
<Residence> <%=rs("Residence")%> </Residence>
<Age> <%=rs("Age")%> </Age>
<Telephone> <%=rs("Telephone")%> </Telephone>
</Student>
<%
rs.movenext
loop
%>
</Roster>
![Page 19: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/19.jpg)
DBMSs That Support XMLDBMSs That Support XML
Oracle 8 i (1999):http://technet.oracle.com/tech/xml
Microsoft SQL Server (2000):
http://support.microsoft.com/support/kb/articles/Q271/6/20.ASP
http://support.microsoft.com/support/kb/articles/Q271/7/80.ASP
Informix (2000):http://www.informix.com/xml/
XML Repository (2001):http://www.ozone-db.org/ozone_main.html
![Page 20: XML and Database Interface Chao-Hsien Chu, Ph.D. School of Information Sciences and Technology The Pennsylvania State University ODBC JDBC ADO DSO](https://reader035.vdocuments.site/reader035/viewer/2022072014/56649e745503460f94b74416/html5/thumbnails/20.jpg)
Thank You?
Any Question?