Java, JDBC, Perl, CGI Embedded SQL November 3 rd, 2000.

Slides:



Advertisements
Similar presentations
Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
Advertisements

Lecture plan Information retrieval (from week 11)
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
BICS546 Client/Server Database Application Development.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
Master’s course Bioinformatics Data Analysis and Tools Lecture 6: Internet Basics Centre for Integrative Bioinformatics.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Multiple Tiers in Action
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Overview Class systems poll Microsoft SQL Server Cubist Server CGI Programming JDBC Programming Project Milestones Reminder.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Java Server Programming Jeff Schmitt Towson University October 15, 1998.
The Client/Server Database Environment
+ Connecting to the Web Week 7, Lecture A. + Midterm Basics Thursday February 28 during Class The lab Tuesday, February 26 is optional review Class on.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
JDBC Vs. Java Blend Presentation by Gopal Manchikanti Shivakumar Balasubramanyam.
NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Java Database Connectivity (JDBC). Introduction Database –Collection of data DBMS –Database management system –Storing and organizing data SQL –Relational.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
1 Java Database Connection (JDBC) There are many industrial-strength DBMS's commercially available in the market. Oracle, DB2, and Sybase are just a few.
1 HTML and CGI Scripting CSC8304 – Computing Environments for Bioinformatics - Lecture 10.
Week 7 Lecture Web Database Development Samuel Conn, Asst. Professor
Database Management Systems 1 Oracle Programming.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
3/8/00asp00 1 Active Server Pages from Microsoft Nancy McCracken Northeast Parallel Architectures Center at Syracuse.
Student Learning Environment on the World Wide Web l CGI-programming in Perl for the connection of databases over the Internet. l Web authoring using Frontpage.
Fundamentals of Database Chapter 7 Database Technologies.
M1G Introduction to Database Development 6. Building Applications.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
CS 405G: Introduction to Database Systems Database programming.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 14 Database Connectivity and Web Technologies.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.
WEB SERVER SOFTWARE FEATURE SETS
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Database Connectivity and Server-Side Scripting Chapter 12.
CSCI-235 Micro-Computers in Science The Internet and World Wide Web.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
DAT602 Database Application Development Lecture 1 Course Structure & Background knowledge.
Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.
R EMAINING TOPICS IN JDBC Sagun Dhakhwa. O VERVIEW Introduction to JDBC API Types of JDBC Drivers Introduction to ODBC.
A S P. Outline  The introduction of ASP  Why we choose ASP  How ASP works  Basic syntax rule of ASP  ASP’S object model  Limitations of ASP  Summary.
CS320 Web and Internet Programming Database Access with JDBC Chengyu Sun California State University, Los Angeles.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
3-Tier Architectures (or 3-Tier Applications)
Netscape Application Server
The Client/Server Database Environment
Relational database and SQL MySQL LAMP SQL queries
Assignment changes and clarifications (to be on the web soon)
CS320 Web and Internet Programming Database Access with JDBC
Server Concepts Dr. Charles W. Kann.
Software Design and Architecture
The Client/Server Database Environment
PHP Overview PHP: Hypertext Preprocessor Server-Side Scripting
Mr. Harish Sharma Asst. Professor Dept. of CA & IT SGRRITS Dehradun
Lecture 1: Multi-tier Architecture Overview
Tiers vs. Layers.
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Architecture of the web
Web Application Development Using PHP
Presentation transcript:

Java, JDBC, Perl, CGI Embedded SQL November 3 rd, 2000

What will we cover ? Assignment 4 – Java and JDBC Course project – HTML, PERL, CGI, Embedded SQL in Perl

How to run a query ? Running a query: –Query Analyzer (assignment 3) –Any application (assignment 4) –Web application (project)

Modern 3-tier architecture Web server, application, database Database Server Application Web Server Internet FORMS ODBC CGI

Application ? What is it ? –Software that formally separates and coordinates: Data sitting in the database Application logic Web accesses What it does ? –Connects either a web server or users to the database.

Why do we need applications ? Easier to develop and maintain We can reuse components for and application services: –Caching, encryption, managing database connections Multiple databases Security

Back to Assignment 4 This is NOT a programming course. Tutorial on the web – straightforward Steps: 1.Add an ODBC connection on your machine 2.Create a new Java Application (Console Application) 3.Download the example code provided

JDBC/ODBC Standardized network database APIs –Connect, submit queries, process results, disconnect –Abstract application from particular database ODBC from Microsoft, JDBC from Sun A good driver can make a huge difference –Pre-fetching –Data caching –SQL translation caching Could spend hours talking about JDBC/ODBC

Key Code Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver"); java.sql.Connection c = DriverManager.getConnection ("jdbc:odbc:444","cse444","WeRock!"); java.sql.Statement s= c.createStatement(); java.sql.ResultSet rs; rs = s.executeQuery("Select * from movies"); java.sql.ResultSetMetaData md = rs.getMetaData(); while (rs.next()){ area.append("\nTUPLE: |"); for (int i = 1; i <= md.getColumnCount();i++){ area.append(rs.getString(i) + " | "); } XML ?

HTML/CGI How does the Web works ? –Send a request to a server (cubist) –Servers answers back with HTML text –Browser parses text and outputs the page What if the request involves running an application on the server ? –Client must have a FORM in the HTML file –FORM indicates what action the server must take

FORMS <form ACTION= " ~tzoompy/444_2.pl" method=POST> Input a last name (try 'Gore'):

Perl Very successful and popular Easy for managing data (files or streams) Also popular for using as the CGI language of choice Examples: –print “Hello World !\n”; –while, for, if, very standard…. –$lname =~ tr/a-z/A-Z/; –$lname =~ s/Levy/Halevy/;

Key Code #!/usr/bin/perl5 -w use CGI; use DBI; $html = new CGI; print $html->header, "\n", $html->start_html(); &searchDatabase; print $html->end_html; exit(0);

Key Code (2) sub searchDatabase { $sql = "SELECT * FROM Elections2000"; $db = DBI->connect("dbi:Sybase:server=ISQL01", "cse444", "WeRock!"); $db or die "Sorry we couldn't connect!\n"; $sth = $db->prepare($sql); $sth->execute(); while ($row = $sth->fetchrow_hashref()) { $rec1 = $row->{lname}; print "Record = $rec1 "; }

User Input Check the tutorial and examples available on the web Once all this is done you are 75% done with project More help ? –Google (or your favorite engine) –Java ? – I don’t know –Perl ? – Lama and Camel books (O’Reilly) –HTML/CGI ? – Anything, it’s easy anyway

Miscellaneous Assignment 4: –output – stdout preferred, but anything reasonable –queries – do your own or get solutions –two programs only –code must be reasonable documented Project –black-box testing (including stress test) –why not Java servlets/ASP/Java/Assembly… cse security policy, but…