Database Management Systems 1 Xintao Wu Oracle Programming Instructor: Xintao Wu.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Technology Overview JAVA Servlets CS-611 S. Witherspoon.
Fundamentals, Design, and Implementation, 9/e Chapter 14 JDBC, Java Server Pages, and MySQL.
BICS546 Client/Server Database Application Development.
Database Management Systems 1 Xintao Wu Oracle Programming Instructor: Xintao Wu.
Java database Programming JDBC Trademarked name of a Java API that supports Java programs that access relational databases Stand for Java DataBase Connectivity.
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems JavaServer Pages (JSP)
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Java Server Programming Jeff Schmitt Towson University October 15, 1998.
UFCE4Y UFCE4Y-20-3 Components and Services Julia Dawson.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 12-1 David M. Kroenke’s Chapter Twelve: ODBC Database Processing: Fundamentals,
Advance Computer Programming Java Database Connectivity (JDBC) – In order to connect a Java application to a database, you need to use a JDBC driver. –
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Getting connected.  Java application calls the JDBC library.  JDBC loads a driver which talks to the database.  We can change database engines without.
1 CSC 440 Database Management Systems JDBC This presentation uses slides and lecture notes available from
Think Possibility Integrating Web Applications With Databases.
Overview of JDBC and Pro*C 1 Overview of JDBC,Pro*C and Oracle connectivity on Omega CSE 5330 – Database Systems.
Helena Pomezná, ciz034 St. skupina: L392 FEI, VŠB-TUO Ak. rok. 2002/2003 Download:
Database Management Systems 1 Oracle Programming.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
JDBC. What is JDBC JDBC is an acronym for –Java Data Base Connectivity. It allows java/jsp program to connect to any database.
Using Java with PSQL and Oracle Thanks to Drs. Raj and Liu for sharing some of these slides TRUDY: ALSO NEED SAMPLE PROGRAM.
JDBC. JDBC Drivers JDBC is an alternative to ODBC and ADO that provides database access to programs written in Java.
WebServer on OS/390 Bill O'Donnell InfoTech Services
MySQL, Java, and JDBC CSE 3330 Southern Methodist University.
JDBC Tutorial MIE456 - Information Systems Infrastructure II Vinod Muthusamy November 4, 2004.
CS 405G: Introduction to Database Systems Database programming.
Overview of JDBC and Pro*C 1 CSE 5330 – Database Systems.
Java + XML. Java 2 Enterprise Edition Server Side java Servlets JSP JavaBeans Web Services Database jdbc.
Webcommerce Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich.
Introduction to JDBC Michelle Lee, Ye Wu & Jeff Offutt SWE 432 Design and Implementation of Software for the Web.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
JDBC – Java DataBase Connectivity. JDBC API Overview JDBC is Java API that allows the Java programmers to access database management system from Java.
Chapter 8 Databases.
COMP201 Java Programming Topic 15: Database Connectivity JDBC Reading: Chapter 4, Volume 2.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
JDBC Database Programming in Java Prepared by., Mrs.S.Amudha AP/SWE.
JDBC. Java.sql.package The java.sql package contains various interfaces and classes used by the JDBC API. This collection of interfaces and classes enable.
12/6/2015B.Ramamurthy1 Java Database Connectivity B.Ramamurthy.
Java and Databases. JDBC Architecture Java Application JDBC API Data Base Drivers AccessSQL Server DB2InformixMySQLSybase.
COMP 321 Week 4. Overview Normalization Entity-Relationship Diagrams SQL JDBC/JDBC Drivers hsqldb Lab 4-1 Introduction.
Java JDBC API. A Java API To Access almost any kind of tabular data To Access almost any kind of tabular data Trademarked (not an acronym) Trademarked.
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.
Database Connectivity and Server-Side Scripting Chapter 12.
Basics of JDBC.
Basics of JDBC Session 14.
ODBC : Open Database Connectivity SNU OOPSLA Lab. October 2005.
Database Management Systems 1 Raghu Ramakrishnan Database Application Development Chpt 6 Xin Zhang.
Advanced Java Session 5 New York University School of Continuing and Professional Studies.
Introduction to JDBC Instructor: Mohamed Eltabakh 1.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Java Database Connectivity.
1 Database Management Systems (II) Chapter 14. JDBC, Java Server Pages, and MySQL © 2005 by Dr. F. Lin.
1 Download current version of Tomcat from: g/tomcat/ g/tomcat/ Install it in: C:\Program Files\Apache.
JSP / Servlets and Beans
Intro to JDBC Joseph Sant Applied Computing and Engineering Sciences Sheridan ITAL.
6-1 JAVA DATABASE CONNECTOR Colorado Technical University IT420 Tim Peterson.
Java Database Connectivity JDBC. Open Database Connectivity developed by Microsoft to provide interaction with databases using SQL. Use the JDBC-ODBC.
JDBC. What is JDBC JDBC is an acronym for –Java Data Base Connectivity. It allows java program to connect to any database.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
Instructor: Jinze Liu Fall /8/2016Jinze University of Kentucky 2 Database Project Database Architecture Database programming.
DEPTT. OF COMP. SC & APPLICATIONS
Accessing the Database Server: ODBC, OLE DB, and ADO
ODBC, OCCI and JDBC overview
HW#4 Making Simple BBS Using JDBC
Prof: Dr. Shu-Ching Chen TA: Sheng Guan
Design and Implementation of Software for the Web
Client Access, Queries, Stored Procedures, JDBC
Java Servlet Ziad A. Al-Sharif.
Java Database Connectivity
Presentation transcript:

