copyright © 2003 addison-wesley instructor information here

13
Copyright © 2003 Addison- Wesley Instructor Information Here

Post on 15-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Instructor Information Here

Page 2: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Internet Information Systems

• What are the major components of Web systems?• How are Web pages created using HTML?• What are Web servers and information servers combine

to create Web sites?• How is a typical Web site organized?

Page 3: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Components of the Web

• Web browser– Formats and displays Web pages– Requests pages from Web server– Collects user inputs and sends

them to server

• Web server– Sends Web pages to browser– Accepts and processes user input– Sends requests to information

server

• Information Server– Accepts requests from Web server– Manages complex information

resources– Contains database server

Page 4: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Sample Web Page

• A Web page is the formatted display of information

Page 5: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Sample HTML Document

1 <html><head>2 <!-- Home page for BigHit Online Demonstration Site-->3 <title>Welcome to BigHit Online</title>4 </head>5 <body bgcolor="#c2e1e7" link="black" vlink="black" alink="black">6 <font face="tahoma" "size=14px">7 <center>8 <!--lines for heading with image omitted -->9 <table width="715" border=2 cellpadding="5"> 10 <!-- lines for first row omitted -->11 <tr> <!-- second row -->12 <td><h3> 13 <a href=" http://www.web4data.com/bighit/index.html">14 BigHit Video Simple Sample Web pages and ASP scripts15 </a></h3></td>16 </tr>17 <!--lines for third row omitted -->18 </table>19 <!-- lines for footer omitted -->20 </center>21 </font>22 </body>23 </html>

Page 6: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Web Server• A computer program that services browser requests

– A Web server is software that knows how to service requests– A Web server computer is a computer that executes a Web server program

• Browser request for a specific HTML document may be serviced from the Web server computer’s disk

http://www.web4data.com/index.html

www.web4data.com

<html><head>... </html>

Files

<html><head>... </html> /index.html

WebServer

WebBrowser

Page 7: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Generating HTML Documents• An Information Server may be a computer that generates HTML

documents for storage in a Web server– New York Times has regular updates of its pages from an information

server that contains all of its news stories and other information– Someone requests the recreation of the home page (index.html)

www.nytimes.com

Files

index.html:<html><head>...</html>

index.html:<html><head>...</html>

generateindex.html

WebServer

InformationServer

Page 8: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

A Sample Web site

• Consider the BigHit Online video sales Web site• Each page will be generated in response to a customer request

– Browser creates request for page

– Web server determines what information is included in request and what is required for response

– Web server updates database (information server) with supplied information

– Web server asks database for information needed for response

– Web server creates HTML document with information

– Web server sends document to browser for format and display

• Look at these 3 types of pages– Page to display customer information

– Page to select videos for purchase

– Page to display purchase reciept

• What information is needed for each page?

Page 9: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Sample Database Tables

Page 10: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Customer Information Page

• Information content of page is a single row of the Customer table

Page 11: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Purchasing Web Page• Information content is some of the rows of the Movie table• Some components of the page are for user-supplied information• The number of copies of each video for purchase is sent to the Web

server• The number of copies is used to add new rows to the Sale table

Page 12: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Receipt for Purchase• Information on this page comes from all three

tables– The customer information comes from the row

of the Customer table with accountId 101– Each row of the purchase details comes from a

combination• One row of the Sale table for customer

101 for movieId, quantity, format, and cost• One row of the Movie table with the same

movieId for title and price

Page 13: Copyright © 2003 Addison-Wesley Instructor Information Here

Copyright © 2003 Addison-Wesley

Sample SQL Statement

• SQL (Standard Query Language) is the language that is used to communicate with database servers

• The information for the sales receipt entries is produced by sending this SQL statement to the BigHit Online database server– select Movie.movieId, Movie.title, Sale.format, Movie.dvdPrice,

Movie.tapePrice, Sale.quantity, Sale.cost from Movie, Sale where Movie.movieId = Sale.movieId and Sale.accountId =

101 and Sale.saleDate = 'Mar 5, 2002'