Environment Settings on SIT

Size: px
Start display at page:

Download "Environment Settings on SIT"

Transcription

1 Environment Settings on SIT ~/jhuang/website: The root directory of the jhuang/website web application. Store here HTML, Servlet and JSP files ~/jhuang/website/web-inf: All resources for the web application that are not in the root directory. Store here web.xml, which is not allowed to use on AML server!! ~/jhuang/website/web-inf/classes: Servlet and utility classes ~/jhuang/website/web-inf/lib: Utility JAR files

2 Directory Structure of Your Group Accounts on Linux SIT Server All Web files are put under the website directory. All their applications can read and write anywhere in their group home directories, provided that they set Unix/Linux permissions properly. Your applications are free to connect to the DB servers. All the groups are NOT allowed to change ANY of the port number in the config files (e.g. (1) should not modify files named server.xml and server-minimal.xml; (2) should not create your own web.xml file). Use source /javainit to start Java 1.5.

3

4

5 Referring to your Files in the Browser To open a page called a.htm in the ROOT directory of the jhuang web application: To open a servlet called HelloWorld.class of the dbi web application

6 Running the Programs (via http) (via https)

7 Introduction to JDBC

8 JDBC Introduction JDBC provides a standard library for accessing relational databases API standardizes Way to establish connection to database Approach to initiating queries Method to create stored (parameterized) queries The data structure of query result (table) Determining the number of columns Looking up metadata, etc. API does not standardize SQL syntax JDBC is not embedded SQL JDBC class located in java.sql package Note: JDBC is not officially an acronym; unofficially, Java Database Connectivity is commonly used

9 On-line Resources Sun s JDBC Site JDBC Tutorial bc/ List of Available JDBC Drivers c/drivers/ API for java.sql sql/ package-summary.html

10 JDBC Drivers JDBC consists of two parts: JDBC API, a purely Java-based API JDBC Driver Manager, which communicates with vendor-specific drivers that perform the real communication with the database. Point: translation to vendor format is performed on the client No changes needed to server Driver (translator) needed on client JDBC Driver Manager Database Java Application JDBC API JDBC-ODBC Bridge Vendor Specific ODBC Driver JDBC Driver API Vendor Specific JDBC Driver Database

11 Seven Basic Steps in Using JDBC Load the driver Define the Connection URL Establish the Connection Create a Statement object Execute a query Process the results Close the connection

12 JDBC: Details of Process Load the driver try { Class.forName("oracle.jdbc.driver.OracleDriver"); Class.forName("org.gjt.mm.mysql.Driver"); } catch { ClassNotFoundException cnfe) { System.out.println("Error loading driver: " cnfe); } Define the Connection URL String host = yourcompany.com"; String dbname = "somename"; int port = 1234; String oracleurl = "jdbc:oracle:thin:@" + host + ":" + port + ":" + dbname; String mysqlurl = "jdbc:mysql://" + host + ":" + port + "/" + dbname;

13 JDBC: Details of Process Establish the Connection String username = jimmy_huang"; String password = "secret"; Connection connection = DriverManager.getConnection (oracleurl, username, password); Optionally, look up information about the database DatabaseMetaData dbmetadata = connection.getmetadata(); String productname = dbmetadata.getdatabaseproductname(); System.out.println("Database: " + productname); String productversion = dbmetadata.getdatabaseproductversion(); System.out.println("Version: " + productversion);

14 JDBC: Details of Process Create a Statement Statement statement = connection.createstatement(); Execute a Query String query = "SELECT col1, col2, col3 FROM sometable"; ResultSet resultset = statement.executequery(query); To modify the database, use executeupdate, supplying a string that uses UPDATE, INSERT, or DELETE Use setquerytimeout to specify a maximum delay to wait for results

15 JDBC: Details of Process Process the Result while(resultset.next()) { } System.out.println(resultSet.getString(1) + " " + First column has index 1, not 0 resultset.getstring(2) + " " + resultset.getstring(3)); ResultSet provides various getxxx methods that take a column index or name and returns the data Close the Connection connection.close(); As opening a connection is expensive, postpone this step if additional database operations are expected

