chapter 10 © 2009 pearson education, inc. publishing as prentice hall 1 chapter 10: the internet...

32
Chapter 10 © 2009 Pearson Education, Inc. Publishing as © 2009 Pearson Education, Inc. Publishing as Prentice Hall Prentice Hall 1 Chapter 10: Chapter 10: The Internet Database The Internet Database Environment Environment Modern Database Management Modern Database Management 9 9 th th Edition Edition Jeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott, Heikki Topi Heikki Topi

Upload: drusilla-harris

Post on 26-Dec-2015

216 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10© 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

EnvironmentEnvironmentModern Database ManagementModern Database Management

99thth Edition EditionJeffrey A. Hoffer, Mary B. Prescott, Jeffrey A. Hoffer, Mary B. Prescott,

Heikki TopiHeikki Topi

Page 2: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 22

ObjectivesObjectives• Definition of termsDefinition of terms• Explain the importance of attaching a database to a Web pageExplain the importance of attaching a database to a Web page• Describe necessary environment for Internet and Intranet Describe necessary environment for Internet and Intranet

database connectivitydatabase 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 interpretationExplain purpose of XML for standardized data interpretation• 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

Page 3: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 33

Web Characteristics that Support Web Characteristics that Support Web-Based Database ApplicationsWeb-Based Database Applications

• Web browsers are simple to useWeb browsers are simple to use• Information transfer can take place across different Information transfer can take place across different

platformsplatforms• Development time and cost have been reducedDevelopment time and cost have been reduced• 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 (improved customer Potential e-business advantages (improved customer

service, faster market time, better supply chain service, faster market time, better supply chain management)management)

Page 4: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 44

Figure 10-1 Database-enabled intranet/internet environment

Page 5: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 55

Internet and Intranet ServicesInternet and Intranet Services• 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

Page 6: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 66

World Wide Web Consortium (W3C)World Wide Web Consortium (W3C)

• An international consortium of companies An international consortium of companies working to develop open standards that foster working to develop open standards that foster the development of Web conventions so that the development of Web conventions so that Web documents can be consistently displayed Web documents can be consistently displayed on all platforms on all platforms

• See See www.w3c.orgwww.w3c.org

Page 7: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 77

Web-Related TermsWeb-Related Terms• World Wide Web (WWW)World Wide Web (WWW)

– The total set of interlinked hypertext documents residing on Web servers The total set of interlinked hypertext documents residing on Web servers worldwideworldwide

• BrowserBrowser– Software that displays HTML documents and allows users to access files and Software that displays HTML documents and allows users to access files and

software related to HTML documentssoftware related to HTML documents• Web ServerWeb Server

– Software that responds to requests from browsers and transmits HTML Software that responds to requests from browsers and transmits HTML documents to browsersdocuments 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 obtaining data Dynamic Web pages–content dynamically generated, usually by obtaining data

from databasefrom database

Page 8: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 88

Communications TechnologyCommunications Technology• 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

Page 9: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 99

Internet-Related LanguagesInternet-Related Languages• 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)

Page 10: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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 definitionRelax NG–ISO standard XML database definition• Document Structure Description (DSD)– expressive, Document Structure Description (DSD)– expressive,

easy to use XML database definitioneasy to use XML database definition

Page 11: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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 links to Used along with Xlink for establishing hypertext links to

URI referencesURI references• XQueryXQuery

– XML transformation language allowing applications to XML transformation language allowing applications to query relational databases and XML dataquery relational databases and XML data

Page 12: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1212

Sample XML SchemaSample XML Schema

Schema is a record definition, analogous to the Create SQL statement, and therefore provides metadata

Page 13: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1313

Sample XML Document DataSample XML Document Data

XML data involves elements and attributes defined in the schema, and is analogous to inserting a record into a database

Page 14: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1414

Another Sample XML DocumentAnother Sample XML Document

Page 15: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1515

Sample XPath Expressions for Sample XPath Expressions for PVFC.xmlPVFC.xml

Page 16: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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

Page 17: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1717

Web Server InterfacesWeb Server Interfaces• Common Gateway Interface (CGI)Common Gateway Interface (CGI)

– Specify transfer of information between Web server and CGI programSpecify transfer of information between Web server and CGI 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