Database Management Systems 1 Xintao Wu Oracle Programming Instructor: Xintao Wu

Database Management Systems 2 Xintao Wu architecture v

Database Management Systems 3 Xintao Wu JDBC (Java Database Connectivity ) v JDBC enables programmers to use SQL queries from within java programs to access databases. v JDBC provides transparent access to relational databases from different vendors.

Database Management Systems 4 Xintao Wu JDBC

Database Management Systems 5 Xintao Wu JDBC steps v Create the database in your dbms v Register the database as a data source v Import java.sql.* at the beginning of your java file. v Connect to a JDBC source –Connection con = ora02.uncc.edu:1521:class”,”user”,”passwd”) v Create an SQL statement –Statement stmt = con.createStatement(); – stmt.executeUpdate("INSERT INTO sailor VALUES(22,'dustin',7,45.0)");

Database Management Systems 6 Xintao Wu JDBC Step v Execute the statement –ResultSet rs = stmt.executeQuery(“Select * from …”) v Parse the result – rs.next(), rs.getFloat –ResultSetMetaData contains the information about column v Close the statement and connection – stmt.close() – con.close

Database Management Systems 7 Xintao Wu Useful resources v JDBC tutorial bc/index.html bc/index.html v UNCC COIT v Example INF/classes/SampleJDBC.java INF/classes/SampleJDBC.java

Database Management Systems 8 Xintao Wu Java Servlets v Web servers understand requests for pages in http and return their response in HTML format v Static html vs. dynamic html –The webpage is based on data submitted by the user –The data changes frequently (a weather-report) –Web pages uses information from a database(stock) –Maintain separate data about each client for personalization purposes(cookies). v Java servlets are programs that extend the functionality of a web server and useful for building dynamic web pages on the fly.

Database Management Systems 9 Xintao Wu Java Servlet Advantage v Works as a lightweight thread directly with the JVM rather than create a new process v Load once to memory and used by all threads v Share data among each other

Database Management Systems 10 Xintao Wu How to run servlets v Your machine, Java servlet development kit(JSDK) v COIT –consult the webpage –Consult TA

Database Management Systems 11 Xintao Wu Examples v HelloWorld – – INF/classes/HelloWorld.javahttp:// INF/classes/HelloWorld.java v More examples –DBServlet – – INF/classes/DBServlet.javahttp:// INF/classes/DBServlet.java

Database Management Systems 12 Xintao Wu JDBC and Servlet v Summary: v 1. Download PUTTY and WinSCP v 2. Download HelloWorld, SampleJDBC and DBServlet source code v 3. Modify them and upload to your own space v 4. Compile and run it

Database Management Systems 13 Xintao Wu Some links v v -Servlet.doc -Servlet.doc

Database Management Systems 14 Xintao Wu Summary v 3-tire architecture v APIs such as JDBC and ODBC introduce a layer of abstraction between application and DBMS v Choose your language from JSP, Servlet, ASP, VC++, VB.