Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "1 PROJECT Web-based Database Applications Lecture 2: Web-based Databases Environment."— Presentation transcript:

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

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

3 3 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 Connolly © Addison Wesley, 2002

4 4 Basic Components of Web Environment  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 Connolly © Addison Wesley, 2002

5 5 Summary of Basic Internet concepts - 1  World Wide Web (WWW)  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

6 6 Summary of Basic Internet concepts - 2  Browser  Software that displays the HTML documents and supports users with execution of commands and accessing databases  Web Server  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) Hoffer © Prentice Hall, 2002

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

8 8 E-Commerce / E-Business & Internet  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  Electronic Commerce (e-commerce)  Internet based business transactions  buying or selling goods or services electronically  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 © H. Afsarmansesh, 2003

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

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

11 11 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

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

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

14 14 Web Servers functionality  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 cache some response pages Hoffer © Prentice Hall, 2002

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

16 16 Client-Side Extensions  Adding functionality to the browser  Plug-ins  HW / SW modules that extend the browser capabilities, by adding features (such as encryption, animation, wireless access, etc.)  Cookies  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  ActiveX (microsoft) –like extensions  Components that allow some data manipulation inside the Browser Hoffer © Prentice Hall, 2002

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

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

19 19 IP addresses and DNS  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.  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).www.science.uva.nl  Domain name servers maintain an index of the IP addresses and their matching domain names. © H. Afsarmansesh, 2003

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

21 21 URLs - 2  URL consists of some basic parts:  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 Connolly © Addison Wesley, 2002

22 22 HyperText Transfer Protocol (HTTP) - 1 It is based on request-response paradigm: Connection Connection: Client establishes connection with Web Server 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 Protocol used to transfer Web pages through Internet, between WWW server and clients programs Connolly © Addison Wesley, 2002

23 23 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  HTTPS is a more secure version, providing encryption and transmission through a secure net.  TCP/IP (Transmission Control Protocol / Internet Protocol) is used as the base for HTTP  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. Connolly © Addison Wesley, 2002

24 24 Sample HTTP Client Request / Response GET /index.html User-Agent: Mozilla/4.01Gold (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:59 GMT Content-Type: text/html Content-Length: 1354 Happy New Millennium! (more file contents)

25 25 HyperText Markup Language (HTML)  A simple, yet powerful, platform-independent document language  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 Document formatting language used to design most Web pages Connolly © Addison Wesley, 2002

26 26 HTML - Common Tags Databases & Web-based Applications …………. Welcome to Our Web Site! …………. Tag Pair A. Benabdelkader ©UvA, 2002

27 27 HTML - Text Styling (formatting) 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. Welcome to Our Web Site! As A. Benabdelkader ©UvA, 2002 Macro command

28 28 HTML - Headers Level 1 Header Level 2 header Level 3 header Level 4 header Level 5 header Level 6 header HTML CodeHTML Output A. Benabdelkader ©UvA, 2002

29 29 HTML – Linking Web Site Link Email Link My email address is my email. Yahoo: Go to Yahoo A. Benabdelkader ©UvA, 2002 Link command

30 30 HTML – Forms (structured input box) Input Form Database Name: A. Benabdelkader ©UvA, 2002

31 31 HTML - Special Characters All information on this site is © Deitel & Associates, 1999. &copy for copyrights symbol c &amp for the symbol & A. Benabdelkader ©UvA, 2002

32 32 HTML- FONTs, IMAGEs, … We have designed this site to teach about the wonders of HTML. <IMG SRC = "deitel.gif" BORDER = "1" HEIGHT = "144" WIDTH = "200" ALT = "Harvey and Paul Deitel"> A. Benabdelkader ©UvA, 2002  FONT  IMAGE

33 33 Databases & Web-based Applications Databases & Web-based Applications Objectives Application of modern database architectures and data access mechanisms, … Directed to: 2e jaars bedrijfsinformatiesystemen ………... Other Literature: T. Connolly and C. Begg, Database systems: a practical approach to design, implementation, and management, 3rd ed: Addison Wesley, 2002. Instructors César Garita +31 (0) 20 525 75 33 Ammar Benabdelkader e-mail Me A. Benabdelkader ©UvA, 2002 Sample HTML Code

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

35 35 Summary of Internet-Related Languages  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  JavaScript/VBScript  JavaScript/VBScript (also Perl and PHP)  Scripting languages that enable interactivity in HTML documents  Cascading Style Sheets - CSS (also XSLT)  W3C suggested formats for the appearance of Web page elements in HML documents Hoffer © Prentice Hall, 2002

36 36 Basics of Internet, Intranet, and Extranet  Internet - Worldwide collection of interconnected networks  Intranet - Web site or group of sites belonging to an organization, accessible only by members of that organization (via a dedicated line or not)  Extranet- An intranet that is partially accessible to authorized outsiders 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 Connolly © Addison Wesley, 2002

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


Download ppt "1 PROJECT Web-based Database Applications Lecture 2: Web-based Databases Environment."

Similar presentations


Ads by Google