Page 18: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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 serversRequest at one IP address is distributed to multiple servers

– Reverse proxyReverse proxy• Intercept client request and cache responseIntercept client request and cache response

Page 19: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 1919

Client-Side ExtensionsClient-Side Extensions

• Add functionality to the browserAdd functionality to the browser• Plug-insPlug-ins

– Hardware/software modules that extend browser Hardware/software modules that extend browser capabilities by adding features (e.g. encryption, capabilities by adding features (e.g. encryption, animation, wireless access)animation, wireless access)

• ActiveXActiveX– Microsoft COM/OLE components that allow data Microsoft COM/OLE components that allow data

manipulation inside the browsermanipulation inside the browser• CookiesCookies

– Block of data stored at client by Web server for later useBlock of data stored at client by Web server for later use

Page 20: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2020

Components for Dynamic Web SitesComponents for Dynamic Web Sites

• DBMS–Oracle, Microsoft SQL Server, Informix, DBMS–Oracle, Microsoft SQL Server, Informix, Sybase, DB2, Microsoft Access, MySQLSybase, DB2, Microsoft Access, MySQL

• Web server–Apache, Microsoft IISWeb server–Apache, Microsoft IIS• Programming languages/development technologies–Programming languages/development technologies–

ASP .NET, PHP, ColdFusion, Coral Web Builder, ASP .NET, PHP, ColdFusion, Coral Web Builder, Macromedia’s DreamweaverMacromedia’s Dreamweaver

• Web browser–Microsoft Internet Explorer, Netscape Web browser–Microsoft Internet Explorer, Netscape Navigator, Mozilla Firefox, Apple’s Safari, OperaNavigator, Mozilla Firefox, Apple’s Safari, 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

Page 21: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2121

Figure 10-3 Dynamic Web development environment

Page 22: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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)

Page 23: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2323

Figure 10-4a (cont.)

Page 24: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2424

Figure 10-4 Sample PHP script that accepts user registration inputb) Adding user information to the database

Page 25: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2525

Figure 10-4 Sample PHP script that accepts user registration inputc) Close PHP script and display HTML form

Page 26: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2626

Web ServicesWeb Services• XML-based standards that define protocols for automatic communication XML-based standards that define protocols for automatic communication

between applications over the Webbetween 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 businesses open to Technical specification for distributed registries of Web services and businesses open to

communication on these servicescommunication on these services– Web Services Description Language (WSDL)Web Services Description Language (WSDL)

• XML-based grammar for describing Web services and providing public interfaces for these XML-based grammar for describing Web services and providing public interfaces for these servicesservices

– Simple Object Access Protocol (SOAP)Simple Object Access Protocol (SOAP)• XML-based communication protocol for sending messages between applications via the XML-based communication protocol for sending messages between applications via the

InternetInternet

• Challenges for Web ServicesChallenges for Web Services– Lack of mature standardsLack of mature standards– Lack of securityLack of security

Page 27: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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

Page 28: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2828

Figure 10-7 Web services deployment (adapted from Newcomer, 2002)

Page 29: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 2929

Service Oriented ArchitecturesService Oriented Architectures

• Collection of services that communicate with Collection of services that communicate with each other by passing dataeach other by passing data

• Web services, CORBA, Java, XML, SOAP, WSDLWeb services, CORBA, Java, XML, SOAP, WSDL• 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%)

Page 30: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 3030

Semantic WebSemantic Web• W3C project using Web metadata to W3C project using Web metadata to

automate collection of knowledge and storing automate collection of knowledge and storing in easily understood formatin easily understood format

• Structuring based on:Structuring based on:– XMLXML– Resource Description Framework (RDF)Resource Description Framework (RDF)– Web Ontology Language (OWL)Web Ontology Language (OWL)

Page 31: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 3131

Rapidly Accelerating Internet ChangesRapidly Accelerating Internet Changes

• 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 understandingBusiness and technology infrastructure understanding– Leadership and communication skillsLeadership and communication skills– Upward influence techniquesUpward influence techniques– Employee management techniquesEmployee management techniques

Page 32: Chapter 10 © 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 10: The Internet Database Environment Modern Database Management 9 th Edition

Chapter 10 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