Скачать презентацию PROJECT Web-based Database Applications Lecture 2 Web-based Databases Скачать презентацию PROJECT Web-based Database Applications Lecture 2 Web-based Databases

572ec1ea438da4ce6a25e809f5d86d40.ppt

  • Количество слайдов: 37

PROJECT Web-based Database Applications Lecture 2: Web-based Databases Environment 1 PROJECT Web-based Database Applications Lecture 2: Web-based Databases Environment 1

The Web Environment & Web pages Web environment: Hypermedia-based system that provides a simple The Web Environment & Web pages Web environment: Hypermedia-based system that provides a simple ‘point and click’ means of browsing information on the Internet using hyperlinks. r Information presented on Web pages, can contain text, graphics, pictures, audio, and video r Web pages can also contain hyperlinks to other Web pages, which allow users to navigate in a nonsequential way through the information 2 Connolly © Addison Wesley, 2002

The Web Environment (Continued) r Web consists of networks of computers that can act The Web Environment (Continued) r Web consists of networks of computers that can act in two roles: Ø as clients (with browsers), requesting information Ø as servers, providing the information r The most used Protocol that governs exchange of information between the Web server and the browser is the HTTP r locations within documents are identified by URLs r Much of the Web’s success is due to its simplicity, uniformity of access, and platform-independence 3 Connolly © Addison Wesley, 2002

Basic Components of Web Environment Connolly © Addison Wesley, 2002 q q A Client Basic Components of Web Environment Connolly © Addison Wesley, 2002 q q A Client is a machine or process that requested access to programs or data over the network A Server provides and controls the access to programs and data, usually for multiple clients 4

Summary of Basic Internet concepts - 1 q World Wide Web (WWW) Ø q Summary of Basic Internet concepts - 1 q World Wide Web (WWW) Ø q The total set of interlinked hypertext documents residing on special servers called Web servers or HTTP servers, worldwide Hyperlinks allow users to: Ø Ø Ø Jump to other documents Download or transfer files Access to other groups and people Play audio / video files Execute small Java applets Execute servlets © H. Afsarmansesh, 2003 5

Summary of Basic Internet concepts - 2 q Browser Ø q Web Server Ø Summary of Basic Internet concepts - 2 q Browser Ø q Web Server Ø q Software that displays the HTML documents and supports users with execution of commands and accessing databases SW/HW that responds to requests from the browsers, transmits HTML documents to browsers (or execute their commands) Web pages – HTML documents Ø Ø Static Web pages: content established at development time Dynamic Web pages: content is dynamically generated, usually by obtaining data from a database (using ODBC/JDBC) 6 Hoffer © Prentice Hall, 2002

Summary of Basic Internet concepts Web server Client (browser) request response execute retrieve HTML Summary of Basic Internet concepts Web server Client (browser) request response execute retrieve HTML pages © H. Afsarmansesh, 2003 Servlets 7

E-Commerce / E-Business & Internet q Business transactions Ø On line information provision on E-Commerce / E-Business & Internet q Business transactions Ø On line information provision on products/services and orders Ø Order processing/fulfillment Ø Interaction with Customers Ø Electronic data interchange (e. g. EDI) Ø Payment of bills q Electronic Commerce (e-commerce) Ø Internet based business transactions Ø buying or selling goods or services electronically q Electronic Business (e-business) Ø Integration of Internet technology into economic infrastructure of the business Ø Development of integrated relationship among the customers and suppliers via the Internet 8 © H. Afsarmansesh, 2003

E-Commerce Categories Business-to-Business (B 2 B): Buy / sell transactions among businesses using Internet E-Commerce Categories Business-to-Business (B 2 B): Buy / sell transactions among businesses using Internet as the relationship channel Business-to-Customer (B 2 C): Businesses selling directly to customers Customer-to-Business (C 2 B): Customers taking initiative in buying and selling relationship Customer-to-Customer (C 2 C): Customers getting involved in buy / sell to other customers (e. g. Internet auctions) Mobile E-Commerce (M-C): Buy / sell via wireless access to the Internet © H. Afsarmansesh, 2003 9

