Database System Concepts

Size: px
Start display at page:

Download "Database System Concepts"

Transcription

1 Chapter 8(+4): Application Design and Development APIs Web Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2010/2011 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth and Sudarshan.

2 Outline APIs Web APIs ODBC JDBC 4 Web The World Wide Web s and the Web

3 Outline APIs Web APIs 4 Web

4 User Interfaces and Tools APIs Web Most database users do not use a query language like Forms Graphical user interfaces Report generators Data analysis tools can embed or execute Many interfaces are Web-based Client-side: Javascript, Applets,... Server-side: Java Server Pages (JSP), Active Server Pages (ASP),...

5 Application Architectures APIs Web can be built using one of two architectures: Two tier model Application programs running at user site communicate directly with the database Three tier model User programs running at user sites communicate with an application server The application server in turn communicates with the database

6 Two-Tier Architecture APIs Web

7 Three-Tier Architecture APIs Web

8 Two-Tier Web-Based Architecture APIs Web

9 Two-tier Model APIs Web Example: Java code runs at client site and uses JDBC to communicate with the server Benefits: flexible, need not be restricted to predefined queries Problems: Security: all database operations possible More code shipped to client Not appropriate across organizations, or in large ones like universities

10 Three-tier Model APIs Web Example: Web client + Java Servlet using JDBC to talk with database server Benefits: Security handled by application at server Simple client Distributed system Problems: Performance issues Network-dependent Only packaged transactions

11 Outline APIs Web APIs 4 Web

