Chapter 8:Application Design and Development User Interfaces and Tools Web Interfaces to Databases Web Fundamentals Servlets and JSP Building Large Web Applications Triggers Authorization in SQL Application Security Database System Concepts-5th Edition,Oct 23,2006. 8.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.2 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Chapter 8: Application Design and Development User Interfaces and Tools Web Interfaces to Databases Web Fundamentals Servlets and JSP Building Large Web Applications Triggers Authorization in SQL Application Security
User Interfaces and Tools Most database users do not use a query language like SQL Forms Graphical user interfaces Report generators Data analysis tools(see Chapter 18) Many interfaces are Web-based Back-end (Web server)uses such technologies as Java servlets Java Server Pages(JSP) Active Server Pages (ASP) Database System Concepts-5thEdition,Oct 23,2006. 8.3 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.3 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. User Interfaces and Tools Most database users do not use a query language like SQL. Forms Graphical user interfaces Report generators Data analysis tools (see Chapter 18) Many interfaces are Web-based Back-end (Web server) uses such technologies as Java servlets Java Server Pages (JSP) Active Server Pages (ASP)
The World Wide Web The Web is a distributed information system based on hypertext. Most Web documents are hypertext documents formatted via the HyperText Markup Language(HTML) HTML documents contain text along with font specifications,and other formatting instructions hypertext links to other documents,which can be associated with regions of the text. forms,enabling users to enter data which can then be sent back to the Web server Database System Concepts-5th Edition,Oct 23,2006. 8.4 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.4 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. The World Wide Web The Web is a distributed information system based on hypertext. Most Web documents are hypertext documents formatted via the HyperText Markup Language (HTML) HTML documents contain text along with font specifications, and other formatting instructions hypertext links to other documents, which can be associated with regions of the text. forms, enabling users to enter data which can then be sent back to the Web server
A formatted report Acme Supply Company,Inc. Quarterly Sales Report Period:Jan.I to March 31,2005 Region Category Sales Subtotal North Computer Hardware 1,000000 Computer Software 500,000 All categories 1500.000 South Computer Hardware 200.000 Computer Software 400000 All categories 600.000 Total Sales 2.100,000 Database System Concepts-5th Edition,Oct 23,2006. 8.5 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.5 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. A formatted report
Web Interfaces to Databases Why interface databases to the Web? 1.Web browsers have become the de-facto standard user interface to databases Enable large numbers of users to access databases from anywhere Avoid the need for downloading/installing specialized code,while providing a good graphical user interface Examples:banks,airline and rental car reservations,university course registration and grading,an so on. Database System Concepts-5th Edition,Oct 23,2006. 8.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.6 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Web Interfaces to Databases Why interface databases to the Web? 1. Web browsers have become the de-facto standard user interface to databases Enable large numbers of users to access databases from anywhere Avoid the need for downloading/installing specialized code, while providing a good graphical user interface Examples: banks, airline and rental car reservations, university course registration and grading, an so on
Web Interfaces to Database (Cont.) 2.Dynamic generation of documents Limitations of static HTML documents Cannot customize fixed Web documents for individual users. Problematic to update Web documents,especially if multiple Web documents replicate data. Solution:Generate Web documents dynamically from data stored in a database. Can tailor the display based on user information stored in the database. E.g.tailored ads,tailored weather and local news,.. Displayed information is up-to-date,unlike the static Web pages -E.g.stock market information,. Database System Concepts-5th Edition,Oct 23,2006. 8.7 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.7 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Web Interfaces to Database (Cont.) 2. Dynamic generation of documents Limitations of static HTML documents Cannot customize fixed Web documents for individual users. Problematic to update Web documents, especially if multiple Web documents replicate data. Solution: Generate Web documents dynamically from data stored in a database. Can tailor the display based on user information stored in the database. – E.g. tailored ads, tailored weather and local news, … Displayed information is up-to-date, unlike the static Web pages – E.g. stock market information,
Uniform Resources Locators In the Web,functionality of pointers is provided by Uniform Resource Locators (URLs). URL example: http://www.bell-labs.com/topics/book/db-book The first part indicates how the document is to be accessed "http"indicates that the document is to be accessed using the Hyper Text Transfer Protocol. The second part gives the unique name of a machine on the Internet. The rest of the URL identifies the document within the machine. The local identification can be: The path name of a file on the machine,or An identifier(path name)of a program,plus arguments to be passed to the program -E.g.http://www.google.com/search?q=silberschatz Database System Concepts-5th Edition,Oct 23,2006. 8.8 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.8 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Uniform Resources Locators In the Web, functionality of pointers is provided by Uniform Resource Locators (URLs). URL example: http://www.bell-labs.com/topics/book/db-book The first part indicates how the document is to be accessed “http” indicates that the document is to be accessed using the Hyper Text Transfer Protocol. The second part gives the unique name of a machine on the Internet. The rest of the URL identifies the document within the machine. The local identification can be: The path name of a file on the machine, or An identifier (path name) of a program, plus arguments to be passed to the program – E.g. http://www.google.com/search?q=silberschatz
HTML and HTTP HTML provides formatting,hypertext link,and image display features. HTML also provides input features Select from a set of options -Pop-up menus,radio buttons,check lists Enter values -Text boxes Filled in input sent back to the server,to be acted upon by an executable at the server HyperText Transfer Protocol(HTTP)used for communication with the Web server Database System Concepts-5th Edition,Oct 23,2006. 8.9 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.9 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. HTML and HTTP HTML provides formatting, hypertext link, and image display features. HTML also provides input features Select from a set of options – Pop-up menus, radio buttons, check lists Enter values – Text boxes Filled in input sent back to the server, to be acted upon by an executable at the server HyperText Transfer Protocol (HTTP) used for communication with the Web server
Sample HTML Source Text A-101 Downtown 500 The accountrelation Select account/loan and enter number Account value="Loan"> Loan Database System Concepts-5th Edition,Oct 23,2006. 8.10 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 5 8.10 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Sample HTML Source Text A-101 Downtown 500 … The account relation Select account/loan and enter number Account value=“Loan”> Loan
Display of Sample HTML Source A-101 Downtown 500 A-102 Pemyridge 400 A201 Brighton 900 The acount relation Select account/loan and enter number Account submit Database System Concepts-5th Edition,Oct 23,2006. 8.11 @Silberschatz,Korth and Sudarshan
Database System Concepts - 5 8.11 ©Silberschatz, Korth and Sudarshan th Edition, Oct 23, 2006. Display of Sample HTML Source