Benefits of Web-based applications to DBs - 1 v HW/SW platform independence – for Benefits of Web-based applications to DBs - 1 v HW/SW platform independence – for browsers v Location independence – for data v No installation necessary for clients – web access v Development time and costs are reduced v Maintenance cost is minimized – thin clients v Common, familiar interface across applications v Similar format/functionality for GUI interfaces © H. Afsarmansesh, 2003 10

Benefits of Web-based applications to DBs - 2 v Easy to integrate with existing Benefits of Web-based applications to DBs - 2 v Easy to integrate with existing applications - use of standards (HTML, XML, Java script) v Easy to add multimedia – use of standards v Access the same way to local and remote data v Public data is easily shared v Protected date is hidden behind the firewall or on a different server v Writing to DBs (adding new data) is now commonplace (e. g. on-line orders, paying for subscription) – e-commerce © H. Afsarmansesh, 2003 11

Main challenges of Web-based applications for DBs v Security of on-line e-transactions v - Main challenges of Web-based applications for DBs v Security of on-line e-transactions v - v To avoid users from purposely or maliciously destroying the data Communication security Database security … E-business responsiveness / performance v Proper & timely response to the business request - Incomplete orders - Semantic ambiguity - Efficiency - … © H. Afsarmansesh, 2003 12

Growing number of Web servers worldwide q The web site: www. netcraft. com/survey provides Growing number of Web servers worldwide q The web site: www. netcraft. com/survey provides a survey of web services on the Internet Ø Showing the ever increasing usage of Apache Web server In 1995 In 2001 In 2003 q ~ 3500 ~ 25, 000 ~ 45, 000 sites This growth is mostly due to the ability to communicate with the databases and other dynamic pages with on-line information. 13 Hoffer © Prentice Hall, 2002

Web Servers functionality q q q Provision of HTTP service to comunicate between Web Web Servers functionality q q q Provision of HTTP service to comunicate between Web servers and Web browsers Transfer plain text via the TCP (Transmision Control Protocol) connection Supporting many clients simultaneously (multithreading and multi-processing) Consisting several HTML pages and perhaps some servlets Load balancing approaches: Ø Using Domain Name Server (DNS) - placing multiple copies of a web server on separate, but identical physical servers Ø Ø § One DNS => multiple IP addresses Software/hardware balancing § Request at one IP address is distributed to multiple servers Reverse proxying § Intercept client request and. Prentice Hall, 2002 response pages cache some Hoffer © 14

