Ch7-InternetApp - Database Management Systems 3ed, R....

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Internet Applications Chapter 7 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Lecture Overview ¡ Internet Concepts ¡ Web data formats ¢ HTML, XML, DTDs ¡ Introduction to three-tier architectures ¡ The presentation layer ¢ HTML forms; HTTP Get and POST, URL encoding; Javascript; Stylesheets. XSLT ¡ The middle tier ¢ CGI, application servers, Servlets, JavaServerPages, passing arguments, maintaining state (cookies) Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Uniform Resource Identifiers ¡ Uniform naming schema to identify resources on the Internet ¡ A resource can be anything: ¢ Index.html ¢ mysong.mp3 ¢ picture.jpg ¡ Example URIs: http://www.cs.wisc.edu/~dbbook/index.html mailto:webmaster@bookstore.com Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 Structure of URIs http://www.cs.wisc.edu/~dbbook/index.html ¡ URI has three parts: ¢ Naming schema ( http ) ¢ Name of the host computer (www.cs.wisc.edu) ¢ Name of the resource ( ~dbbook/index.html ) ¡ URLs are a subset of URIs Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 5 Hypertext Transfer Protocol ¡ What is a communication protocol? ¢ Set of standards that defines the structure of messages ¢ Examples: TCP, IP, HTTP ¡ What happens if you click on www.cs.wisc.edu/~dbbook/index.html? Y Client (web browser) sends HTTP request to server Y Server receives request and replies Y Client receives reply; makes new requests Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 6 HTTP (Contd.) Client to Server: GET ~/index.html HTTP/1.1 User-agent: Mozilla/4.0 Accept: text/html, image/gif, image/jpeg Server replies: HTTP/1.1 200 OK Date: Mon, 04 Mar 2002 12:00:00 GMT Server: Apache/1.3.0 (Linux) Last-Modified: Mon, 01 Mar 2002 09:23:24 GMT Content-Length: 1024 Content-Type: text/html <HTML> <HEAD></HEAD> <BODY> <h1>Barns and Nobble Internet Bookstore</h1> Our inventory: <h3>Science</h3> <b>The Character of Physical Law</b> ... Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 7 HTTP Protocol Structure HTTP Requests ¡ Request line: GET ~/index.html HTTP/1.1 ¢ GET : Http method field (possible values are GET and POST, more later) ¢ ~/index.html : URI field ¢ HTTP/1.1 : HTTP version field ¡ Type of client: User-agent: Mozilla/4.0 ¡ What types of files will the client accept: Accept: text/html, image/gif, image/jpeg Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 8 HTTP Protocol Structure (Contd.) HTTP Responses ¡ Status line: HTTP/1.1 200 OK ¢ HTTP version: HTTP/1.1 ¢ Status code: 200 ¢ Server message: OK ¢ Common status code/server message combinations: • 200 OK: Request succeeded • 400 Bad Request: Request could not be fulfilled by the server • 404 Not Found: Requested object does not exist on the server • 505 HTTP Version not Supported ¡ Date when the object was created: Last-Modified: Mon, 01 Mar 2002 09:23:24 GMT...
View Full Document

Page1 / 27

Ch7-InternetApp - Database Management Systems 3ed, R....

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online