16 Example on AML public void connect ( ) { con = null; try { DriverManager.registerDriver(new oracle.jdbc.driver.oracledriver()); String constring = "jdbc:oracle:thin:@sigma.aml.yorku.ca:1521:" + db_name; // System.out.println ("Connection string: + constring); con = DriverManager.getConnection(conString, db_username, db_password); System.out.println("\n\tConnection to " + db_name + " is established\n"); stmt=con.createstatement(); } catch(sqlexception e) { System.out.println("DB.connect => Error: " + e.tostring()); System.exit(1); }

17 Example on AML //query database ResultSet resultset = stmt.executequery( put your SQL query here" ); // process query results StringBuffer results = new StringBuffer(); ResultSetMetaData metadata = resultset.getmetadata(); int numberofcolumns = metadata.getcolumncount(); for ( int i = 1; i <= numberofcolumns; i++ ) { results.append( metadata.getcolumnname( i ) + "\t" ); } results.append( "\n" );

18 Types of Recommendation Systems

19 Product Recommendation in E-commerce Products Recommendations

20 Product Recommendation in E-commerce Products Recommendations

21 Outline Types of recommendation systems Search-based recommendations Category-based recommendations Collaborative filtering Clustering Association rules Content-based recommendations Classifiers

22 Search-based Recommendations The only visitor types a search query data mining customer The system retrieves all the items that correspond to that query The system recommend some of these books based on general, non-personalized ranking (sales rank, popularity, etc.)

23 Search-based Recommendations Pros: Simple to implement Cons: Which criteria to use to rank recommendations? Is it really recommendations? The user only gets what he asked

24 Category-based Recommendations Each item belongs to one category or more. Explicit / implicit choice: The customer select a category of interest (refine search, opt-in for category-based recommendations, etc.). Subjects > Computers & Internet > Databases > Data Storage & Management > Data Mining The system selects categories of interest on the behalf of the customer, based on the current item viewed, past purchases, etc. Certain items (bestsellers, new items) are eventually recommended

25 Category-based Recommendations Pros: Still simple to implement Cons: Which criteria to use to order recommendations? Is it really recommendations? Capacity highly depend upon the kind of categories implemented Too specific: not efficient Not specific enough: no relevant recommendations

26 Collaborative Filtering Collaborative filtering techniques compare customers, based on their previous purchases or page viewed to make recommendations to similar customers It s also called social filtering Follow these steps: Find customers who are similar (nearest neighbors) in term of tastes, preferences, past behaviors Aggregate weighted preferences of these neighbors Make recommendations based on these aggregated, weighted preferences (most preferred, unbought items)

27 Collaborative Filtering An Example: the system needs to make recommendations to customer C Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Customer A X X Customer B X X X Customer C X X Customer D X X Customer E X X Customer B is very close to C (he has bought all the books C has bought). Book 5 is highly recommended Customer D is somewhat close. Book 6 is recommended to a lower extent Customers A and E are not similar at all. Weight=0

28 Collaborative Filtering Pros: Extremely powerful and efficient Very relevant recommendations (1) The bigger the database, (2) the more the past behaviors, the better the recommendations Cons: Difficult to implement, resource and time-consuming What about a new item that has never been purchased? What about a new customer who has never bought anything? Cannot be compared to other customers no items can be recommended

29 Clustering Another way to make recommendations based on past purchases of other customers is to cluster customers into categories Each cluster will be assigned typical preferences, based on preferences of customers who belong to the cluster Customers within each cluster will receive recommendations computed at the cluster level

30 Clustering Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Customer A X X Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Customer AB X X X X X Customer B X Customer C X X Customer Customer D X X Customer E X X Customers B, C and D are clustered together. Customers A and E are clustered into another separate group Typicical preferences for CLUSTER are: Book 2, very high Book 3, high Books 5 and 6, may be recommended Books 1 and 4, not recommended at all

31 Clustering Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Customer A Book X 1 Book 2 Book 3 Book X 4 Book 5 Book 6 Customer BA X X X X X Customer CB X X X Customer DC X X X Customer DE X X X X Customer EF X X X How does it work? Any customer that shall be classified as a member of CLUSTER will receive recommendations based on preferences of the group: Book 2 will be highly recommended to Customer F Book 6 will also be recommended to Customer F to some extent

32 Clustering Pros: Clustering techniques work on aggregated data: faster It can also be applied as a first step for the selection of relevant neighbors in a collaborative filtering algorithm Cons: Recommendations (per cluster) are less relevant than collaborative filtering (per individual)

33 Association Rules Clustering works at a group (cluster) level Collaborative filtering works at the customer level Association rules work at the item level

34 Association Rules Past purchases are transformed into relationships of common purchases Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Customer A X X Customer B X X X Customer C X X Customer D X X Customer E X X Customer F X X Customers who bought Also bought Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Book Book Book Book 4 1 Book Book 6 1

35 Association Rules These association rules are then used to made recommendations If a visitor has some interest in Book 5, he will be recommended to buy Book 3 as well Of course, recommendations are constrained to some minimum levels of confidence Customers who bought Also bought Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Book Book Book Book 4 1 Book Book 6 1

36 Association Rules What if recommendations can be made using more than one piece of information? Recommendations are aggregated If a visitor is interested in Books 3 and 5, he will be recommended to buy Book 2, than Book 1 Customers who bought Also bought Book 1 Book 2 Book 3 Book 4 Book 5 Book 6 Book Book Book Book 4 1 Book Book 6 1

37 Association Rules Pros: Fast to implement Fast to execute Not much storage space required Very successful in broad applications for large populations, such as shelf layout in retail stores Cons: Not suitable if knowledge of preferences change rapidly.

38 Content-based Recommendations Association rules compare items based on past purchases or viewed Content-based filtering compares items based on their content Also called content-based filtering or information filtering

39 Content-based Recommendations What is the content of an item? It can be explicit attributes or characteristics of the item. For example for a film: Action / adventure Feature Bruce Willis Year 1995 It can also be textual content (title, description, table of content, etc.) Several techniques exist to compute the distance between two textual documents

40 Content-based Recommendations How does it work? A textual document is scanned and parsed Word occurrences are counted (may be stemmed) Several words or tokens are not taken into account. That includes stop words (the, a, for), and words that do not appear enough in documents Each document is transformed into a normed TFIDF vector of size N (Term Frequency/Inverted Document Frequency). TFIDF = ( TF IDF ) 2 N TF The distance between any pair of vector is computed IDF

41 Content-based Recommendations TFIDF = TF IDF ( TF IDF ) 2 N Terms that appear in many different documents are less indicative of overall topic TF i = document frequency of term i = number of documents containing term i IDF i = inverse document frequency of term i, = log 2 (N/ df i) (N: total number of documents)

42 Content-based Recommendations An (unrealistic) example: how to compute recommendations between 8 books based only on their title? Books selected: Building data mining applications for CRM Accelerating Customer Relationships: Using CRM and Relationship Technologies Mastering Data Mining: The Art and Science of Customer Relationship Management Data Mining Your Website Introduction to marketing Consumer behavior marketing research, a handbook Customer knowledge management

43 building data mining applications for crm Accelerating Customer Relationships: Using CRM and Relationship Technologies Mastering Data Mining: The Art and Science of Customer Relationship Management Data Mining Your Website COUNT Introduction to marketing consumer behavior marketing research, a handbook a 1 accelerating 1 and 1 1 application 1 art 1 behavior 1 building 1 consumer 1 crm 1 1 customer data for 1 handbook 1 introduction 1 knowledge 1 management 1 1 marketing 1 1 mastering 1 mining of 1 relationship 2 1 research 1 science 1 technology 1 the 1 to 1 using 1 website 1 your 1 customer knowledge management

44 building data mining applications for crm Accelerating Customer Relationships: Using CRM and Relationship Technologies Mastering Data Mining: The Art and Science of Customer Relationship Management Mastering Data Mining: The Art and Science of Customer Relationship TFIDF Normed Vectors Data Mining Your Website Introduction to marketing consumer behavior Data mining your website marketing research, a handbook customer knowledge management a accelerating Management and application art behavior building consumer crm customer data for handbook introduction knowledge management marketing mastering mining of relationship research Data science technology the to using website your

45 Content-based Recommendations A customer is interested in the following book: Building data mining applications for CRM The system computes distances between this book and the 7 others The closest books are recommended: #1: Data Mining Your Website #2: Accelerating Customer Relationships: Using CRM and Relationship Technologies #3: Mastering Data Mining: The Art and Science of Customer Relationship Management Not recommended: Introduction to marketing Not recommended: Consumer behavior Not recommended: marketing research, a handbook Not recommended: Customer knowledge management

Database Access with JDBC. Dr. Jens Bennedsen, Aarhus University, School of Engineering Aarhus, Denmark

Database Access with JDBC. Dr. Jens Bennedsen, Aarhus University, School of Engineering Aarhus, Denmark Database Access with JDBC Dr. Jens Bennedsen, Aarhus University, School of Engineering Aarhus, Denmark jbb@ase.au.dk Overview Overview of JDBC technology JDBC drivers Seven basic steps in using JDBC Retrieving

More information

Intoduction to JDBC (Java Database Connectivity-- Connecting to DBMS)

Intoduction to JDBC (Java Database Connectivity-- Connecting to DBMS) Intoduction to JDBC (Java Database Connectivity-- Connecting to DBMS) Oracle JDBC Tutorial & Documentation http://docs.oracle.com/javase/tutorial/jdbc/basics/ Connector-J, MySql JDBC Driver Documentation,

More information

ERwin and JDBC. Mar. 6, 2007 Myoung Ho Kim

ERwin and JDBC. Mar. 6, 2007 Myoung Ho Kim ERwin and JDBC Mar. 6, 2007 Myoung Ho Kim ERwin ERwin a popular commercial ER modeling tool» other tools: Dia (open source), Visio, ConceptDraw, etc. supports database schema generation 2 ERwin UI 3 Data

More information

Pieter van den Hombergh. March 25, 2018

Pieter van den Hombergh. March 25, 2018 ergh Fontys Hogeschool voor Techniek en Logistiek March 25, 2018 ergh/fhtenl March 25, 2018 1/25 JDBC JDBC is a Java database connectivity technology (Java Standard Edition platform) from Oracle Corporation.

More information

JDBC Drivers Type. JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server.

JDBC Drivers Type. JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server. JDBC Drivers Type 1 What is JDBC Driver? JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server. For example, using JDBC drivers enable you to open database

More information

Java Database Connectivity

Java Database Connectivity Java Database Connectivity INTRODUCTION Dr. Syed Imtiyaz Hassan Assistant Professor, Deptt. of CSE, Jamia Hamdard (Deemed to be University), New Delhi, India. s.imtiyaz@jamiahamdard.ac.in Agenda Introduction

More information

Programming in Java

Programming in Java 320341 Programming in Java Fall Semester 2014 Lecture 16: Introduction to Database Programming Instructor: Slides: Jürgen Schönwälder Bendick Mahleko Objectives This lecture introduces the following -

More information

JDBC [Java DataBase Connectivity]

JDBC [Java DataBase Connectivity] JDBC [Java DataBase Connectivity] Introduction Almost all the web applications need to work with the data stored in the databases. JDBC is Java specification that allows the Java programs to access the

More information

Introduction to SQL & Database Application Development Using Java

Introduction to SQL & Database Application Development Using Java Introduction to SQL & Database Application Development Using Java By Alan Andrea The purpose of this paper is to give an introduction to relational database design and sql with a follow up on how these

More information

Server-side Web Programming

Server-side Web Programming Server-side Web Programming Lecture 13: JDBC Database Programming JDBC Definition Java Database Connectivity (JDBC): set of classes that provide methods to Connect to a database through a database server

More information

You write standard JDBC API application and plug in the appropriate JDBC driver for the database the you want to use. Java applet, app or servlets

You write standard JDBC API application and plug in the appropriate JDBC driver for the database the you want to use. Java applet, app or servlets JDBC Stands for Java Database Connectivity, is an API specification that defines the following: 1. How to interact with database/data-source from Java applets, apps, servlets 2. How to use JDBC drivers

More information

Lab # 9. Java to Database Connection

Lab # 9. Java to Database Connection Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4113: Lab # 9 Java to Database Connection Eng. Haneen El-Masry December, 2014 2 Objective In this lab, we turn

More information

Mining Web Data. Lijun Zhang

Mining Web Data. Lijun Zhang Mining Web Data Lijun Zhang zlj@nju.edu.cn http://cs.nju.edu.cn/zlj Outline Introduction Web Crawling and Resource Discovery Search Engine Indexing and Query Processing Ranking Algorithms Recommender Systems

More information

Instructor: Jinze Liu. Fall 2008

Instructor: Jinze Liu. Fall 2008 Instructor: Jinze Liu Fall 2008 Database Project Database Architecture Database programming 2 Goal Design and implement a real application? Jinze Liu @ University of Kentucky 9/16/2008 3 Goal Design and

More information

JDBC. Sun Microsystems has included JDBC API as a part of J2SDK to develop Java applications that can communicate with databases.

JDBC. Sun Microsystems has included JDBC API as a part of J2SDK to develop Java applications that can communicate with databases. JDBC The JDBC TM API is the application programming interface that provides universal data access for the Java TM platform. In other words, the JDBC API is used to work with a relational database or other

More information

A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology

A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology International Workshop on Energy Performance and Environmental 1 A web application serving queries on renewable energy sources and energy management topics database, built on JSP technology P.N. Christias

More information

Types of Databases. Types of Databases. Types of Databases. Databases and Web. Databases and Web. Relational databases may also have indexes

Types of Databases. Types of Databases. Types of Databases. Databases and Web. Databases and Web. Relational databases may also have indexes Types of Databases Relational databases contain stuctured data tables, columns, fixed datatype for each column Text databases are available for storing non-structured data typically text databases store

More information

Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity

Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity Objectives Discuss setting up JDBC connectivity. Demonstrate a JDBC program Discuss and demonstrate methods associated with JDBC connectivity Setting Up JDBC Before you can begin to utilize JDBC, you must

More information

Chapter 2. Architecture of a Search Engine

Chapter 2. Architecture of a Search Engine Chapter 2 Architecture of a Search Engine Search Engine Architecture A software architecture consists of software components, the interfaces provided by those components and the relationships between them

More information

Database Application Development

Database Application Development CS 461: Database Systems Database Application Development supplementary material: Database Management Systems Sec. 6.2, 6.3 DBUtils.java, Student.java, Registrar.java, RegistrarServlet.java, PgRegistrar.sql

More information

e-pg Pathshala Subject: Computer Science Paper: Web Technology Module: JDBC INTRODUCTION Module No: CS/WT/26 Quadrant 2 e-text

e-pg Pathshala Subject: Computer Science Paper: Web Technology Module: JDBC INTRODUCTION Module No: CS/WT/26 Quadrant 2 e-text e-pg Pathshala Subject: Computer Science Paper: Web Technology Module: JDBC INTRODUCTION Module No: CS/WT/26 Quadrant 2 e-text Learning Objectives This module gives an introduction about Java Database

More information

Creating a Recommender System. An Elasticsearch & Apache Spark approach

Creating a Recommender System. An Elasticsearch & Apache Spark approach Creating a Recommender System An Elasticsearch & Apache Spark approach My Profile SKILLS Álvaro Santos Andrés Big Data & Analytics Solution Architect in Ericsson with more than 12 years of experience focused

More information

CSC System Development with Java. Database Connection. Department of Statistics and Computer Science. Budditha Hettige

CSC System Development with Java. Database Connection. Department of Statistics and Computer Science. Budditha Hettige CSC 308 2.0 System Development with Java Database Connection Budditha Hettige Department of Statistics and Computer Science Budditha Hettige 1 From database to Java There are many brands of database: Microsoft

More information

CMPUT 391 Database Management Systems. JDBC in Review. - Lab 2 -

CMPUT 391 Database Management Systems. JDBC in Review. - Lab 2 - CMPUT 391 Database Management Systems JDBC in Review - - Department of Computing Science University of Alberta What Is JDBC? JDBC is a programming interface JDBC allows developers using java to gain access

More information

Unit 3 - Java Data Base Connectivity

Unit 3 - Java Data Base Connectivity Two-Tier Database Design The two-tier is based on Client-Server architecture. The direct communication takes place between client and server. There is no mediator between client and server. Because of

More information

Working with Databases and Java

Working with Databases and Java Working with Databases and Java Pedro Contreras Department of Computer Science Royal Holloway, University of London January 30, 2008 Outline Introduction to relational databases Introduction to Structured

More information

Mining Web Data. Lijun Zhang

Mining Web Data. Lijun Zhang Mining Web Data Lijun Zhang zlj@nju.edu.cn http://cs.nju.edu.cn/zlj Outline Introduction Web Crawling and Resource Discovery Search Engine Indexing and Query Processing Ranking Algorithms Recommender Systems

More information

1. PhP Project. Create a new PhP Project as shown below and click next

1. PhP Project. Create a new PhP Project as shown below and click next 1. PhP Project Create a new PhP Project as shown below and click next 1 Choose Local Web Site (Apache 24 needs to be installed) Project URL is http://localhost/projectname Then, click next We do not use

More information

SQL: Programming. Announcements (September 25) Motivation. CPS 116 Introduction to Database Systems. Pros and cons of SQL.

SQL: Programming. Announcements (September 25) Motivation. CPS 116 Introduction to Database Systems. Pros and cons of SQL. SQL: Programming CPS 116 Introduction to Database Systems Announcements (September 25) 2 Homework #2 due this Thursday Submit to Yi not through Jun s office door Solution available this weekend No class

More information

JDBC Architecture. JDBC API: This provides the application-to- JDBC Manager connection.

JDBC Architecture. JDBC API: This provides the application-to- JDBC Manager connection. JDBC PROGRAMMING JDBC JDBC Java DataBase Connectivity Useful for database driven applications Standard API for accessing relational databases Compatible with wide range of databases Current Version JDBC

More information

Kyle Brown Knowledge Systems Corporation by Kyle Brown and Knowledge Systems Corporation

Kyle Brown Knowledge Systems Corporation by Kyle Brown and Knowledge Systems Corporation Kyle Brown Knowledge Systems Corporation 1 What is the JDBC? What other persistence mechanisms are available? What facilities does it offer? How is it used? 2 JDBC is the Java DataBase Connectivity specification

More information

Calling SQL from a host language (Java and Python) Kathleen Durant CS 3200

Calling SQL from a host language (Java and Python) Kathleen Durant CS 3200 Calling SQL from a host language (Java and Python) Kathleen Durant CS 3200 1 SQL code in other programming languages SQL commands can be called from within a host language (e.g., C++ or Java) program.

More information

DataBase Lab JAVA-DATABASE CONNECTION. Eng. Haneen El-masry

DataBase Lab JAVA-DATABASE CONNECTION. Eng. Haneen El-masry In the name of Allah Islamic University of Gaza Faculty of Engineering Computer Engineering Department ECOM 4113 DataBase Lab Lab # 9 JAVA-DATABASE CONNECTION El-masry 2013 Objective In this lab, we turn

More information

COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA

COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA COP4540 TUTORIAL PROFESSOR: DR SHU-CHING CHEN TA: H S IN-YU HA OUTLINE Postgresql installation Introduction of JDBC Stored Procedure POSTGRES INSTALLATION (1) Extract the source file Start the configuration

More information

Introduction to Databases [p.3]

Introduction to Databases [p.3] Object Oriented Programming and Internet Application Development Unit 5 The Back-end in Internet Software Introduction to Databases Relational Databases Designing a Relational Database Manipulating Data

More information

SQL Client Example using KnoxShell in Apache Knox

SQL Client Example using KnoxShell in Apache Knox SQL Client Example using KnoxShell in Apache Knox The KnoxShell release artifact provides a small footprint client environment that removes all unnecessary server dependencies, configuration, binary scripts,

More information

Questions and Answers. A. A DataSource is the basic service for managing a set of JDBC drivers.

Questions and Answers. A. A DataSource is the basic service for managing a set of JDBC drivers. Q.1) What is, in terms of JDBC, a DataSource? A. A DataSource is the basic service for managing a set of JDBC drivers B. A DataSource is the Java representation of a physical data source C. A DataSource

More information

Tutorial: Developing a Simple Hello World Portlet

Tutorial: Developing a Simple Hello World Portlet Venkata Sri Vatsav Reddy Konreddy Tutorial: Developing a Simple Hello World Portlet CIS 764 This Tutorial helps to create and deploy a simple Portlet. This tutorial uses Apache Pluto Server, a freeware

More information

SQL: Programming Midterm in class next Thursday (October 5)

SQL: Programming Midterm in class next Thursday (October 5) Announcements (September 28) 2 Homework #1 graded Homework #2 due today Solution available this weekend SQL: Programming Midterm in class next Thursday (October 5) Open book, open notes Format similar

More information

DATABASE DESIGN I - 1DL300

DATABASE DESIGN I - 1DL300 DATABASE DESIGN I - 1DL300 Fall 2010 An introductory course on database systems http://www.it.uu.se/edu/course/homepage/dbastekn/ht10/ Manivasakan Sabesan Uppsala Database Laboratory Department of Information

More information

Java Database Connectivity (JDBC) 25.1 What is JDBC?

Java Database Connectivity (JDBC) 25.1 What is JDBC? PART 25 Java Database Connectivity (JDBC) 25.1 What is JDBC? JDBC stands for Java Database Connectivity, which is a standard Java API for database-independent connectivity between the Java programming

More information

The Web Application Developer s. Red Hat Database. View. October 30, Webcast. Patrick Macdonald, Fernando Nasser. Red Hat Database Engineering

The Web Application Developer s. Red Hat Database. View. October 30, Webcast. Patrick Macdonald, Fernando Nasser. Red Hat Database Engineering Red Hat Database The Web Application Developer s View Webcast October 30, 2001 Patrick Macdonald, Fernando Nasser Liam Stewart, Neil Padgett Red Hat Database Engineering Agenda Red Hat Database Web Interaction

More information

Cyrus Shahabi Computer Science Department University of Southern California C. Shahabi

Cyrus Shahabi Computer Science Department University of Southern California C. Shahabi Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California shahabi@usc.edu 1 Overview JDBC Package Connecting to databases with JDBC Executing

More information

Application Programming for Relational Databases

Application Programming for Relational Databases Application Programming for Relational Databases Cyrus Shahabi Computer Science Department University of Southern California shahabi@usc.edu 1 Overview JDBC Package Connecting to databases with JDBC Executing

More information

SQream Connector JDBC SQream Technologies Version 2.9.3

SQream Connector JDBC SQream Technologies Version 2.9.3 SQream Connector JDBC 2.9.3 SQream Technologies 2019-03-27 Version 2.9.3 Table of Contents The SQream JDBC Connector - Overview...................................................... 1 1. API Reference............................................................................

More information

(Worth 50% of overall Project 1 grade)

(Worth 50% of overall Project 1 grade) 第 1 页共 8 页 2011/11/8 22:18 (Worth 50% of overall Project 1 grade) You will do Part 3 (the final part) of Project 1 with the same team as for Parts 1 and 2. If your team partner dropped the class and you

More information

JDBC. Oracle ODBC SP API SP API. SQL server C function calls. SQL server ODBC SP API. Oracle DSN Oracle ODBC Oracle

JDBC. Oracle ODBC SP API SP API. SQL server C function calls. SQL server ODBC SP API. Oracle DSN Oracle ODBC Oracle How to Interact with DataBase? THETOPPERSWAY.COM Generally every DB vendor provides a User Interface through which we can easily execute SQL query s and get the result (For example Oracle Query Manager

More information

Fast Track to Java EE

Fast Track to Java EE Java Enterprise Edition is a powerful platform for building web applications. This platform offers all the advantages of developing in Java plus a comprehensive suite of server-side technologies. This

More information

BUSINESS INTELLIGENCE LABORATORY. Data Access: Relational Data Bases. Business Informatics Degree

BUSINESS INTELLIGENCE LABORATORY. Data Access: Relational Data Bases. Business Informatics Degree BUSINESS INTELLIGENCE LABORATORY Data Access: Relational Data Bases Business Informatics Degree RDBMS data access 2 Protocols and API ODBC, OLE DB, ADO, ADO.NET, JDBC JDBC Programming Java classes java.sql

More information

CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1

CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1 P a g e 1 CS506 Web Programming and Development Solved Subjective Questions With Reference For Final Term Lecture No 1 Q1 Describe some Characteristics/Advantages of Java Language? (P#12, 13, 14) 1. Java

More information

Tutorial: Using Java/JSP to Write a Web API

Tutorial: Using Java/JSP to Write a Web API Tutorial: Using Java/JSP to Write a Web API Contents 1. Overview... 1 2. Download and Install the Sample Code... 2 3. Study Code From the First JSP Page (where most of the code is in the JSP Page)... 3

More information

Testing JDBC Applications Using DataDirect Test for JDBC

Testing JDBC Applications Using DataDirect Test for JDBC Testing JDBC Applications Using DataDirect Test for JDBC Introduction As a major designer of the JDBC specification, DataDirect Technologies has used its expertise to develop the first Pure Java JDBC testing

More information

JDBC MOCK TEST JDBC MOCK TEST IV

JDBC MOCK TEST JDBC MOCK TEST IV http://www.tutorialspoint.com JDBC MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to JDBC Framework. You can download these sample mock tests at your

More information

Database Application Development

Database Application Development CS 500: Fundamentals of Databases Database Application Development supplementary material: Database Management Systems Sec. 6.2, 6.3 DBUtils.java, Student.java, Registrar.java, RegistrarServlet.java, PgRegistrar.sql

More information

Introduction to Databases

Introduction to Databases JAVA JDBC Introduction to Databases Assuming you drove the same number of miles per month, gas is getting pricey - maybe it is time to get a Prius. You are eating out more month to month (or the price

More information

Enterprise Java Unit 1- Chapter 6 Prof. Sujata Rizal

Enterprise Java Unit 1- Chapter 6 Prof. Sujata Rizal Introduction JDBC is a Java standard that provides the interface for connecting from Java to relational databases. The JDBC standard is defined by Sun Microsystems and implemented through the standard

More information

Running SQL in Java and PHP

Running SQL in Java and PHP Running SQL in Java and PHP FCDB 9.6 9.7 Dr. Chris Mayfield Department of Computer Science James Madison University Feb 28, 2018 Introduction to JDBC JDBC = Java Database Connectivity 1. Connect to the

More information

The Design of JDBC The Structured Query Language Basic JDBC Programming Concepts Query Execution Scrollable and Updatable Result Sets

The Design of JDBC The Structured Query Language Basic JDBC Programming Concepts Query Execution Scrollable and Updatable Result Sets Course Name: Advanced Java Lecture 13 Topics to be covered The Design of JDBC The Structured Query Language Basic JDBC Programming Concepts Query Execution Scrollable and Updatable Result Sets Introducing

More information

COMP102: Introduction to Databases, 23

COMP102: Introduction to Databases, 23 COMP102: Introduction to Databases, 23 Dr Muhammad Sulaiman Khan Department of Computer Science University of Liverpool U.K. 04 April, 2011 Programming with SQL Specific topics for today: Client/Server

More information

MANTHLY TEST SEPTEMBER 2017 QUESTION BANK CLASS: XII SUBJECT: INFORMATICS PRACTICES (065)

MANTHLY TEST SEPTEMBER 2017 QUESTION BANK CLASS: XII SUBJECT: INFORMATICS PRACTICES (065) MANTHLY TEST SEPTEMBER 2017 QUESTION BANK CLASS: XII SUBJECT: INFORMATICS PRACTICES (065) DATABASE CONNECTIVITY TO MYSQL Level- I Questions 1. What is the importance of java.sql.*; in java jdbc connection?

More information

Databases and JDBC. by Vlad Costel Ungureanu for Learn Stuff

Databases and JDBC. by Vlad Costel Ungureanu for Learn Stuff Databases and JDBC by Vlad Costel Ungureanu for Learn Stuff Working with Databases Create database using SQL scripts Connect to the database server using a driver Communicate with the database Execute

More information

Database Programming Overview. COSC 304 Introduction to Database Systems. Database Programming. JDBC Interfaces. JDBC Overview

Database Programming Overview. COSC 304 Introduction to Database Systems. Database Programming. JDBC Interfaces. JDBC Overview COSC 304 Introduction to Database Systems Database Programming Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Database Programming Overview Most user interaction with

More information

Chapter 1 An introduction to relational databases and SQL

Chapter 1 An introduction to relational databases and SQL Chapter 1 An introduction to relational databases and SQL Murach's MySQL, C1 2015, Mike Murach & Associates, Inc. Slide 1 Objectives Knowledge Identify the three main hardware components of a client/server

More information

Assignment #3 CSCI 201 Spring % of course grade Title Weathermeister Back-End API Integration

Assignment #3 CSCI 201 Spring % of course grade Title Weathermeister Back-End API Integration Assignment #3 CSCI 201 4.5% of course grade Title Weathermeister Back-End API Integration Topics Covered Java Classes HTML CSS Basic Java Topics Java Servlets JSP JavaScript AJAX Databases SQL JDBC Overview

More information

Accessing databases in Java using JDBC

Accessing databases in Java using JDBC Accessing databases in Java using JDBC Introduction JDBC is an API for Java that allows working with relational databases. JDBC offers the possibility to use SQL statements for DDL and DML statements.

More information

Release Bulletin jconnect for JDBC 7.0

Release Bulletin jconnect for JDBC 7.0 Release Bulletin jconnect for JDBC 7.0 Document ID: DC74635-01-0700-02 Last revised: March 2, 2010 Topic Page 1. Accessing current release bulletin information 2 2. Product summary 2 3. Special installation

More information

SQL and Java. Database Systems Lecture 20 Natasha Alechina

SQL and Java. Database Systems Lecture 20 Natasha Alechina Database Systems Lecture 20 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

Database Explorer Quickstart

Database Explorer Quickstart Database Explorer Quickstart Last Revision: Outline 1. Preface 2. Requirements 3. Introduction 4. Creating a Database Connection 1. Configuring a JDBC Driver 2. Creating a Connection Profile 3. Opening

More information

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java

COURSE DETAILS: CORE AND ADVANCE JAVA Core Java COURSE DETAILS: CORE AND ADVANCE JAVA Core Java 1. Object Oriented Concept Object Oriented Programming & its Concepts Classes and Objects Aggregation and Composition Static and Dynamic Binding Abstract

More information

13.1 Relational Databases (continued) 13.1 Relational Databases. - Logical model

13.1 Relational Databases (continued) 13.1 Relational Databases. - Logical model 13.1 Relational Databases 13.1 Relational Databases (continued) - A relational database is a collection of tables of data, each of which has one special column that stores the primary keys of the table

More information

13.1 Relational Databases

13.1 Relational Databases 13.1 Relational Databases - A relational database is a collection of tables of data, each of which has one special column that stores the primary keys of the table - Designing a relational database for

More information

JDBC, Transactions. Niklas Fors JDBC 1 / 38

JDBC, Transactions. Niklas Fors JDBC 1 / 38 JDBC, Transactions SQL in Programs Embedded SQL and Dynamic SQL JDBC Drivers, Connections, Statements, Prepared Statements Updates, Queries, Result Sets Transactions Niklas Fors (niklas.fors@cs.lth.se)

More information

Lab 6-1: MySQL Server

Lab 6-1: MySQL Server Lab 6-1: MySQL Server 1. Objective The participants of the course will be able to: Install and configure a MySQL server. Define a c-program, which enables to access (write and read) to the database of

More information

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes Session 8 Deployment Descriptor 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/_status_codes

More information

CSCI/CMPE Object-Oriented Programming in Java JDBC. Dongchul Kim. Department of Computer Science University of Texas Rio Grande Valley

CSCI/CMPE Object-Oriented Programming in Java JDBC. Dongchul Kim. Department of Computer Science University of Texas Rio Grande Valley CSCI/CMPE 3326 Object-Oriented Programming in Java JDBC Dongchul Kim Department of Computer Science University of Texas Rio Grande Valley Introduction to Database Management Systems Storing data in traditional

More information

13 Creation and Manipulation of Tables and Databases

13 Creation and Manipulation of Tables and Databases 150.420 Informationslogistik SQL Handout No. 9 SS 2013 13 Creation and Manipulation of Tables and Databases 13.1 Creation and Deletion Databases can be created and deleted using respectively. CREATE DATABASE

More information

INTRODUCTION TO JDBC - Revised Spring

INTRODUCTION TO JDBC - Revised Spring INTRODUCTION TO JDBC - Revised Spring 2006 - 1 What is JDBC? Java Database Connectivity (JDBC) is an Application Programmers Interface (API) that defines how a Java program can connect and exchange data

More information

INTRODUCTION TO JDBC - Revised spring

INTRODUCTION TO JDBC - Revised spring INTRODUCTION TO JDBC - Revised spring 2004 - 1 What is JDBC? Java Database Connectivity (JDBC) is a package in the Java programming language and consists of several Java classes that deal with database

More information

Running SQL in Java and PHP

Running SQL in Java and PHP Running SQL in Java and PHP FCDB 9.6 9.7 Dr. Chris Mayfield Department of Computer Science James Madison University Mar 01, 2017 Introduction to JDBC JDBC = Java Database Connectivity 1. Connect to the

More information

JDBC - INTERVIEW QUESTIONS

JDBC - INTERVIEW QUESTIONS JDBC - INTERVIEW QUESTIONS http://www.tutorialspoint.com/jdbc/jdbc_interview_questions.htm Copyright tutorialspoint.com Dear readers, these JDBC Interview Questions have been designed specially to get

More information

ThingWorx Relational Databases Connectors Extension User Guide

ThingWorx Relational Databases Connectors Extension User Guide ThingWorx Relational Databases Connectors Extension User Guide Version 1.0 Software Change Log... 2 Introduction and Installation... 2 About the Relational Databases Connectors Extension... 2 Installing

More information

Part I: Stored Procedures. Introduction to SQL Programming Techniques. CSC 375, Fall 2017

Part I: Stored Procedures. Introduction to SQL Programming Techniques. CSC 375, Fall 2017 Introduction to SQL Programming Techniques CSC 375, Fall 2017 The Six Phases of a Project: Enthusiasm Disillusionment Panic Search for the Guilty Punishment of the Innocent Praise for non-participants

More information

Outline. Lecture 10: Database Connectivity -JDBC. Java Persistence. Persistence via Database

Outline. Lecture 10: Database Connectivity -JDBC. Java Persistence. Persistence via Database Outline Lecture 10: Database Connectivity -JDBC Persistence via Database JDBC (Java Database Connectivity) JDBC API Wendy Liu CSC309F Fall 2007 1 2 Java Persistence Persistence via Database JDBC (Java

More information

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p. Preface p. xiii Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p. 11 Creating the Deployment Descriptor p. 14 Deploying Servlets

More information

HPCC JDBC Driver. Boca Raton Documentation Team

HPCC JDBC Driver. Boca Raton Documentation Team Boca Raton Documentation Team HPCC JDBC Driver Boca Raton Documentation Team We welcome your comments and feedback about this document via email to Please include Documentation

More information

UNIT-3 Java Database Client/Server

UNIT-3 Java Database Client/Server UNIT-3 Java Database Client/Server TOPICS TO BE COVERED 3.1 Client-Server Design: Two-Tier Database Design, Three-Tier Database Design 3.2 The JDBC API: The API Components, Database Creation, table creation

More information

Author - Ashfaque Ahmed

Author - Ashfaque Ahmed Complimentary material for the book Software Engineering in the Agile World (ISBN: 978-1983801570) published by Create Space Independent Publishing Platform, USA Author - Ashfaque Ahmed Technical support

More information

Top 50 JDBC Interview Questions and Answers

Top 50 JDBC Interview Questions and Answers Top 50 JDBC Interview Questions and Answers 1) What is the JDBC? JDBC stands for Java Database Connectivity. JDBC is a Java API that communicates with the database and execute SQLquery. 2) What is a JDBC

More information

Lecture 2. Introduction to JDBC

Lecture 2. Introduction to JDBC Lecture 2 Introduction to JDBC Introducing JDBC According to Sun, JDBC is not an acronym, but is commonly misinterpreted to mean Java DataBase Connectivity JDBC: is an API that provides universal data

More information

Tiers (or layers) Separation of concerns

Tiers (or layers) Separation of concerns Tiers (or layers) Separation of concerns Hiding the type of storage from the client class Let s say we have a program that needs to fetch objects from a storage. Should the program have to be concerned

More information

SQL-PL Interface. Murali Mani. Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL

SQL-PL Interface. Murali Mani. Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL SQL-PL Interface Some Possible Options Web Interface Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL Non-Web Interface JDBC with Oracle/mySQL Also other

More information

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started

Application Development in JAVA. Data Types, Variable, Comments & Operators. Part I: Core Java (J2SE) Getting Started Application Development in JAVA Duration Lecture: Specialization x Hours Core Java (J2SE) & Advance Java (J2EE) Detailed Module Part I: Core Java (J2SE) Getting Started What is Java all about? Features

More information

FUEGO 5.5 WORK PORTAL. (Using Tomcat 5) Fernando Dobladez

FUEGO 5.5 WORK PORTAL. (Using Tomcat 5) Fernando Dobladez FUEGO 5.5 WORK PORTAL SINGLE-SIGN-ON WITH A WINDOWS DOMAIN (Using Tomcat 5) Fernando Dobladez ferd@fuego.com December 30, 2005 3 IIS CONFIGURATION Abstract This document describes a way of configuring

More information

Enterprise Systems. Lecture 02: JDBC. Behzad BORDBAR

Enterprise Systems. Lecture 02: JDBC. Behzad BORDBAR Enterprise Systems Lecture 02: JDBC Behzad BORDBAR 22 Contents Running example Sample code for beginners Properties to configure Statements and ResultSet Pitfalls of using ResultSet getobject() vs. getxxx()

More information

CPET 581 E-Commerce & Business Technologies. Topics

CPET 581 E-Commerce & Business Technologies. Topics CPET 581 E-Commerce & Business Technologies Design and Build E-Commerce Web Sites, Mobile Sites, and Apps Lecture Note 1 of 2 References: *Chapter 4. Building an E-Commerce Presence: Web Sites, Mobile

More information

This lecture. Databases - JDBC I. Application Programs. Database Access End Users

This lecture. Databases - JDBC I. Application Programs. Database Access End Users This lecture Databases - I The lecture starts discussion of how a Java-based application program connects to a database using. (GF Royle 2006-8, N Spadaccini 2008) Databases - I 1 / 24 (GF Royle 2006-8,

More information

c360 Forecast Manager Installation and Configuration Guide

c360 Forecast Manager Installation and Configuration Guide c360 Forecast Manager Installation and Configuration Guide Microsoft Dynamics CRM 4.0 compatible c360 Solutions, Inc. www.c360.com Products@c360.com Table of Contents c360 Forecast Manager Installation

More information

try { Class.forName( "sun.jdbc.odbc.jdbcodbcdriver"); Database = DriverManager.getConnection(url,userID,password);

try { Class.forName( sun.jdbc.odbc.jdbcodbcdriver); Database = DriverManager.getConnection(url,userID,password); Listing 9-1 The Constructor public conxtest() String url = "jdbc:odbc:customers"; String userid = "jim"; String password = "keogh"; Statement DataRequest; ResultSet Results; Class.forName( "sun.jdbc.odbc.jdbcodbcdriver");

More information

(C) Global Journal of Engineering Science and Research Management

(C) Global Journal of Engineering Science and Research Management ANDROID BASED SECURED PHOTO IDENTIFICATION SYSTEM USING DIGITAL WATERMARKING Prof.Abhijeet A.Chincholkar *1, Ms.Najuka B.Todekar 2, Ms.Sunita V.Ghai 3 *1 M.E. Digital Electronics, JCOET Yavatmal, India.

More information

a. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22.

a. Jdbc:ids://localhost:12/conn?dsn=dbsysdsn 21. What is the Type IV Driver URL? a. 22. Answers 1. What is the super interface to all the JDBC Drivers, specify their fully qualified name? a. Java.sql.Driver i. JDBC-ODBC Driver ii. Java-Native API Driver iii. All Java Net Driver iv. Java Native

More information