E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP-136012) is carried out with the financial support of the Commssion of the European Communities.

Slides:



Advertisements
Similar presentations
Connecting to Databases. connecting to DB DB server typically a standalone application Server runs on localhost for smaller sites –i.e. Same machine as.
Advertisements

Connecting to Databases. relational databases tables and relations accessed using SQL database -specific functionality –transaction processing commit.
PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
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.
Fundamentals, Design, and Implementation, 9/e Chapter 14 JDBC, Java Server Pages, and MySQL.
JDBC Overview Autumn 2001 Lecturer: C. DeJong. Relational Databases widespread use used via SQL (Structured Query Language) freely available powerful.
Multiple Tiers in Action
DT228/3 Web Development Databases. Database Almost all web application on the net access a database e.g. shopping sites, message boards, search engines.
Course Map The Java Programming Language Basics Object-Oriented Programming Exception Handling Graphical User Interfaces and Applets Multithreading Communications.
Java database Programming JDBC Trademarked name of a Java API that supports Java programs that access relational databases Stand for Java DataBase Connectivity.
1 Foundations of Software Design Lecture 27: Java Database Programming Marti Hearst Fall 2002.
Murali Mani Web Interface. Murali Mani Options PHP with mySQL JSP/Servlets with JDBC on mySQL/Oracle Others …
Session-01. What is a Servlet? Servlet can be described in many ways, depending on the context: 1.Servlet is a technology i.e. used to create web application.
Java Server Programming Jeff Schmitt Towson University October 15, 1998.
ODBC and JDBC What are they – libraries of function calls that support SQL statements Why do we need them –Provide a way for an application to communicate.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
1 Introduction to Java Development with IDS Jean Georges Perrin IIUG GreenIvory.com JGP.net Tuesday, October 3 rd :00 – 10:00. Platform: IDS, Java.
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.
Database Management Systems 1 Oracle Programming.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
Web Application Programming Carol Wolf Computer Science.
Views, Indexes and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Haiman Tian 1.
Introduction to Java Development with IDS Jean Georges Perrin IIUG I04 Tuesday, October 3 rd :00 – 10:00. Platform: IDS, Java.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Active Server Pages ASP is Microsoft’s server-side script engine for dynamically-generated web pages. Most common language used is VBScript. If you use.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
PHP and MySQL by Example COMP YL Professor Mattos.
MySQL, Java, and JDBC CSE 3330 Southern Methodist University.
CSC 411/511: DBMS Design Dr. Nan WangCSC411_L12_JDBC_MySQL 1 MySQL and JDBC.
JAVA Database Access. JDBC The Java Database Connectivity (JDBC) API is the industry standard for database- independent connectivity between the Java.
Website Design Lecture 1. Outline Introduction to the module Outline of the Assessment Schedule Lecture Static XHTML, client side and server side Why.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Overview of JDBC and Pro*C 1 CSE 5330 – Database Systems.
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
Putting it all together Dynamic Data Base Access Norman White Stern School of Business.
Introduction to JDBC Michelle Lee, Ye Wu & Jeff Offutt SWE 432 Design and Implementation of Software for the Web.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
Index and JDBC/JSP tutorial Professor: Dr. Shu-Ching Chen TA: Hsin-Yu Ha.
Chapter 8 Databases.
Domain Driven Web Development With WebJinn Sergei Kojarski College of Computer & Information Science Northeastern University joint work with David H. Lorenz.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 31.1 Reviewing the Bookstore Application 31.2.
JDBC Database Programming in Java Prepared by., Mrs.S.Amudha AP/SWE.
DATABASE CONNECTIVITY TO MYSQL. Introduction =>A real life application needs to manipulate data stored in a Database. =>A database is a collection of.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
DataBases and SQL INFSY 547 Spring Course Wrap Up April 12: Complete Work on Servlets Review of Team Projects Close of Portfolio Work April 19:
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
Windows 7 WampServer 2.1 MySQL PHP 5.3 Script Apache Server User Record or Select Media Upload to Internet Return URL Forward URL Create.
WEB SERVER SOFTWARE FEATURE SETS
CSI 3125, Preliminaries, page 1 JDBC. CSI 3125, Preliminaries, page 2 JDBC JDBC stands for Java Database Connectivity, which is a standard Java API (application.
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
Database Connectivity and Server-Side Scripting Chapter 12.
1 Download current version of Tomcat from: g/tomcat/ g/tomcat/ Install it in: C:\Program Files\Apache.
In the Name Of Almighty Allah. Java Application Connection To Mysql Created by Hasibullah (Sahibzada) Kabul Computer Science Faculty Afghanistan.
Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.
CS320 Web and Internet Programming Database Access with JDBC Chengyu Sun California State University, Los Angeles.
CS320 Web and Internet Programming Database Access with JDBC
Database Project: MySQL
4166 Review.
PHP / MySQL Introduction
Database Processing Applications
CS3220 Web and Internet Programming Database Access with JDBC
CS3220 Web and Internet Programming Database Access with JDBC
Presentation transcript:

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 1 Accessing Databases Ver: 1.0 E-Commerce Basic Applications Accessing Internet Databases

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 2 Accessing Databases How do APIs Work Imagine APIs (Application Interface) as a standardised set of functions that allow programs to access databases and execute SQL statements on that database There are APIs for PHP, PERL, Java... To work with databases e.g. MySQL To connect you need to execute your commands as a specific user which you need to set up first (see previous modules)

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 3 Accessing Databases APIs Discussed PHP PERL Java Server Pages (Java Servlets)

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 4 Accessing Databases PHP Web Server Database MySQL_Func.php Http request 1. User Page Connection_data.php 2. Call function 3. Receive Connection data 4. Request Data Receive Result Array 5.

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 5 Accessing Databases Database Connection PHP include("connection_data.php"); include("mysql_func.php"); $lk1=myconnect(); $db1="victory";

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 6 Accessing Databases Sample Query PHP $loginname = ”Messnarz”; $sql = SELECT customers.surname, products.productname, products.price FROM products,sales,customers WHERE products.prod_id = sales.prod_id AND sales.cus_id = customers.cus_id AND customers.surname LIKE ‘.“$loginname“.‘ “; if (!($result1=send_sql($db1,$query1))) { sprintf("internal error %d:%s\n", mysql_errno(), mysql_error()); return 0; } Runs Query on the database

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 7 Accessing Databases PERL Web Server Database MySQL Socket Http request 1. User Page use Net::SMTP; 2. Create Comm Object 3. Use Connection Modules 4. Request Data Receive Result Record Set 5.

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 8 Accessing Databases Database Connection PERL my $mysql = Net::MySQL->new( hostname => 'localhost', # Default use UNIX socket database => ‚dbname', user => ‚userid', password => ‚mypassword' ); Creating a var to access DB through a communication socket

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 9 Accessing Databases Sample Query PERL $mysql->query(qq{ SELECT customers.surname, products.productname, products.price FROM products,sales,customers WHERE products.prod_id = sales.prod_id AND sales.cus_id = customers.cus_id AND customers.surname = (‘Messnarz‘) }); my $record_set = $mysql->create_record_iterator; Runs Query on the database

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 10 Accessing Databases JSP + Tomcat (SUN) TomCat Server Database Java Servlet Http request 1. JSP Page Java Network Library 2. Converted To Servlet 3. Use Connection Modules 4. Request Data Receive Result Record Set 5.

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 11 Accessing Databases Database Connection JSP // creating db object try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); } catch (ClassNotFoundException e) { out.println(" ***Can't load JDBC!*** "); out.println(" ***Exception=" + e.toString() + "*** "); return; } // Connecting Connection myConn; try { Connection myConn = DriverManager.getConnection ("jdbc:mysql:///victory?user=iscn&password=test"); } catch (Exception e) {...

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 12 Accessing Databases Sample Query JSP // Step 3 Statement stmt = myConn.createStatement(); // Step 4 ResultSet myResultSet = stmt.executeQuery(" SELECT customers.surname, products.productname, products.price FROM products,sales,customers WHERE products.prod_id = sales.prod_id AND sales.cus_id = customers.cus_id AND customers.surname LIKE ´Messnarz´ "); Runs Query on the database

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 13 Accessing Databases Comparison PHP and JSP have a quick performance, PERL is slower JSP needs extensive Java knowledge (some semesters to study) Thus the course bases on PHP examples Be aware that although the principles are the same, the scripting languages look quite different.

E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities under the Leonardo da Vinci Programme 14 Accessing Databases References PHP for Beginners, Wrox Press, 1998 Professional PHP Programming, Wrox Press, 2000 Professional PHP4 XML, Wrox Press, 2002 JSP Online Tutorial : Tutorial/ Tutorial/ PHP Conference Materials Site Online PHP Manual