Server-Side Extensions r r Adding functionality to the server ODBC/JDBC compliant DBMS (Oracle, Sybase Server-Side Extensions r r Adding functionality to the server ODBC/JDBC compliant DBMS (Oracle, Sybase SW/HW that interact directly with the Web server to handle requests Ù e. g. database-request handling middleware ODBC/JDBC compliant DBMSs (Oracle, Sybase, …) Web-to-database middleware 15 Hoffer © Prentice Hall, 2002

Client-Side Extensions q Adding functionality to the browser q Plug-ins Ø q HW / Client-Side Extensions q Adding functionality to the browser q Plug-ins Ø q HW / SW modules that extend the browser capabilities, by adding features (such as encryption, animation, wireless access, etc. ) Cookies Ø Ø q Used to identify the user, when he/she returns to the web site Some blocks of data can be stored (by the Web server) at the client site for later use Active. X(microsoft)–like extensions Ø Components that allow some data manipulation inside the Browser 16 Hoffer © Prentice Hall, 2002

Web Server Interfaces q Common Gateway Interface (CGI) Ø Ø Ø Specify transfer of Web Server Interfaces q Common Gateway Interface (CGI) Ø Ø Ø Specify transfer of information between Web server and CGI program Not very good performance Security risks q Application Program Interface (API) Ø More efficient than CGI Ø Shared as dynamic link libraries (DLLs) q Java Servlets Ø Ø Ø Like applets, but stored and running at the Web server Cross-platform compatible More efficient and secure than CGI 17 Hoffer © Prentice Hall, 2002

Some Structural aspects of the Internet q IP address DNS q Domain names q Some Structural aspects of the Internet q IP address DNS q Domain names q URL q HTTP q HTML q Web Security q © H. Afsarmansesh, 2003 18

IP addresses and DNS q Internet Protocol addresses – IP addresses: Ø Four numbers, IP addresses and DNS q Internet Protocol addresses – IP addresses: Ø Four numbers, ranging from 0 to 255, separated by periods (e. g. 131. 247. 152. 18). Ø Identify a unique node (system) on the internet. Ø Each IP address also maps to a unique domain name. q Domain Name Server (DNS) and Domain names Ø Domain names are easy to remember, while IP addresses are for the system usage (e. g. www. science. uva. nl). Ø Domain name servers maintain an index of the IP addresses and their matching domain names. © H. Afsarmansesh, 2003 19

Uniform Resource Locators (URLs) - 1 q URL is a string of alphanumeric characters Uniform Resource Locators (URLs) - 1 q URL is a string of alphanumeric characters representing a mnemonic name q Defines uniquely where documents (resources) can be found on the Internet http: //carol. wins. uva. nl/~netpeer/teaching/db-web/ q Uniform Resource Identifiers (URIs) - generic set of all Internet resource names/addresses. q Uniform Resource Names (URNs) - persistent, location-independent name. Relies on name lookup services. © H. Afsarmansesh, 2003 20

URLs - 2 q URL consists of some basic parts: Ø Ø q protocol URLs - 2 q URL consists of some basic parts: Ø Ø q protocol used for the connection host name – Domain name path name on host where resource stored May include folder location and html file name (otherwise the index default) Can optionally specify: Ø Ø port through which the connection to host should be made query string 21 Connolly © Addison Wesley, 2002

Hyper. Text Transfer Protocol (HTTP) - 1 Protocol used to transfer Web pages through Hyper. Text Transfer Protocol (HTTP) - 1 Protocol used to transfer Web pages through Internet, between WWW server and clients programs It is based on request-response paradigm: Connection: Client establishes connection with Web Server Connection Request: Request Client sends HTTP request to Web server Response: Response Web server (via httpd) sends HTTP response (an HTML document) to client Close: Close Connection closed by Web server 22 Connolly © Addison Wesley, 2002

HTTP - 2 In HTTP/1. 0 - each connection itself is closed once server HTTP - 2 In HTTP/1. 0 - each connection itself is closed once server provides the response Ø It is difficult to support the concept of a session, which is essential to basic DBMS transaction q HTTPS is a more secure version, providing encryption and transmission through a secure net. q TCP/IP (Transmission Control Protocol / Internet Protocol) is used as the base for HTTP q TCP/IP breaks long messages into smaller packets Ø routes them independently over the web Ø at destination, it reassembles them for display on the node’s browser. q 23 Connolly © Addison Wesley, 2002

Sample HTTP Client Request / Response GET /index. html User-Agent: Mozilla/4. 01 Gold (NT; Sample HTTP Client Request / Response GET /index. html User-Agent: Mozilla/4. 01 Gold (NT; Windows NT) Host: dempsey. ils. unc. edu Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */* Content-Length: 55 HTTP/1. 0 200 OK Date: Fri, 31 Dec 1999 23: 59 GMT Content-Type: text/html Content-Length: 1354 Happy New Millennium! (more file contents) 24

Hyper. Text Markup Language (HTML) Document formatting language used to design most Web pages Hyper. Text Markup Language (HTML) Document formatting language used to design most Web pages q A simple, yet powerful, platform-independent document language q HTML is an application of Standardized Generalized Markup Language (SGML), a system for defining structured document types and markup languages to represent instances of those document types 25 Connolly © Addison Wesley, 2002

HTML - Common Tags <HTML> <!-- Our first Web page --> Tag Pair <HEAD> HTML - Common Tags Tag Pair Databases & Web-based Applications ………….

Welcome to Our Web Site!

…………. 26 A. Benabdelkader ©Uv. A, 2002

Welcome to Our" src="http://present5.com/presentation/572ec1ea438da4ce6a25e809f5d86d40/image-27.jpg" alt="HTML - Text Styling (formatting) Macro command Welcome to Our" /> HTML - Text Styling (formatting) Macro command Welcome to Our Web Site! As

We have designed this site to teach about the wonders of HTML. We have been using HTML since version 2. 0, and we enjoy the features that have been added recently. It seems only a short time ago that we read our first HTML book. Soon you will know about many of the great new features of HTML 4. 0.

27 A. Benabdelkader ©Uv. A, 2002

HTML - Headers HTML Code HTML Output <H 1>Level 1 Header</H 1> <H 2>Level HTML - Headers HTML Code HTML Output Level 1 Header Level 2 header Level 3 header Level 4 header Level 5 header Level 6 header 28 A. Benabdelkader ©Uv. A, 2002

HTML – Linking Link command • Web Site Link <P>Yahoo: <A HREF = HTML – Linking Link command • Web Site Link

Yahoo: Go to Yahoo

• Email Link My email address is my email . 29 A. Benabdelkader ©Uv. A, 2002

" src="http://present5.com/presentation/572ec1ea438da4ce6a25e809f5d86d40/image-30.jpg" alt="HTML – Forms (structured input box) Input Form " /> HTML – Forms (structured input box) Input Form Database Name:
30 A. Benabdelkader ©Uv. A, 2002

HTML - Special Characters <!-- Special characters are entered using the form &code; --> HTML - Special Characters

All information on this site is © Deitel & Associates, 1999.

© for copyrights symbol c & for the symbol & 31 A. Benabdelkader ©Uv. A, 2002

HTML- FONTs, IMAGEs, … q FONT <FONT COLOR = HTML- FONTs, IMAGEs, … q FONT We have designed this site to teach about the wonders of HTML. q IMAGE Harvey and Paul Deitel 32 A. Benabdelkader ©Uv. A, 2002

Sample HTML Code <html> <head><Title>Databases & Web-based Applications</title></head> <body bgcolor= Sample HTML Code Databases & Web-based Applications Databases & Web-based Applications Objectives< br> Application of modern database architectures and data access mechanisms, …

………. . .
Directed to: 2 e jaars bedrijfsinformatiesystemen
Other Literature: T. Connolly and C. Begg, Database systems: a practical approach to design, implementation, and management, 3 rd ed: Addison Wesley, 2002.

Instructors


  • Cé sar Garita +31 (0) 20 525 75 33
  • Ammar Benabdelkader e-mail Me
33 A. Benabdelkader ©Uv. A, 2002

Sample HTML Output 34 A. Benabdelkader ©Uv. A, 2002 Sample HTML Output 34 A. Benabdelkader ©Uv. A, 2002

Summary of Internet-Related Languages q q q q Scripting languages Ø High level languages, Summary of Internet-Related Languages q q q q Scripting languages Ø High level languages, interpreted, calls many functions from the host Hypertext Markup Language (HTML) Ø Scripting (authoring) language for document display through browsers Standard Generalized Markup Language (SGML) Ø 1986 standard, to format, index, and link documents across applications Extensible Markup Language (XML) Ø SGML-based, with customized tags for document sharing/transmission XHTML (to replace HTML in future) Ø An scripting language that extends HTML to make it XML-compliant Java Ø General purpose OO programming language used for the web / applets Java. Script/VBScript (also Perl and PHP) Ø Scripting languages that enable interactivity in HTML documents Cascading Style Sheets - CSS (also XSLT) Ø W 3 C suggested formats for the appearance of Web page elements in HML documents 35 Hoffer © Prentice Hall, 2002

Basics of Internet, Intranet, and Extranet Internet - Worldwide collection of interconnected networks q Basics of Internet, Intranet, and Extranet Internet - Worldwide collection of interconnected networks q Intranet - Web site or group of sites belonging to an organization, accessible only by members of that organization (via a dedicated line or not) q Extranet - An intranet that is partially accessible to authorized outsiders q Whereas intranet resides behind firewall and is accessible only to people who are members of the same organization, Extranet provides various levels of accessibility to outsiders 36 Connolly © Addison Wesley, 2002

Database-enabled intranet-internet environment Clients Server 37 Hoffer © Prentice Hall, 2002 Database-enabled intranet-internet environment Clients Server 37 Hoffer © Prentice Hall, 2002