© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database...
-
Upload
jodie-douglas -
Category
Documents
-
view
215 -
download
0
Transcript of © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database...
© 2009 Pearson Education, Inc. Publishing as © 2009 Pearson Education, Inc. Publishing as Prentice HallPrentice Hall 11
Chapter 10:Chapter 10: The Internet Database The Internet Database
EnvironmentEnvironment
Modern Database Modern Database ManagementManagement
99thth Edition EditionJeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott,
Heikki TopiHeikki Topi
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 22
ObjectivesObjectives Definition of termsDefinition of terms Explain the importance of attaching a database to a Explain the importance of attaching a database to a
Web pageWeb page Describe necessary environment for Internet and Describe necessary environment for Internet and
Intranet database connectivityIntranet database connectivity Use Internet terminology appropriatelyUse Internet terminology appropriately Explain the purpose of WWW ConsortiumExplain the purpose of WWW Consortium Explain purpose of XML for standardized data Explain purpose of XML for standardized data
interpretationinterpretation Explain XPath and XQueryExplain XPath and XQuery Explain the purpose of server-side extensionsExplain the purpose of server-side extensions Describe Web servicesDescribe Web services Compare Web server interfaces (CGI, API, Java servlets)Compare Web server interfaces (CGI, API, Java servlets) Describe Web load balancing methodsDescribe Web load balancing methods Explain plug-insExplain plug-ins
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 33
Web Characteristics that Web Characteristics that Support Web-Based Database Support Web-Based Database
ApplicationsApplications Web browsers are simple to useWeb browsers are simple to use Information transfer can take place across Information transfer can take place across
different platformsdifferent platforms Development time and cost have been Development time and cost have been
reducedreduced Sites can be static (no database) or Sites can be static (no database) or
dynamic/interactive (with database)dynamic/interactive (with database) Potential e-business advantages Potential e-business advantages
(improved customer service, faster market (improved customer service, faster market time, better supply chain management)time, better supply chain management)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 44
Figure 10-1 Database-enabled intranet/internet environment
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 55
Internet and Intranet Internet and Intranet ServicesServices
Web serverWeb server Database-enabled servicesDatabase-enabled services Directory, security, authenticationDirectory, security, authentication E-mailE-mail File Transfer Protocol (FTP)File Transfer Protocol (FTP) Firewalls and proxy serversFirewalls and proxy servers News or discussion groupsNews or discussion groups Document searchDocument search Load balancing and cachingLoad balancing and caching
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 66
World Wide Web Consortium World Wide Web Consortium (W3C)(W3C)
An international consortium of An international consortium of companies working to develop open companies working to develop open standards that foster the standards that foster the development of Web conventions so development of Web conventions so that Web documents can be that Web documents can be consistently displayed on all consistently displayed on all platforms platforms
See See www.w3c.orgwww.w3c.org
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 77
Web-Related TermsWeb-Related Terms World Wide Web (WWW)World Wide Web (WWW)
The total set of interlinked hypertext documents residing on The total set of interlinked hypertext documents residing on Web servers worldwideWeb servers worldwide
BrowserBrowser Software that displays HTML documents and allows users to Software that displays HTML documents and allows users to
access files and software related to HTML documentsaccess files and software related to HTML documents Web ServerWeb Server
Software that responds to requests from browsers and Software that responds to requests from browsers and transmits HTML documents to browserstransmits HTML documents to browsers
Web pages–HTML documentsWeb pages–HTML documents Static Web pages–content established at development time Static Web pages–content established at development time Dynamic Web pages–content dynamically generated, usually by Dynamic Web pages–content dynamically generated, usually by
obtaining data from databaseobtaining data from database
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 88
Communications Communications TechnologyTechnology
IP AddressIP Address Four numbers that identify a node on the InternetFour numbers that identify a node on the Internet e.g. 131.247.152.18e.g. 131.247.152.18
Hypertext Transfer Protocol (HTTP)Hypertext Transfer Protocol (HTTP) Communication protocol used to transfer pages from Web server to browserCommunication protocol used to transfer pages from Web server to browser HTTPS is a more secure versionHTTPS is a more secure version
Uniform Resource Locator (URL)Uniform Resource Locator (URL) Mnemonic Web address corresponding with IP addressMnemonic Web address corresponding with IP address Also includes folder location and html file nameAlso includes folder location and html file name
Typical URL
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 99
Internet-Related Internet-Related LanguagesLanguages Hypertext Markup Language (HTML)Hypertext Markup Language (HTML)
Markup language specifically for Web pagesMarkup language specifically for Web pages Standard Generalized Markup Language (SGML)Standard Generalized Markup Language (SGML)
Markup language standardMarkup language standard Extensible Markup Language (XML)Extensible Markup Language (XML)
Markup language allowing customized tagsMarkup language allowing customized tags XHTMLXHTML
XML-compliant extension of HTMLXML-compliant extension of HTML JavaJava
Object-oriented programming language for appletsObject-oriented programming language for applets JavaScript/VBScriptJavaScript/VBScript
Scripting languages that enable interactivity in HTML documentsScripting languages that enable interactivity in HTML documents Cascading Style Sheets (CSS)Cascading Style Sheets (CSS)
Control appearance of Web elements in an HML documentControl appearance of Web elements in an HML document XSL and XSLTXSL and XSLT
XMS style sheet and transformation to HTMLXMS style sheet and transformation to HTML
Standards and Web conventions established
byWorld Wide Web World Wide Web
Consortium (W3C)Consortium (W3C)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1010
XML OverviewXML Overview Becoming the standard for E-Commerce data Becoming the standard for E-Commerce data
exchangeexchange A markup language (like HTML)A markup language (like HTML)
Uses elements, tags, attributesUses elements, tags, attributes Includes document type declarations (DTDs), XML Includes document type declarations (DTDs), XML
schemas, comments, and entity referencesschemas, comments, and entity references XML Schema (XSD) replacing DTDsXML Schema (XSD) replacing DTDs Relax NG–ISO standard XML database Relax NG–ISO standard XML database
definitiondefinition Document Structure Description (DSD)– Document Structure Description (DSD)–
expressive, easy to use XML database expressive, easy to use XML database definitiondefinition
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1111
XML Overview (cont.)XML Overview (cont.) XpathXpath
One of a set of XML technologies supporting XQuery One of a set of XML technologies supporting XQuery development, locating data in XML documentsdevelopment, locating data in XML documents
XLinkXLink XML markup language for creating hypertext linksXML markup language for creating hypertext links
XPointerXPointer Used along with Xlink for establishing hypertext Used along with Xlink for establishing hypertext
links to URI referenceslinks to URI references XQueryXQuery
XML transformation language allowing applications XML transformation language allowing applications to query relational databases and XML datato query relational databases and XML data
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1212
Sample XML SchemaSample XML Schema
Schema is a record definition, analogous to the Create SQL statement, and therefore provides metadata
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1313
Sample XML Document Sample XML Document DataData
XML data involves elements and attributes defined in the schema, and is analogous to inserting a record into a database
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1414
Another Sample XML Another Sample XML DocumentDocument
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1515
Sample XPath Expressions Sample XPath Expressions for PVFC.xmlfor PVFC.xml
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1616
Server-Side ExtensionsServer-Side Extensions Programs that interact directly with Web Programs that interact directly with Web
servers to handle requestsservers to handle requests e.g. database-request handling middlewaree.g. database-request handling middleware
Figure 10-2 Web-to-database middleware
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1717
Web Server InterfacesWeb Server Interfaces Common Gateway Interface (CGI)Common Gateway Interface (CGI)
Specify transfer of information between Web server and Specify transfer of information between Web server and CGI programCGI program
Performance not very goodPerformance not very good Security risksSecurity risks
Application Program Interface (API)Application Program Interface (API) More efficient than CGIMore efficient than CGI Shared as dynamic link libraries (DLLs)Shared as dynamic link libraries (DLLs)
Java ServletsJava Servlets Like applets, but stored at serverLike applets, but stored at server Cross-platform compatibleCross-platform compatible More efficient than CGIMore efficient than CGI
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1818
Web ServersWeb Servers Provide HTTP serviceProvide HTTP service Passing plain text via TCP connectionPassing plain text via TCP connection Serve many clients at onceServe many clients at once
Therefore, multithreaded and multiprocessedTherefore, multithreaded and multiprocessed Load balancing approaches:Load balancing approaches:
Domain Name Server (DNS) balancingDomain Name Server (DNS) balancing One DNS = multiple IP addressesOne DNS = multiple IP addresses
Software/hardware balancingSoftware/hardware balancing Request at one IP address is distributed to multiple Request at one IP address is distributed to multiple
serversservers Reverse proxyReverse proxy
Intercept client request and cache responseIntercept client request and cache response
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1919
Client-Side ExtensionsClient-Side Extensions Add functionality to the browserAdd functionality to the browser Plug-insPlug-ins
Hardware/software modules that extend Hardware/software modules that extend browser capabilities by adding features (e.g. browser capabilities by adding features (e.g. encryption, animation, wireless access)encryption, animation, wireless access)
ActiveXActiveX Microsoft COM/OLE components that allow Microsoft COM/OLE components that allow
data manipulation inside the browserdata manipulation inside the browser CookiesCookies
Block of data stored at client by Web server Block of data stored at client by Web server for later usefor later use
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2020
Components for Dynamic Web Components for Dynamic Web SitesSites
DBMS–Oracle, Microsoft SQL Server, DBMS–Oracle, Microsoft SQL Server, Informix, Sybase, DB2, Microsoft Access, Informix, Sybase, DB2, Microsoft Access, MySQLMySQL
Web server–Apache, Microsoft IISWeb server–Apache, Microsoft IIS Programming languages/development Programming languages/development
technologies–ASP .NET, PHP, ColdFusion, technologies–ASP .NET, PHP, ColdFusion, Coral Web Builder, Macromedia’s Coral Web Builder, Macromedia’s DreamweaverDreamweaver
Web browser–Microsoft Internet Explorer, Web browser–Microsoft Internet Explorer, Netscape Navigator, Mozilla Firefox, Apple’s Netscape Navigator, Mozilla Firefox, Apple’s Safari, OperaSafari, Opera
Text editor–Notepad, BBEdit, vi, or an IDEText editor–Notepad, BBEdit, vi, or an IDE FTP capabilities–SmartFTP, WS_FTPFTP capabilities–SmartFTP, WS_FTP
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2121
Figure 10-3 Dynamic Web development environment
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2222
Figure 10-4 Sample PHP script that accepts user registration inputa) PHP script initiation and input validation
(Ullman, PHP and MySql for Dynamic Web Sites, 2003, Script 6.6)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2323
Figure 10-4a (cont.)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2424
Figure 10-4 Sample PHP script that accepts user registration inputb) Adding user information to the database
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2525
Figure 10-4 Sample PHP script that accepts user registration inputc) Close PHP script and display HTML form
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2626
Web ServicesWeb Services XML-based standards that define protocols for automatic XML-based standards that define protocols for automatic
communication between applications over the Webcommunication between applications over the Web Web Service Components:Web Service Components:
Universal Description, Discovery, and Integration (UDDI)Universal Description, Discovery, and Integration (UDDI) Technical specification for distributed registries of Web services and Technical specification for distributed registries of Web services and
businesses open to communication on these servicesbusinesses open to communication on these services Web Services Description Language (WSDL)Web Services Description Language (WSDL)
XML-based grammar for describing Web services and providing public XML-based grammar for describing Web services and providing public interfaces for these servicesinterfaces for these services
Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP) XML-based communication protocol for sending messages between XML-based communication protocol for sending messages between
applications via the Internetapplications via the Internet Challenges for Web ServicesChallenges for Web Services
Lack of mature standardsLack of mature standards Lack of securityLack of security
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2727
Figure 10-5 A typical order entry system that uses Web services
(adapted from Newcomer 2002, Figure 1-3) Figure 10-6 Web services protocol stack
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2828
Figure 10-7 Web services deployment (adapted from Newcomer, 2002)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 2929
Service Oriented Service Oriented ArchitecturesArchitectures
Collection of services that communicate Collection of services that communicate with each other by passing datawith each other by passing data
Web services, CORBA, Java, XML, SOAP, Web services, CORBA, Java, XML, SOAP, WSDLWSDL
Loosely coupledLoosely coupled InteroperableInteroperable Using SOA results in increased software Using SOA results in increased software
development efficiency (up to 40%)development efficiency (up to 40%)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 3030
Semantic WebSemantic Web W3C project using Web metadata to W3C project using Web metadata to
automate collection of knowledge automate collection of knowledge and storing in easily understood and storing in easily understood formatformat
Structuring based on:Structuring based on: XMLXML Resource Description Framework (RDF)Resource Description Framework (RDF) Web Ontology Language (OWL)Web Ontology Language (OWL)
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 3131
Rapidly Accelerating Internet Rapidly Accelerating Internet ChangesChanges
Integrated database environmentsIntegrated database environments Use of cell phones and PDAsUse of cell phones and PDAs Changes in organizational relationshipsChanges in organizational relationships GlobalizationGlobalization Challenges to IT personnel require:Challenges to IT personnel require:
Business and technology infrastructure Business and technology infrastructure understandingunderstanding
Leadership and communication skillsLeadership and communication skills Upward influence techniquesUpward influence techniques Employee management techniquesEmployee management techniques
Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall© 2009 Pearson Education, Inc. Publishing as Prentice Hall 3232
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic,
mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Copyright © 2009 Pearson Education, Inc. Publishing as Prentice HallHall