12 APIs Web The standard defines embeddings of in a variety of programming languages such as C, Java, and Cobol A language to which queries are embedded is referred to as a host language, and the structures permitted in the host language comprise embedded EXEC statement is used to identify embedded request to the preprocessor EXEC <embedded statement>; Note: this varies by language (for example, the Java embedding uses # {... };)

13 Example APIs Web Find the names and cities of customers with more than a given amount of dollars in their accounts EXEC BEGIN DECLARE SECTION; double amount; char name[50]; char city[50]; EXEC END DECLARE SECTION;

14 Example (cont.) APIs Web Find the names and cities of customers with more than a given amount of dollars in their accounts amount = 100; EXEC declare c cursor for select depositor.customer name, customer city from depositor, customer, account where depositor.customer name = customer.customer name and depositoraccount number = account.account number and account.balance > :amount;

15 Example (cont.) APIs Web Find the names and cities of customers with more than a given amount of dollars in their accounts EXEC open c; do { EXEC fetch c into :name, :city; if (CODE! = 0) break; printf("%s, %s\n", name, city); } while (1); EXEC close c;

16 Updates through Cursors APIs Web Can update tuples fetched by cursor by declaring that the cursor is for update declare c cursor for select from account where branch name = Perryridge for update To update the tuple at the current location of cursor c update account set balance = balance where current of c

17 Dynamic APIs Web Allows programs to construct and submit queries at run time Example: char sqlprog[100] = "update account " "set balance = balance * 1.05 " "where account number =?"; EXEC prepare dynprog from :sqlprog; char account[10] = A-101 ; EXEC execute dynprog using :account; The dynamic program contains a?, which is a place holder for a value that is provided when the program is executed

18 Outline APIs ODBC JDBC Web APIs ODBC JDBC 4 Web

19 APIs APIs ODBC JDBC Web API (application-program interface) for a program to interact with a database server Application makes calls to Connect with the database server Send commands to the database server Fetch tuples of result one-by-one into program variables ODBC (Open Connectivity) works with C, C++, C#,... JDBC (Java Connectivity) works with Java

20 ODBC APIs ODBC JDBC Web Open DataBase Connectivity (ODBC) standard Standard for application programs to communicate with a database server Application program interface (API) to open a connection with a database, send queries and updates, get back results. such as GUI, spreadsheets, etc. can use ODBC Each database system supporting ODBC provides a driver library that must be linked with the client program. When client program makes an ODBC API call, the code in the library communicates with the server to carry out the requested action, and fetch results.

21 Connecting to the APIs ODBC JDBC Web int ODBCexample() { RETCODE error; HENV env; /*environment*/ HDBC conn; /*database connection*/ AllocEnv(&env); AllocConnect(env, conn); Connect(conn, tagus.ist.utl.pt, NTS, user, NTS, userpasswd, NTS); /*program code*/ } Disconnect(conn); FreeConnect(conn); FreeEnv(env);

22 Executing Statements APIs ODBC JDBC Web char branchname[80]; float balance; int lenout1, lenout2; HSTMT stmt; AllocStmt(conn, &stmt); char sqlquery[] = "select branch name, sum(balance) from account group by branch name"; error = ExecDirect(stmt, sqlquery, NTS); if (error == SUCCESS) { BindCol(stmt, 1, C CHAR, branchname, 80, &lenout1) BindCol(stmt, 2, C FLOAT, &balance, 0, &lenout2); while (Fetch(stmt) >= SUCCESS) { printf ("%s %g", branchname, balance); } } FreeStmt(stmt, DROP);

23 More ODBC Features APIs ODBC JDBC Web Prepared Statements statements compiled at the database insert into account values(?,?,?) Repeatedly executed with actual values for the placeholders (? ) Metadata features finding all the relations in the database and finding the names and types of columns of a query result or a relation in the database. Control over transactions Can turn off automatic commit on a connection transactions must then be committed or rolled back explicitly

24 JDBC APIs ODBC JDBC Web JDBC is a Java API for communicating with database systems supporting JDBC supports a variety of features for querying and updating data, and for retrieving query results JDBC also supports metadata retrieval, such as querying about relations present in the database and the names and types of relation attributes Model for communicating with the database: Open a connection Create a statement object Execute queries using the statement object to send queries and fetch results Exception mechanism to handle errors

25 Connecting to the APIs ODBC JDBC Web public static void JDBCexample(String userid,string passwd) { try { Class.forName( com.mysql.jdbc.driver ); Connection conn = DriverManager.getConnection( jdbc:mysql://tagus.ist.utl.pt/database, userid, passwd); Statement stmt = conn.createstatement(); } /*program code*/ stmt.close(); conn.close(); } catch (Exception sqle) {.out.println("exception: } "+ sqle);

26 Executing Statements APIs ODBC JDBC Web ResultSet rset = stmt.executequery( "select branch name, avg(balance) from account group by branch name"); while (rset.next()) {.out.println(rset.getstring( branch name ) + + rset.getfloat(2)); } try { stmt.executeupdate( "insert into account values( A-9732, Perryridge, 1 } catch (Exception sqle) {.out.println("could not insert tuple. "+ sqle); }

27 Prepared Statements APIs ODBC JDBC Web PreparedStatement s; s = conn.preparestatement ( "insert into account values(?,?,?)"); s.setstring(1, A-9732 ); s.setstring(2, Perryridge ); s.setfloat(3, 1200); s.executeupdate(); s.close(); Plus all the other features of ODBC...

28 Outline APIs Web The World Wide Web s and the Web APIs 4 Web The World Wide Web s and the Web

29 The World Wide Web APIs Web The World Wide Web s and the 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

30 HTML and HTTP APIs Web The World Wide Web s and the Web 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

31 Sample HTML Source Code APIs Web The World Wide Web s and the Web <html> <body> <table border cols = 3> <tr><td>a-101</td><td>downtown</td><td>500</td>< <tr><td>a-102</td><td>perryridge</td><td>400</td> <tr><td>a-201</td><td>brighton</td><td>900</td>< </table> <center>the <i>account</i> relation</center> <form action="bankquery" method=get> Select account/loan and enter number<br> <select name="type"> <option value="account" selected>account</option> <option value="loan">loan</option> </select> <input type=text size=5 name="number"> <input type=submit value="submit"> </form> </body> </html>

32 Sample HTML Display APIs Web The World Wide Web s and the Web

33 Uniform Resources Locators APIs Web The World Wide Web s and the Web In the Web, functionality of pointers is provided by Uniform Resource Locators (URLs). URL example: The first part indicates how the document is to be accessed 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.:

34 Web Servers APIs Web The World Wide Web s and the Web A Web server can easily serve as a front end to a variety of information services The document name in a URL may identify an executable program, that, when run, generates a HTML document When a HTTP server receives a request for such a document, it executes the program, and sends back the HTML document that is generated The Web client can pass extra arguments with the name of the document To install a new service on the Web, one simply needs to create and install an executable that provides that service. The Web browser provides a graphical user interface to the information service Common Gateway Interface (CGI): a standard interface between web and application server

35 HTTP and Sessions APIs Web The World Wide Web s and the Web The HTTP protocol is connectionless That is, once the server replies to a request, the server closes the connection with the client, and forgets all about the request In contrast, Unix logins, and JDBC/ODBC connections stay connected until the client disconnects retaining user authentication and other information Motivation: reduces load on server operating systems have tight limits on number of open connections on a machine Information services need session information E.g. user authentication should be done only once per session Solution: use a cookie

36 Sessions and Cookies APIs Web The World Wide Web s and the Web A cookie is a small piece of text containing identifying information Sent by server to browser on first interaction Sent by browser to the server that created the cookie on further interactions part of the HTTP protocol Server saves information about cookies it issued, and can use it when serving a request E.g., authentication information, and user preferences Cookies can be stored permanently or for a limited time

37 Web Interfaces to s APIs Web The World Wide Web s and the Web 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, etc. However, static HTML documents are limited: Cannot customize fixed Web documents for individual users; Problematic to update Web documents, especially if multiple Web documents replicate data.

38 Dynamic Generation of Web Documents APIs Web The World Wide Web s and the Web Solution: generate Web documents dynamically from data stored in a database Can tailor the display based on user information stored in the database Example: tailored ads, tailored weather and local news,... Displayed information is up-to-date Example: stock market information, prices,...

39 Common Gateway Interface (CGI) APIs Web The World Wide Web s and the Web Standard protocol for interfacing external application software with an information server Certain locations are defined to be served by a CGI program Whenever a request to a matching URL is received, the corresponding program is called However, the overhead of spawning new processes for every request can be overwhelming Solution: use compiled languages use client side scripting integrate language interpreters into the server optimize the server (use caching,...) Note: all this solutions have both advantages and disadvantages

40 Servlets APIs Web The World Wide Web s and the Web Java Servlet specification defines an API for communication between the Web server and application program E.g. methods to get parameter values and to send HTML text back to client Application program (also called a servlet) is loaded into the Web server Two-tier model Each request spawns a new thread in the Web server thread is closed once the request is serviced Servlet API provides a getsession() method Sets a cookie on first interaction with browser, and uses it to identify session on further interactions Provides methods to store and look-up per-session information E.g. user name, preferences,...

41 Example Servlet Code APIs Web The World Wide Web s and the Web Public class BankQueryServlet extends HttpServlet { public void doget(httpservletrequest request, HttpServletResponse result) throws ServletException, IOException { String type = request.getparameter( type ); String number = request.getparameter( number ); } } /*...code to find the loan amount/account balance...*/ /*...using JDBC to communicate with the database...*/ /*...we assume the value is stored in the variable balance...*/ result.setcontenttype( text/html ); PrintWriter out = result.getwriter(); out.println( < HEAD >< TITLE > QueryResult < /TITLE >< /H out.println( < BODY > ); out.println( Balanceon + type + number + = +balance); out.println( < /BODY > ); out.close();

42 Server-Side Scripting APIs Web The World Wide Web s and the Web Server-side scripting simplifies the task of connecting a database to the Web Define a HTML document with embedded executable code/ queries. Input values from HTML forms can be used directly in the embedded code/ queries. When the document is requested, the Web server executes the embedded code/ queries to generate the actual HTML document. Numerous server-side scripting languages JSP, Server-side Javascript, PHP, Jscript,... General purpose scripting languages: Perl, Python,...

43 Client Side Scripting and Applets APIs Web The World Wide Web s and the Web Browsers can fetch certain scripts (client-side scripts) or programs along with documents, and execute them in safe mode at the client site Javascript Macromedia Flash and Shockwave for animation/games VRML Applets Client-side scripts/programs allow documents to be active E.g., animation by executing programs at the local site E.g. ensure that values entered by users satisfy some correctness checks Permit flexible interaction with the user. Executing programs at the client site speeds up interaction by avoiding many round trips to server

44 Client Side Scripting and Security APIs Web The World Wide Web s and the Web Security mechanisms needed to ensure that malicious scripts do not cause damage to the client machine Easy for limited capability scripting languages, harder for general purpose programming languages like Java Example: Java s security system ensures that the Java applet code does not make any system calls directly Disallows dangerous actions such as file writes Notifies the user about potentially dangerous actions, and allows the option to abort the program or to continue execution

45 APIs Web The World Wide Web s and the Web End of Chapter 8(+4)

Database Programming. Week 10-2. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford

Database Programming. Week 10-2. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford Database Programming Week 10-2 *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford SQL in Real Programs We have seen only how SQL is used at the generic query

More information

Web Pages. Static Web Pages SHTML

Web Pages. Static Web Pages SHTML 1 Web Pages Htm and Html pages are static Static Web Pages 2 Pages tagged with "shtml" reveal that "Server Side Includes" are being used on the server With SSI a page can contain tags that indicate that

More information

ACM Crossroads Student Magazine The ACM's First Electronic Publication

ACM Crossroads Student Magazine The ACM's First Electronic Publication Page 1 of 8 ACM Crossroads Student Magazine The ACM's First Electronic Publication Crossroads Home Join the ACM! Search Crossroads crossroads@acm.org ACM / Crossroads / Columns / Connector / An Introduction

More information

2. Follow the installation directions and install the server on ccc

2. Follow the installation directions and install the server on ccc Installing a Web Server 1. Install a sample web server, which supports Servlets/JSPs. A light weight web server is Apache Tomcat server. You can get the server from http://tomcat.apache.org/ 2. Follow

More information

Chapter 4: SQL. Schema Used in Examples

Chapter 4: SQL. Schema Used in Examples Chapter 4: SQL Basic Structure Set Operations Aggregate Functions Null Values Nested Subqueries Derived Relations Views Modification of the Database Joined Relations Data Definition Language Embedded SQL,

More information

7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,...

7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,... 7 Web Databases Access to Web Databases: Servlets, Applets Java Server Pages PHP, PEAR Languages: Java, PHP, Python,... Prof. Dr. Dietmar Seipel 837 7.1 Access to Web Databases by Servlets Java Servlets

More information

Chapter 4: SQL. Schema Used in Examples. Basic Structure. The select Clause. modifications and enhancements! A typical SQL query has the form:

Chapter 4: SQL. Schema Used in Examples. Basic Structure. The select Clause. modifications and enhancements! A typical SQL query has the form: Chapter 4: SQL Schema Used in Examples! Basic Structure! Set Operations! Aggregate Functions! Null Values! Nested Subqueries! Derived Relations! Views! Modification of the Database! Joined Relations! Data

More information

What is ODBC? Database Connectivity ODBC, JDBC and SQLJ. ODBC Architecture. More on ODBC. JDBC vs ODBC. What is JDBC?

What is ODBC? Database Connectivity ODBC, JDBC and SQLJ. ODBC Architecture. More on ODBC. JDBC vs ODBC. What is JDBC? What is ODBC? Database Connectivity ODBC, JDBC and SQLJ CS2312 ODBC is (Open Database Connectivity): A standard or open application programming interface (API) for accessing a database. SQL Access Group,

More information

CS 377 Database Systems SQL Programming. Li Xiong Department of Mathematics and Computer Science Emory University

CS 377 Database Systems SQL Programming. Li Xiong Department of Mathematics and Computer Science Emory University CS 377 Database Systems SQL Programming Li Xiong Department of Mathematics and Computer Science Emory University 1 A SQL Query Joke A SQL query walks into a bar and sees two tables. He walks up to them

More information

SQL is capable in manipulating relational data SQL is not good for many other tasks

SQL is capable in manipulating relational data SQL is not good for many other tasks Embedded SQL SQL Is Not for All SQL is capable in manipulating relational data SQL is not good for many other tasks Control structures: loops, conditional branches, Advanced data structures: trees, arrays,

More information

15-415 Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System

15-415 Database Applications Recitation 10. Project 3: CMUQFlix CMUQ s Movies Recommendation System 15-415 Database Applications Recitation 10 Project 3: CMUQFlix CMUQ s Movies Recommendation System Project Objective 1. Set up a front-end website with PostgreSQL back-end 2. Allow users to login, like

More information

Announcements. Comments on project proposals will go out by email in next couple of days...

Announcements. Comments on project proposals will go out by email in next couple of days... Announcements Comments on project proposals will go out by email in next couple of days... 3-Tier Using TP Monitor client application TP monitor interface (API, presentation, authentication) transaction

More information

Database Access from a Programming Language: Database Access from a Programming Language

Database Access from a Programming Language: Database Access from a Programming Language Database Access from a Programming Language: Java s JDBC Werner Nutt Introduction to Databases Free University of Bozen-Bolzano 2 Database Access from a Programming Language Two Approaches 1. Embedding

More information

Database Access from a Programming Language:

Database Access from a Programming Language: Database Access from a Programming Language: Java s JDBC Werner Nutt Introduction to Databases Free University of Bozen-Bolzano 2 Database Access from a Programming Language Two Approaches 1. Embedding

More information

Real SQL Programming 1

Real SQL Programming 1 Real 1 We have seen only how SQL is used at the generic query interface an environment where we sit at a terminal and ask queries of a database. Reality is almost always different: conventional programs

More information

The JAVA Way: JDBC and SQLJ

The JAVA Way: JDBC and SQLJ The JAVA Way: JDBC and SQLJ David Toman School of Computer Science University of Waterloo Introduction to Databases CS348 David Toman (University of Waterloo) JDBC/SQLJ 1 / 21 The JAVA way to Access RDBMS

More information

ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT

ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT ASP.NET: THE NEW PARADIGM FOR WEB APPLICATION DEVELOPMENT Dr. Mike Morrison, University of Wisconsin-Eau Claire, morriscm@uwec.edu Dr. Joline Morrison, University of Wisconsin-Eau Claire, morrisjp@uwec.edu

More information

Building Java Servlets with Oracle JDeveloper

Building Java Servlets with Oracle JDeveloper Building Java Servlets with Oracle JDeveloper Chris Schalk Oracle Corporation Introduction Developers today face a formidable task. They need to create large, distributed business applications. The actual

More information

SQL and programming languages

SQL and programming languages SQL and programming languages SET08104 Database Systems Copyright Napier University Slide 1/14 Pure SQL Pure SQL: Queries typed at an SQL prompt. SQL is a non-procedural language. SQL specifies WHAT, not

More information

COSC344 Database Theory and Applications. Java and SQL. Lecture 12

COSC344 Database Theory and Applications. Java and SQL. Lecture 12 COSC344 Database Theory and Applications Lecture 12: Java and SQL COSC344 Lecture 12 1 Last Lecture Trigger Overview This Lecture Java & SQL Source: Lecture notes, Textbook: Chapter 12 JDBC documentation

More information

Java and Databases. COMP514 Distributed Information Systems. Java Database Connectivity. Standards and utilities. Java and Databases

Java and Databases. COMP514 Distributed Information Systems. Java Database Connectivity. Standards and utilities. Java and Databases Java and Databases COMP514 Distributed Information Systems Java Database Connectivity One of the problems in writing Java, C, C++,, applications is that the programming languages cannot provide persistence

More information

Web Application Development

Web Application Development Web Application Development Introduction Because of wide spread use of internet, web based applications are becoming vital part of IT infrastructure of large organizations. For example web based employee

More information

INTRODUCTION TO WEB TECHNOLOGY

INTRODUCTION TO WEB TECHNOLOGY UNIT-I Introduction to Web Technologies: Introduction to web servers like Apache1.1, IIS, XAMPP (Bundle Server), WAMP Server(Bundle Server), handling HTTP Request and Response, installation of above servers

More information

Web Container Components Servlet JSP Tag Libraries

Web Container Components Servlet JSP Tag Libraries Web Application Development, Best Practices by Jeff Zhuk, JavaSchool.com ITS, Inc. dean@javaschool.com Web Container Components Servlet JSP Tag Libraries Servlet Standard Java class to handle an HTTP request

More information

Web Cloud Architecture

Web Cloud Architecture Web Cloud Architecture Introduction to Software Architecture Jay Urbain, Ph.D. urbain@msoe.edu Credits: Ganesh Prasad, Rajat Taneja, Vikrant Todankar, How to Build Application Front-ends in a Service-Oriented

More information

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java

Java EE Introduction, Content. Component Architecture: Why and How Java EE: Enterprise Java Java EE Introduction, Content Component Architecture: Why and How Java EE: Enterprise Java The Three-Tier Model The three -tier architecture allows to maintain state information, to improve performance,

More information

Database System Concepts

Database System Concepts s Design Chapter 1: Introduction Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2008/2009 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth

More information

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner 1 vk» Java 7 Recipes (,\['«** - < g!p#«josh Juneau Carl Dea Freddy Guime John O'Conner Contents J Contents at a Glance About the Authors About the Technical Reviewers Acknowledgments Introduction iv xvi

More information

Java Server Pages and Java Beans

Java Server Pages and Java Beans Java Server Pages and Java Beans Java server pages (JSP) and Java beans work together to create a web application. Java server pages are html pages that also contain regular Java code, which is included

More information

Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf

Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 1 The Web, revisited WEB 2.0 marco.ronchetti@unitn.it Credits: Some of the slides are based on material adapted from www.telerik.com/documents/telerik_and_ajax.pdf 2 The old web: 1994 HTML pages (hyperlinks)

More information

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław

Computer Networks. Lecture 7: Application layer: FTP and HTTP. Marcin Bieńkowski. Institute of Computer Science University of Wrocław Computer Networks Lecture 7: Application layer: FTP and Marcin Bieńkowski Institute of Computer Science University of Wrocław Computer networks (II UWr) Lecture 7 1 / 23 Reminder: Internet reference model

More information

ICS 434 Advanced Database Systems

ICS 434 Advanced Database Systems ICS 434 Advanced Database Systems Dr. Abdallah Al-Sukairi sukairi@kfupm.edu.sa Second Semester 2003-2004 (032) King Fahd University of Petroleum & Minerals Information & Computer Science Department Outline

More information

Java Application Developer Certificate Program Competencies

Java Application Developer Certificate Program Competencies Java Application Developer Certificate Program Competencies After completing the following units, you will be able to: Basic Programming Logic Explain the steps involved in the program development cycle

More information

Internet Technologies_1. Doc. Ing. František Huňka, CSc.

Internet Technologies_1. Doc. Ing. František Huňka, CSc. 1 Internet Technologies_1 Doc. Ing. František Huňka, CSc. Outline of the Course 2 Internet and www history. Markup languages. Software tools. HTTP protocol. Basic architecture of the web systems. XHTML

More information

CS/CE 2336 Computer Science II

CS/CE 2336 Computer Science II CS/CE 2336 Computer Science II UT D Session 23 Database Programming with Java Adapted from D. Liang s Introduction to Java Programming, 8 th Ed. and other sources 2 Database Recap Application Users Application

More information

Web application development landscape: technologies and models

Web application development landscape: technologies and models Web application development landscape: technologies and models by Andrea Nicchi Relatore: Prof. Antonio CISTERNINO Controrelatore: Prof. Giuseppe ATTARDI WEB APPLICATION an Information System providing

More information

Chapter 1 Programming Languages for Web Applications

Chapter 1 Programming Languages for Web Applications Chapter 1 Programming Languages for Web Applications Introduction Web-related programming tasks include HTML page authoring, CGI programming, generating and parsing HTML/XHTML and XML (extensible Markup

More information

CS346: Database Programming. http://warwick.ac.uk/cs346

CS346: Database Programming. http://warwick.ac.uk/cs346 CS346: Database Programming http://warwick.ac.uk/cs346 1 Database programming Issue: inclusionofdatabasestatementsinaprogram combination host language (general-purpose programming language, e.g. Java)

More information

EVALUATION OF SERVER-SIDE TECHNOLOGY FOR WEB DEPLOYMENT

EVALUATION OF SERVER-SIDE TECHNOLOGY FOR WEB DEPLOYMENT EVALUATION OF SERVER-SIDE TECHNOLOGY FOR WEB DEPLOYMENT Dr. Alexander Pons, University of Miami, apons@miami.edu ABSTRACT The deployment of Web applications consisting of dynamic content requires the selection

More information

OVERVIEW OF ASP. What is ASP. Why ASP

OVERVIEW OF ASP. What is ASP. Why ASP OVERVIEW OF ASP What is ASP Active Server Pages (ASP), Microsoft respond to the Internet/E-Commerce fever, was designed specifically to simplify the process of developing dynamic Web applications. Built

More information

JDBC. It is connected by the Native Module of dependent form of h/w like.dll or.so. ex) OCI driver for local connection to Oracle

JDBC. It is connected by the Native Module of dependent form of h/w like.dll or.so. ex) OCI driver for local connection to Oracle JDBC 4 types of JDBC drivers Type 1 : JDBC-ODBC bridge It is used for local connection. ex) 32bit ODBC in windows Type 2 : Native API connection driver It is connected by the Native Module of dependent

More information

Building Web Applications, Servlets, JSP and JDBC

Building Web Applications, Servlets, JSP and JDBC Building Web Applications, Servlets, JSP and JDBC Overview Java 2 Enterprise Edition (JEE) is a powerful platform for building web applications. The JEE platform offers all the advantages of developing

More information

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture #3 2008 3 Apache.

Web. Services. Web Technologies. Today. Web. Technologies. Internet WWW. Protocols TCP/IP HTTP. Apache. Next Time. Lecture #3 2008 3 Apache. JSP, and JSP, and JSP, and 1 2 Lecture #3 2008 3 JSP, and JSP, and Markup & presentation (HTML, XHTML, CSS etc) Data storage & access (JDBC, XML etc) Network & application protocols (, etc) Programming

More information

Fig (1) (a) Server-side scripting with PHP. (b) Client-side scripting with JavaScript.

Fig (1) (a) Server-side scripting with PHP. (b) Client-side scripting with JavaScript. Client-Side Dynamic Web Page Generation CGI, PHP, JSP, and ASP scripts solve the problem of handling forms and interactions with databases on the server. They can all accept incoming information from forms,

More information

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Brief Course Overview An introduction to Web development Server-side Scripting Web Servers PHP Client-side Scripting HTML & CSS JavaScript &

More information

Outline. CIW Web Design Specialist. Course Content

Outline. CIW Web Design Specialist. Course Content CIW Web Design Specialist Description The Web Design Specialist course (formerly titled Design Methodology and Technology) teaches you how to design and publish Web sites. General topics include Web Site

More information

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications

1. Introduction. 2. Web Application. 3. Components. 4. Common Vulnerabilities. 5. Improving security in Web applications 1. Introduction 2. Web Application 3. Components 4. Common Vulnerabilities 5. Improving security in Web applications 2 What does World Wide Web security mean? Webmasters=> confidence that their site won

More information

Precondition for a good understanding: knowledge of a higher programming language (e.g. C, Java, Perl, Pascal, Basic,... ) basic knowledge of html

Precondition for a good understanding: knowledge of a higher programming language (e.g. C, Java, Perl, Pascal, Basic,... ) basic knowledge of html Some Remarks about Dynamic Webpages Matthias K. Krause Hochschule für Telekommunikation, Leipzig University of Applied Sciences Deutsche Telekom krause@hft-leipzig.de Precondition for a good understanding:

More information

CHAPTER 3. Relational Database Management System: Oracle. 3.1 COMPANY Database

CHAPTER 3. Relational Database Management System: Oracle. 3.1 COMPANY Database 45 CHAPTER 3 Relational Database Management System: Oracle This chapter introduces the student to the basic utilities used to interact with Oracle DBMS. The chapter also introduces the student to programming

More information

Web Application Development on a Linux System With a DB2 Database By Alan Andrea

Web Application Development on a Linux System With a DB2 Database By Alan Andrea Web Application Development on a Linux System With a DB2 Database By Alan Andrea Linux, for a long time now, has been a robust and solid platform for deploying and developing complex applications. Furthermore,

More information

JDBC (Java / SQL Programming) CS 377: Database Systems

JDBC (Java / SQL Programming) CS 377: Database Systems JDBC (Java / SQL Programming) CS 377: Database Systems JDBC Acronym for Java Database Connection Provides capability to access a database server through a set of library functions Set of library functions

More information

CIM Courses for Creating Web Pages http://cim.saddleback.edu/certificate

CIM Courses for Creating Web Pages http://cim.saddleback.edu/certificate CIM Courses for Creating Web Pages http://cim.saddleback.edu/certificate Summary of Technologies (i.e., DHTML, /MySQL & Java) & relevant courses to Create Web Pages using Adobe Applications Outline Web

More information

An introduction to web programming with Java

An introduction to web programming with Java Chapter 1 An introduction to web programming with Java Objectives Knowledge Objectives (continued) The first page of a shopping cart application The second page of a shopping cart application Components

More information

Agenda. Summary of Previous Session. Application Servers G22.3033-011. Session 3 - Main Theme Page-Based Application Servers (Part II)

Agenda. Summary of Previous Session. Application Servers G22.3033-011. Session 3 - Main Theme Page-Based Application Servers (Part II) Application Servers G22.3033-011 Session 3 - Main Theme Page-Based Application Servers (Part II) Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical

More information

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19 3-Tier Architecture Prepared By Channu Kambalyal Page 1 of 19 Table of Contents 1.0 Traditional Host Systems... 3 2.0 Distributed Systems... 4 3.0 Client/Server Model... 5 4.0 Distributed Client/Server

More information

2. Accessing Databases via the Web

2. Accessing Databases via the Web Supporting Web-Based Database Application Development Quan Xia 1 Ling Feng 2 Hongjun Lu 3 1 National University of Singapore, Singapore, xiaquan@comp.nus.edu.sg 2 Hong Kong Polytechnic University, China,

More information

1. Introduction. 2. Background and Literature Review

1. Introduction. 2. Background and Literature Review 1. Introduction As the number of users on the World Wide Web increases everyday, its use in different areas is also growing. One of the most powerful aspects of the Web is that anybody who has Internet

More information

Web Programming: Announcements. Sara Sprenkle August 3, 2006. August 3, 2006. Assignment 6 due today Project 2 due next Wednesday Review XML

Web Programming: Announcements. Sara Sprenkle August 3, 2006. August 3, 2006. Assignment 6 due today Project 2 due next Wednesday Review XML Web Programming: Java Servlets and JSPs Sara Sprenkle Announcements Assignment 6 due today Project 2 due next Wednesday Review XML Sara Sprenkle - CISC370 2 1 Web Programming Client Network Server Web

More information

Security Code Review- Identifying Web Vulnerabilities

Security Code Review- Identifying Web Vulnerabilities Security Code Review- Identifying Web Vulnerabilities Kiran Maraju, CISSP, CEH, ITIL, SCJP Email: Kiran_maraju@yahoo.com 1 1.1.1 Abstract Security Code Review- Identifying Web Vulnerabilities This paper

More information

Web Design Specialist

Web Design Specialist UKWDA Training: CIW Web Design Series Web Design Specialist Course Description CIW Web Design Specialist is for those who want to develop the skills to specialise in website design and builds upon existing

More information

Applets, RMI, JDBC Exam Review

Applets, RMI, JDBC Exam Review Applets, RMI, JDBC Exam Review Sara Sprenkle Announcements Quiz today Project 2 due tomorrow Exam on Thursday Web programming CPM and servlets vs JSPs Sara Sprenkle - CISC370 2 1 Division of Labor Java

More information

DEVELOPING MULTITHREADED DATABASE APPLICATION USING JAVA TOOLS AND ORACLE DATABASE MANAGEMENT SYSTEM IN INTRANET ENVIRONMENT

DEVELOPING MULTITHREADED DATABASE APPLICATION USING JAVA TOOLS AND ORACLE DATABASE MANAGEMENT SYSTEM IN INTRANET ENVIRONMENT DEVELOPING MULTITHREADED DATABASE APPLICATION USING JAVA TOOLS AND ORACLE DATABASE MANAGEMENT SYSTEM IN INTRANET ENVIRONMENT Raied Salman Computer Information Science, American College of Commerce and

More information

Client/server is a network architecture that divides functions into client and server

Client/server is a network architecture that divides functions into client and server Page 1 A. Title Client/Server Technology B. Introduction Client/server is a network architecture that divides functions into client and server subsystems, with standard communication methods to facilitate

More information

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.

More information

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE

Web Programming II JSP (Java Server Pages) ASP request processing. The Problem. The Problem. Enterprise Application Development using J2EE Enterprise Application Development using J2EE Shmulik London Lecture #6 Web Programming II JSP (Java Server Pages) How we approached it in the old days (ASP) Multiplication Table Multiplication

More information

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development 4 Understanding Web Applications IN THIS CHAPTER 4.1 Understand Web page development 4.2 Understand Microsoft ASP.NET Web application development 4.3 Understand Web hosting 4.4 Understand Web services

More information

Database Connectivity and Server-Side Scripting

Database Connectivity and Server-Side Scripting 12 Database Connectivity and Server-Side Scripting High definition is the state of being well filled with data. Marshall McLuhan, Understanding Media In this chapter, you will learn how to: Define the

More information

Instructor: Betty O Neil

Instructor: Betty O Neil Introduction to Web Application Development, for CS437/637 Instructor: Betty O Neil 1 Introduction: Internet vs. World Wide Web Internet is an interconnected network of thousands of networks and millions

More information

Course Name: Course in JSP Course Code: P5

Course Name: Course in JSP Course Code: P5 Course Name: Course in JSP Course Code: P5 Address: Sh No BSH 1,2,3 Almedia residency, Xetia Waddo Duler Mapusa Goa E-mail Id: ITKP@3i-infotech.com Tel: (0832) 2465556 (0832) 6454066 Course Code: P5 3i

More information

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview

Protocolo HTTP. Web and HTTP. HTTP overview. HTTP overview Web and HTTP Protocolo HTTP Web page consists of objects Object can be HTML file, JPEG image, Java applet, audio file, Web page consists of base HTML-file which includes several referenced objects Each

More information

Development of Web Applications

Development of Web Applications Development of Web Applications Principles and Practice Vincent Simonet, 2013-2014 Université Pierre et Marie Curie, Master Informatique, Spécialité STL 3 Server Technologies Vincent Simonet, 2013-2014

More information

Forms, CGI Objectives. HTML forms. Form example. Form example...

Forms, CGI Objectives. HTML forms. Form example. Form example... The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface (CGI) Later: Servlets Generation of dynamic Web content

More information

Chapter 9, More SQL: Assertions, Views, and Programming Techniques

Chapter 9, More SQL: Assertions, Views, and Programming Techniques Chapter 9, More SQL: Assertions, Views, and Programming Techniques 9.2 Embedded SQL SQL statements can be embedded in a general purpose programming language, such as C, C++, COBOL,... 9.2.1 Retrieving

More information

Modeling Presentation Layers of Web Applications for Testing

Modeling Presentation Layers of Web Applications for Testing Modeling Presentation Layers of Web Applications for Testing Jeff Offutt Software Engineering Volgenau School of Information Technology and Engineering George Mason University Fairfax, VA 22030, USA offutt@gmu.edu

More information

Chapter 27 Hypertext Transfer Protocol

Chapter 27 Hypertext Transfer Protocol Chapter 27 Hypertext Transfer Protocol Columbus, OH 43210 Jain@CIS.Ohio-State.Edu http://www.cis.ohio-state.edu/~jain/ 27-1 Overview Hypertext language and protocol HTTP messages Browser architecture CGI

More information

The Web Web page Links 16-3

The Web Web page Links 16-3 Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic HTML documents Describe several specific HTML tags and their purposes 16-1 Chapter Goals

More information

Course Number: IAC-SOFT-WDAD Web Design and Application Development

Course Number: IAC-SOFT-WDAD Web Design and Application Development Course Number: IAC-SOFT-WDAD Web Design and Application Development Session 1 (10 Hours) Client Side Scripting Session 2 (10 Hours) Server Side Scripting - I Session 3 (10 hours) Database Session 4 (10

More information

Writing Scripts with PHP s PEAR DB Module

Writing Scripts with PHP s PEAR DB Module Writing Scripts with PHP s PEAR DB Module Paul DuBois paul@kitebird.com Document revision: 1.02 Last update: 2005-12-30 As a web programming language, one of PHP s strengths traditionally has been to make

More information

How To Use A Sas Server On A Java Computer Or A Java.Net Computer (Sas) On A Microsoft Microsoft Server (Sasa) On An Ipo (Sauge) Or A Microsas (Sask

How To Use A Sas Server On A Java Computer Or A Java.Net Computer (Sas) On A Microsoft Microsoft Server (Sasa) On An Ipo (Sauge) Or A Microsas (Sask Exploiting SAS Software Using Java Technology Barbara Walters, SAS Institute Inc., Cary, NC Abstract This paper describes how to use Java technology with SAS software. SAS Institute currently offers several

More information

How I hacked PacketStorm (1988-2000)

How I hacked PacketStorm (1988-2000) Outline Recap Secure Programming Lecture 8++: SQL Injection David Aspinall, Informatics @ Edinburgh 13th February 2014 Overview Some past attacks Reminder: basics Classification Injection route and motive

More information

If your organization is not already

If your organization is not already Before you build your Web site, you need a solid design. Eden Watt At a Glance When you develop your first e-commerce site, you will discover that there are a few new things to learn about application

More information

Connecting with Computer Science, 2e. Chapter 5 The Internet

Connecting with Computer Science, 2e. Chapter 5 The Internet Connecting with Computer Science, 2e Chapter 5 The Internet Objectives In this chapter you will: Learn what the Internet really is Become familiar with the architecture of the Internet Become familiar

More information

LSINF1124 Projet de programmation

LSINF1124 Projet de programmation LSINF1124 Projet de programmation Database Programming with Java TM Sébastien Combéfis University of Louvain (UCLouvain) Louvain School of Engineering (EPL) March 1, 2011 Introduction A database is a collection

More information

Elements of Advanced Java Programming

Elements of Advanced Java Programming Appendix A Elements of Advanced Java Programming Objectives At the end of this appendix, you should be able to: Understand two-tier and three-tier architectures for distributed computing Understand the

More information

Creating Java EE Applications and Servlets with IntelliJ IDEA

Creating Java EE Applications and Servlets with IntelliJ IDEA Creating Java EE Applications and Servlets with IntelliJ IDEA In this tutorial you will: 1. Create IntelliJ IDEA project for Java EE application 2. Create Servlet 3. Deploy the application to JBoss server

More information

Lecture 2. Internet: who talks with whom?

Lecture 2. Internet: who talks with whom? Lecture 2. Internet: who talks with whom? An application layer view, with particular attention to the World Wide Web Basic scenario Internet Client (local PC) Server (remote host) Client wants to retrieve

More information

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007 WWW World Wide Web Aka The Internet dr. C. P. J. Koymans Informatics Institute Universiteit van Amsterdam November 30, 2007 dr. C. P. J. Koymans (UvA) WWW November 30, 2007 1 / 36 WWW history (1) 1968

More information

Application Design and Development

Application Design and Development C H A P T E R9 Application Design and Development Practice Exercises 9.1 What is the main reason why servlets give better performance than programs that use the common gateway interface (CGI), even though

More information

Web Development: Techniques for Handling Content. Shelley Slaey June 2, 2014

Web Development: Techniques for Handling Content. Shelley Slaey June 2, 2014 Web Development: Techniques for Handling Content Shelley Slaey June 2, 2014 Web Background Author User (Client) Web Server (Server) Web Background Request Response Web Server Request Web Browser Response

More information

Introduction to the. Barracuda Embedded Web-Server

Introduction to the. Barracuda Embedded Web-Server Introduction to the Barracuda Embedded Web-Server This paper covers fundamental concepts of HTTP and how the Barracuda Embedded Web Server can be used in an embedded device. Introduction to HTTP Using

More information

Why Is This Important? Database Application Development. SQL in Application Code. Overview. SQL in Application Code (Contd.

Why Is This Important? Database Application Development. SQL in Application Code. Overview. SQL in Application Code (Contd. Why Is This Important? Database Application Development Chapter 6 So far, accessed DBMS directly through client tools Great for interactive use How can we access the DBMS from a program? Need an interface

More information

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string Form Handling Server-side Web Development and Programming Lecture 3: Introduction to Java Server Pages Form data appended to request string

More information

A framework for web-based product data management using J2EE

A framework for web-based product data management using J2EE Int J Adv Manuf Technol (2004) 24: 847 852 DOI 10.1007/s00170-003-1697-8 ORIGINAL ARTICLE M.Y. Huang Y.J. Lin Hu Xu A framework for web-based product data management using J2EE Received: 8 October 2002

More information

SQL and Java. Database Systems Lecture 19 Natasha Alechina

SQL and Java. Database Systems Lecture 19 Natasha Alechina Database Systems Lecture 19 Natasha Alechina In this Lecture SQL in Java SQL from within other Languages SQL, Java, and JDBC For More Information Sun Java tutorial: http://java.sun.com/docs/books/tutorial/jdbc

More information

CSC 551: Web Programming. Spring 2004

CSC 551: Web Programming. Spring 2004 CSC 551: Web Programming Spring 2004 Java Overview Design goals & features platform independence, portable, secure, simple, object-oriented, Programming models applications vs. applets vs. servlets intro

More information

Japan Communication India Skill Development Center

Japan Communication India Skill Development Center Japan Communication India Skill Development Center Java Application System Developer Course Detail Track 2a Java Application Software Developer: Phase1 SQL Overview 70 Introduction Database, DB Server

More information

Chapter 13. Introduction to SQL Programming Techniques. Database Programming: Techniques and Issues. SQL Programming. Database applications

Chapter 13. Introduction to SQL Programming Techniques. Database Programming: Techniques and Issues. SQL Programming. Database applications Chapter 13 SQL Programming Introduction to SQL Programming Techniques Database applications Host language Java, C/C++/C#, COBOL, or some other programming language Data sublanguage SQL SQL standards Continually

More information

ERIE COMMUNITY COLLEGE COURSE OUTLINE A. COURSE TITLE: CS 103 - WEB DEVELOPMENT AND PROGRAMMING FUNDAMENTALS

ERIE COMMUNITY COLLEGE COURSE OUTLINE A. COURSE TITLE: CS 103 - WEB DEVELOPMENT AND PROGRAMMING FUNDAMENTALS ERIE COMMUNITY COLLEGE COURSE OUTLINE A. COURSE TITLE: CS 103 - WEB DEVELOPMENT AND PROGRAMMING FUNDAMENTALS B. CURRICULUM: Mathematics / Computer Science Unit Offering C. CATALOG DESCRIPTION: (N,C,S)

More information

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt

Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt Computer Networks 1 (Mạng Máy Tính 1) Lectured by: Dr. Phạm Trần Vũ MEng. Nguyễn CaoĐạt 1 Lecture 10: Application Layer 2 Application Layer Where our applications are running Using services provided by

More information

Business & Computing Examinations (BCE) LONDON (UK)

Business & Computing Examinations (BCE) LONDON (UK) Business & Computing Examinations (BCE) LONDON (UK) Web Design Qualification Analysis & Occupational Outlook The development of BCE qualifications include extensive market research from the following sources:

More information