JDBC drivers are divided into four types or levels. The different types of jdbc drivers are:

Size: px
Start display at page:

Download "JDBC drivers are divided into four types or levels. The different types of jdbc drivers are:"

Transcription

1 How many types of JDBC Drivers are present and what are they? JDBC drivers are divided into four types or levels. The different types of jdbc drivers are: Type 1: JDBC-ODBC Bridge driver (Bridge) Type 2: Native-API/partly Java driver (Native) Type 3: All Java/Net-protocol driver (Middleware) Type 4: All Java/Native-protocol driver (Pure) What Class.forName will do while loading drivers? It is used to create an instance of a driver and register it with the Driver Manager. When you have loaded a driver, it is available for making a connection with a DBMS. What are stored procedures? How is it useful? A stored procedure is a set of statements/commands which reside in the database. The stored procedure is pre-compiled and saves the database the effort of parsing and compiling sql statements every time a query is run. Each database has its own stored procedure language, usually a variant of C with a SQL preprocessor. Before the advent of 3-tier/n-tier architecture it was pretty common for stored procedures to implement the business logic (A lot of systems still do it). The biggest advantage is of course speed. Also certain kinds of data manipulations are not achieved in SQL. Stored procedures provide a mechanism to do these manipulations. Stored procedures are also useful when you want to do Batch updates/exports kind of stuff on the db. The overhead of a JDBC Connection may be significant in these cases. How to call a Stored Procedure from JDBC? The first step is to create a CallableStatement object. As with Statement and PreparedStatement objects, this is done with an open Connection object. A CallableStatement object contains a call to a stored procedure. CallableStatement cs = con.preparecall("{call SHOW_SUPPLIERS}"); ResultSet rs = cs.executequery(); The part that is enclosed in curly braces is the escape syntax for stored procedures. When the driver encounters "{call SHOW_SUPPLIERS}", it will translate this escape syntax into the native SQL used by the database to call the stored procedure named SHOW_SUPPLIERS. Is the JDBC-ODBC Bridge multi-threaded? No. The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC- ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multithreaded Java programs may use the Bridge, but they won't get the advantages of multi-threading. What is the advantage of using PreparedStatement? If we are using PreparedStatement the execution time will be less. This is because PreparedStatement object contains SQL statement that has been precompiled. Thus, when the PreparedStatement is later executed, the DBMS does not have to recompile the SQL statement and prepared an execution plan - it simply runs the statement. What is a "dirty read"?

2 Quite often in database processing, we come across the situation wherein one transaction can change a value, and a second transaction can read this value before the original change has been committed or rolled back. This is known as a dirty read scenario because there is always the possibility that the first transaction may rollback the change, resulting in the second transaction having read an invalid value. What are different types of isolation levels in JDBC and explain where you can use them? Five types of isolation levels are as follows: 1. TRANSACTION_READ_COMMITED If the application needs only committed records, then TRANSACTION_READ_COMMITED isolation is the good choice. 2. TRANSACTION_REPEATABLE_READ If the application needs to read a row exclusively till you finish your work, then TRANSACTION_REPEATABLE_READ is the best choice. 3. TRANSACTION_SERIALIZABLE If the application needs to control all of the transaction problems (dirty read, phantom read and unrepeatable read), you can choose TRANSACTION_SERIALIZABLE for maximum safety. 4. TRANSACTION_NONE If the application doesn t have to deal with concurrent transactions, then the best choice is TRANSACTION_NONE to improve performance. 5. TRANSACTION_READ_UNCOMMITED If the application is searching for records from the database then you can easily choose TRANSACTION_READ_UNCOMMITED because you need not worry about other programs that are inserting records at the same time. What are the different types of statements in JDBC? The JDBC API has 3 Statements 1. Statement, 2. PreparedStatement, 3. CallableStatement. The key features of these are as follows: Statement 1. This interface is used for executing a static SQL statement and returning the results it produces. 2. The object of Statement class can be created using Connection.createStatement() method. PreparedStatement 1. A SQL statement is pre-compiled and stored in a PreparedStatement object. 2. This object can then be used to efficiently execute this statement multiple times. 3. The object of PreparedStatement class can be created using Connection.prepareStatement() method. This extends Statement interface.

3 CallableStatement 1. This interface is used to execute SQL stored procedures. 2. This extends PreparedStatement interface. 3. The object of CallableStatement class can be created using Connection.prepareCall() method. What is JDBC? JDBC may stand for Java Database Connectivity. It is also a trade mark. JDBC is a layer of abstraction that allows users to choose between databases. It allows you to change to a different database engine and to write to a single API. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database. What are the common tasks of JDBC? Common tasks of JDBC are as follows: 1. Create an instance of a JDBC driver or load JDBC drivers through jdbc.drivers 2. Register a driver 3. Specify a database 4. Open a database connection 5. Submit a query 6. Receive result 7. Process result What interfaces are used by JDBC? List of interfaces used by JDBC with description are as follows: Interface java.sql.connection java.sql.databasemetadata java.sql.driver java.sql.preparedstatement java.sql.resultset java.sql.resultsetmetadata java.sql.statement javax.sql.connectioneventlistener javax.sql.connectionpooldatasource javax.sql.datasource javax.sql.pooledconnection Description Interface used to establish a connection to a database. SQL statements run within the context of a connection. Interface used to return information about the database. Interface used to locate the driver for a particular database management system. Interface used to send precompiled SQL statements to the database server and obtain results. Interface used to process the results returned from executing an SQL statement. Interface used to return information about the columns in a ResultSet object. Interface used to send static SQL statements to the database server and obtain results. Receives events that a PooledConnection object generates. Factory for PooledConnection objects. A ConnectionPoolDataSource object is usually registered with a JNDI service. A factory for Connection objects. A DataSource object is usually registered with a JNDI service provider. A PooledConnection object represents a physical connection to a data source. How can you Load the JDBC driver? To load the driver, you need to load the appropriate class, make a driver instance and register it with the JDBC driver manager. Use Class.forName(String) method. This method takes a string representing a fully qualified class name and loads the corresponding class. Here is an example: try { Class.forName("connect.microsoft.MicrosoftDriver"); } catch(classnotfoundexception e) {

4 } System.err.println("Error loading driver: " + e); The string taken in the Class.forName() method is the fully qualified class name. You should pay attention to the CLASSPATH setting. If the JDBC driver vendors distribute their drivers in a JAR file, be sure to include the JAR file in your CLASSPATH setting. How can you make the connection? Connection is made using following Method getconnection(string url, String username, String password); This method establishes a connection to specified database url. It takes following three string types of arguments. url: Database url where stored or created your database username: User name of MySQL password: Password of MySQL Include following code block to make a connection and create Statement. try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:dumy"; "user", "pass"); Statement stmt = con.createstatement(); }catch( Exception e ) { e.printstacktrace(); } How can you create JDBC statements? Using Statement interface we can create JDBC statements as follows Statement stmt = con.createstatement(); //con is the connection object reference Different types of statements are: Prepared Statement - whenever we want to execute single query multiple times then we will go to this statement Callable Statement - whenever we want to call the stored procedures from database Server then we will use this statement What's the difference between a primary key and a unique key? Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only. How to make a query?

5 Create a Statement object and calls the Statement.executeQuery method to select data from the database. The result of the query are returned in a ResultSet object. Statement stmt = con.createstatement(); ResultSet result = stmt.executequery("select data FROM table"); How can you retrieve data from the ResultSet? Use get methods to retrieve data from returned ResultSet object. Statement stmt = null; String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from COFFEES"; try { stmt = con.createstatement(); ResultSet rs = stmt.executequery(query); while (rs.next()) { // fetch data from resultset using get methods String coffeename = rs.getstring("cof_name"); int supplierid = rs.getint("sup_id"); float price = rs.getfloat("price"); int sales = rs.getint("sales"); int total = rs.getint("total"); } } catch (SQLException e ) { JDBCTutorialUtilities.printSQLException(e); } finally { if (stmt!= null) { stmt.close(); } } The method getstring is invoked on the ResultSet object rs, so getstring will retrieve (get) the value stored in the column COF_NAME in the current row of rs. How to navigate the ResultSet? By default the result set cursor points to the row before the first row of the result set. A call to next() retrieves the first result set row. The cursor can also be moved by calling one of the following ResultSet methods: beforefirst(): Puts cursor before the first row of the result set. first(): Puts cursor on the first row of the result set. last(): Puts cursor before the last row of the result set. afterlast(): Puts cursor beyond last row of the result set. absolute(pos): Puts cursor at the row number position where absolute(1) is the first row and absolute(-1) is the last row. relative(pos): Puts cursor at a row relative to its current position where relative(1) moves row cursor one row forward. How to update a ResultSet?

6 An updatable result set allows modification to data in a table through the result set. You can update a value in a result set by calling the ResultSet Update Methods on the row where the cursor is positioned. The type value here is the same used when retrieving a value from the result set, for example, updatestring updates a String value and updatedouble updates a double value in the result set. rs.updatedouble("balance", rs.getdouble("balance") ); The update applies only to the result set until the call to rs.updaterow(), which updates the underlying database. To delete the current row, use rs.deleterow(). To insert a new row, use rs.movetoinsertrow(). What are the Large object types supported by Oracle? Blob and Clob. How can you use PreparedStatement? The advantage to this is that in most cases, this SQL statement will be sent to the DBMS right away, where it will be compiled. As a result, the PreparedStatement object contains not just an SQL statement, but an SQL statement that has been precompiled. This means that when the PreparedStatement is executed, the DBMS can just run the PreparedStatement 's SQL statement without having to compile it first. PreparedStatement updatesales = con.preparestatement( "UPDATE COFFEES SET SALES =? WHERE COF_NAME LIKE?"); Use PreparedStatement object setter methods to set the values for place holders. How to set a scroll type? Both Statements and PreparedStatements have an additional constructor that accepts a scroll type and an update type parameter. The scroll type value can be one of the following values: ResultSet.TYPE_FORWARD_ONLY: Default behavior in JDBC 1.0, application can only call next() on the result set. ResultSet.SCROLL_SENSITIVE: ResultSet is fully navigable and updates are reflected in the result set as they occur. ResultSet.SCROLL_INSENSITIVE: Result set is fully navigable, but updates are only visible after the result set is closed. You need to create a new result set to see the results. How to set update type parameter? To set update type parameter in the constructors of Statements and PreparedStatements, you may use ResultSet.CONCUR_READ_ONLY: The result set is read only. ResultSet.CONCUR_UPDATABLE: The result set can be updated.

7 How to do a batch job? By default, every JDBC statement is sent to the database individually. To send multiple statements at one time, use addbatch() method to append statements to the original statement and call executebatch() method to submit entire statement. Statement stmt = con.createstatement(); stmt.addbatch("update registration set balance=balance-5.00 where theuser="+theuser); stmt.addbatch("insert into auctionitems(description, startprice) " + "values("+description+","+startprice+")");... int[] results = stmt.executebatch(); The return result of the addbatch() method is an array of row counts affected for each statement executed in the batch job. If a problem occurred, a java.sql.batchupdateexception is thrown. An incomplete array of row counts can be obtained from BatchUpdateException by calling its getupdatecounts() method. How to use meta data to check a column type? Use getmetadata().getcolumntype() method to check data type. For example to retrieve an Integer, you may check it first: int count=0; Connection con=getconnection(); Statement stmt= con.createstatement(); stmt.executequery("select counter from atable"); ResultSet rs = stmt.getresultset(); if(rs.next()) { if(rs.getmetadata().getcolumntype(1) == Types.INTEGER) { Integer i = (Integer)rs.getObject(1); count = i.intvalue(); } } rs.close(); Why cannot java.util.date match with java.sql.date? Because java.util.date represents both date and time. SQL has three types to represent date and time. java.sql.date -- (00/00/00) java.sql.time -- (00:00:00) java.sql.timestamp -- in nanoseconds Note that they are subclasses of java.util.date. How to convert java.util.date value to java.sql.date? Use the code below: Calendar currenttime=calendar.getinstance(); java.sql.date startdate= new java.sql.date((currenttime.gettime()).gettime()); OR SimpleDateFormat template = new SimpleDateFormat("yyyy-MM-dd");

8 java.util.date enddate = new java.util.date("10/31/99"); java.sql.date sqldate = java.sql.date.valueof(template.format(enddate)); What does setautocommit do? When a connection is created, it is in auto-commit mode. This means that each individual SQL statement is treated as a transaction and will be automatically committed right after it is executed. The way to allow two or more statements to be grouped into a transaction is to disable auto-commit mode: con.setautocommit(false); Once auto-commit mode is disabled, no SQL statements will be committed until you call the method commit explicitly. con.setautocommit(false); PreparedStatement updatesales = con.preparestatement( "UPDATE COFFEES SET SALES =? WHERE COF_NAME LIKE?"); updatesales.setint(1, 50); updatesales.setstring(2, "Colombian"); updatesales.executeupdate(); PreparedStatement updatetotal = con.preparestatement("update COFFEES SET TOTAL=TOTAL +? WHERE COF_NAME LIKE?"); updatetotal.setint(1, 50); updatetotal.setstring(2, "Colombian"); updatetotal.executeupdate(); con.commit(); con.setautocommit(true); What is the difference among "dropping a table", "truncating a table" and "deleting all records" from a table? Dropping: Table structure + Data are deleted. Invalidates the dependent objects and drops the indexes Truncating: Data alone deleted. Performs an automatic commit and faster than delete. Delete: Data alone deleted. Doesn t perform automatic commit What are cursors? Explain different types of cursors. What are the disadvantages of cursors? How can you avoid cursors? Cursors allow row-by-row prcessing of the resultsets. Types of cursors: Static, Dynamic, Forward-only, Keyset-driven. Disadvantages of cursors:

9 A) In cursors each time you fetch a new row it does a round trip with the database thereby increase network use and time. B) There is also restriction on select statements that can be used in cursors C) It also uses more resources and temporary memory Cursors can be avoided with the help of careful implementation of while loop and other set based operations. What are triggers? How to invoke a trigger on demand? Triggers are special kind of stored procedures that get executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table. Triggers can't be invoked on demand. They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens on the table on which they are defined. Triggers are generally used to implement business rules, auditing. Triggers can also be used to extend the referential integrity checks, but wherever possible, use constraints for this purpose, instead of triggers, as constraints are much faster. DBC ODBC Connection In Java In this section we will read about the various aspects of JDBC ODBC such as, JDBC-ODBC bridge, JDBC ODBC connection, how to create DSN etc. JDBC-ODBC Bridge As its name JDBC-ODBC bridge, it acts like a bridge between the Java Programming Language and the ODBC to use the JDBC API. To use the JDBC API with the existing ODBC Sun Microsystems (Now Oracle Corporation) provides the driver named JdbcOdbcDriver. Full name of this class is sun.jdbc.odbc.jdbcodbcdriver. JDBC ODBC Connection To Connect the JDBC and ODBC we should have a database. Then we would be required to create a DSN to use JDBC ODBC Bridge driver. The DSN (Data Source Name) specifies the connection of an ODBC to a specific server. How To Create DSN In Java. To create a DSN we would be required to follow some basic steps. These steps are as follows : Here I am using the MS-Access as database system. Before creating DSN to use MS-Access with JDBC technology the database file should be created in advance. First step is to go through the Control Panel -> Administrative Tools -> Data Sources (ODBC).

10 Go to the tab System DSN in the ODBC Data Source Administrator dialog box then, Click on Add button -> select MS Access Driver (*.mdb) -> click on Finish button. In the next step a dialog box ODBC Microsoft Access Setup will be opened then provide the field's values corresponding to the field's label (i.e. provide the DSN name as you wish) and then click on the "Select" button. In the next step a new dialog box "Select database" will be opened. Here you have to select the directory where you have stored your file and provide the name in the place of the Database Name and then press ok -> ok -> ok.

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

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

JAVA AND DATABASES. Summer 2018

JAVA AND DATABASES. Summer 2018 JAVA AND DATABASES Summer 2018 JDBC JDBC (Java Database Connectivity) an API for working with databases in Java (works with any tabular data, but focuses on relational databases) Works with 3 basic actions:

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

Persistency Patterns. Repository and DAO

Persistency Patterns. Repository and DAO Persistency Patterns Repository and DAO 1 Repository pattern Basically, the Repository pattern just means putting a façade over your persistence system so that you can shield the rest of your application

More information

UNIT III - JDBC Two Marks

UNIT III - JDBC Two Marks UNIT III - JDBC Two Marks 1.What is JDBC? JDBC stands for Java Database Connectivity, which is a standard Java API for databaseindependent connectivity between the Java programming language and a wide

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

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

Databases 2012 Embedded SQL

Databases 2012 Embedded SQL Databases 2012 Christian S. Jensen Computer Science, Aarhus University SQL is rarely written as ad-hoc queries using the generic SQL interface The typical scenario: client server database SQL is embedded

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

JDBC 3.0. Java Database Connectivity. 1 Java

JDBC 3.0. Java Database Connectivity. 1 Java JDBC 3.0 Database Connectivity 1 Contents 1 JDBC API 2 JDBC Architecture 3 Steps to code 4 Code 5 How to configure the DSN for ODBC Driver for MS-Access 6 Driver Types 7 JDBC-ODBC Bridge 8 Disadvantages

More information

Database connectivity (II)

Database connectivity (II) Lecture (07) Database connectivity (II) Dr. Ahmed ElShafee 1 Dr. Ahmed ElShafee, ACU Spring 2011, Distributed Systems Agenda Connecting DB 2 Dr. Ahmed ElShafee, ACU Spring 2011, Distributed Systems The

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

3) execute() Usage: when you cannot determine whether SQL is an update or query return true if row is returned, use getresultset() to get the

3) execute() Usage: when you cannot determine whether SQL is an update or query return true if row is returned, use getresultset() to get the Agenda Lecture (07) Database connectivity (II) Connecting DB Dr. Ahmed ElShafee 1 Dr. Ahmed ElShafee, ACU Spring 2011, Distributed Systems 2 Dr. Ahmed ElShafee, ACU Spring 2011, Distributed Systems The

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

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 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

SNS COLLEGE OF ENGINEERING, Coimbatore

SNS COLLEGE OF ENGINEERING, Coimbatore SNS COLLEGE OF ENGINEERING, Coimbatore 641 107 Accredited by NAAC UGC with A Grade Approved by AICTE and Affiliated to Anna University, Chennai IT6503 WEB PROGRAMMING UNIT 03 JDBC JDBC Overview JDBC implementation

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

Three-Tier Architecture

Three-Tier Architecture Three-Tier Architecture Located @ Any PC HTTP Requests Microsoft Internet Explorer HTML Located @ Your PC Apache Tomcat App Server Java Server Pages (JSPs) JDBC Requests Tuples Located @ DBLab MS SQL Server

More information

Unit 2 JDBC Programming

Unit 2 JDBC Programming Q1. What is JDBC? Explain the types of JDBC drivers? Ans. What is JDBC? JDBC is an API, which is used in java programming for interacting with database. JDBC (Java DataBase Connection) is the standard

More information

O ne of the most important features of JavaServer

O ne of the most important features of JavaServer INTRODUCTION TO DATABASES O ne of the most important features of JavaServer Pages technology is the ability to connect to a Databases store and efficiently manage large collections of information. JSP

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

Self-test Database application programming with JDBC

Self-test Database application programming with JDBC Self-test Database application programming with JDBC Document: e1216test.fm 16 January 2018 ABIS Training & Consulting Diestsevest 32 / 4b B-3000 Leuven Belgium TRAINING & CONSULTING INTRODUCTION TO THE

More information

CSCC43H: Introduction to Databases. Lecture 9

CSCC43H: Introduction to Databases. Lecture 9 CSCC43H: Introduction to Databases Lecture 9 Wael Aboulsaadat Acknowledgment: these slides are partially based on Prof. Garcia-Molina & Prof. Ullman slides accompanying the course s textbook. CSCC43: Introduction

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

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

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

JDBC BASIC 19/05/2012. Objectives. Java Database Connectivity. Definitions of JDBC. Part 1. JDBC basic Working with JDBC Adv anced JDBC programming

JDBC BASIC 19/05/2012. Objectives. Java Database Connectivity. Definitions of JDBC. Part 1. JDBC basic Working with JDBC Adv anced JDBC programming Objectives Java Database Connectivity JDBC basic Working with JDBC Adv anced JDBC programming By Võ Văn Hải Faculty of Information Technologies Summer 2012 2/27 Definitions of JDBC JDBC APIs, which provides

More information

Java E-Commerce Martin Cooke,

Java E-Commerce Martin Cooke, Java E-Commerce Martin Cooke, 2002 1 Java Database Connectivity (JDBC) Plan Java database connectivity API (JDBC) Examples Advanced features JNDI JDBC 13/02/2004 Java E-Commerce Martin Cooke, 2003 2 Design

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

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

Introduction to JDBC. Lecture 12

Introduction to JDBC. Lecture 12 Introduction to JDBC Lecture 12 1 Road Map Introduction to JDBC/JDBC Drivers Overview: Six Steps to using JDBC Example 1: Setting up Tables via JDBC Example 2: Inserting Data via JDBC Example 3: Querying

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

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

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

Index. & (ampersand), specifying connection properties, 121? (question mark), specifying connection properties, 121

Index. & (ampersand), specifying connection properties, 121? (question mark), specifying connection properties, 121 Index & (ampersand), specifying connection properties, 121? (question mark), specifying connection properties, 121 A absolute(int) method, scrollable ResultSets, 215 Access URL formats, 94 ACID (atomicity,

More information

Java and the Java DataBase Connectivity (JDBC) API. Todd Kaufman April 25, 2002

Java and the Java DataBase Connectivity (JDBC) API. Todd Kaufman April 25, 2002 Java and the Java DataBase Connectivity (JDBC) API Todd Kaufman April 25, 2002 Agenda BIO Java JDBC References Q&A Speaker 4 years Java experience 4 years JDBC experience 3 years J2EE experience BS from

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

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

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

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

Database Application Development

Database Application Development Database Application Development Linda Wu (CMPT 354 2004-2) Topics SQL in application code Embedded SQL JDBC SQLJ Stored procedures Chapter 6 CMPT 354 2004-2 2 SQL in Application Code SQL commands can

More information

Sun Microsystems Inc. JDBC TM 2.1 API

Sun Microsystems Inc. JDBC TM 2.1 API Sun Microsystems Inc. JDBC TM 2.1 API The JDBC TM API is the Java TM platform standard call-level API for database access. This document contains the final specification of the core JDBC 2.1 API. Please

More information

Locking, concurrency, and isolation

Locking, concurrency, and isolation Holdable result sets and autocommit When autocommit is on, a positioned update or delete statement will automatically cause the transaction to commit. If the result set has holdability ResultSet.CLOSE_CURSORS_AT_COMMIT,

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

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

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

Secure Programming. CS3524 Distributed Systems Lecture 16

Secure Programming. CS3524 Distributed Systems Lecture 16 Secure Programming CS3524 Distributed Systems Lecture 16 Secure Programming Wri=ng code that is difficult to aaack Free of dangerous bugs (from security perspec=ve) General principles Language-specific

More information

DB I. 1 Dr. Ahmed ElShafee, Java course

DB I. 1 Dr. Ahmed ElShafee, Java course Lecture (15) DB I Dr. Ahmed ElShafee 1 Dr. Ahmed ElShafee, Java course Agenda 2 Dr. Ahmed ElShafee, Java course Introduction Java uses something called JDBC (Java Database Connectivity) to connect to databases.

More information

Chapter 16: Databases

Chapter 16: Databases Chapter 16: Databases Starting Out with Java: From Control Structures through Objects Fifth Edition by Tony Gaddis Chapter Topics Chapter 16 discusses the following main topics: Introduction to Database

More information

Announcements. SQL: Part IV. Transactions. Summary of SQL features covered so far. Fine prints. SQL transactions. Reading assignments for this week

Announcements. SQL: Part IV. Transactions. Summary of SQL features covered so far. Fine prints. SQL transactions. Reading assignments for this week Announcements 2 SQL: Part IV CPS 216 Advanced Database Systems Reading assignments for this week A Critique of ANSI SQL Isolation Levels, by Berenson et al. in SIGMOD 1995 Weaving Relations for Cache Performance,

More information

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

JDBC Installation Transactions Metadata

JDBC Installation Transactions Metadata Course Name: Advanced Java Lecture 14 Topics to be covered JDBC Installation Transactions Metadata Steps in JDBC Connectivity:Connectivity:Here are the JDBC Steps to be followed while writing JDBC

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

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

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

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

Logging and Recovery. 444 Section, April 23, 2009

Logging and Recovery. 444 Section, April 23, 2009 Logging and Recovery 444 Section, April 23, 2009 Reminders Project 2 out: Due Wednesday, Nov. 4, 2009 Homework 1: Due Wednesday, Oct. 28, 2009 Outline Project 2: JDBC ACID: Recovery Undo, Redo logging

More information

Overview. Database Application Development. SQL in Application Code. SQL in Application Code (cont.)

Overview. Database Application Development. SQL in Application Code. SQL in Application Code (cont.) Overview Database Application Development Chapter 6 Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures Database Management Systems 3ed

More information

Database Application Development

Database Application Development Database Application Development Chapter 6 Database Management Systems 3ed 1 Overview Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures

More information

Database Application Development

Database Application Development Database Application Development Chapter 6 Database Management Systems 3ed 1 Overview Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures

More information

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe Chapter 10 Outline Database Programming: Techniques and Issues Embedded SQL, Dynamic SQL, and SQLJ Database Programming with Function Calls: SQL/CLI and JDBC Database Stored Procedures and SQL/PSM Comparing

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

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

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

Chapter 13 Introduction to SQL Programming Techniques

Chapter 13 Introduction to SQL Programming Techniques Chapter 13 Introduction to SQL Programming Techniques Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 13 Outline Database Programming: Techniques and Issues Embedded

More information

Chapter 3 DB-Gateways

Chapter 3 DB-Gateways Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 3 DB-Gateways Outline Coupling DBMS and programming languages

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

Chapter 3 DB-Gateways

Chapter 3 DB-Gateways Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 3 DB-Gateways Outline Coupling DBMS and programming languages

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

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

SQL Environment: Module Types. System Aspects of SQL. SQL Environment: Introduction. SQL Environment: Introduction. SQL Environment: Privileges

SQL Environment: Module Types. System Aspects of SQL. SQL Environment: Introduction. SQL Environment: Introduction. SQL Environment: Privileges SQL Environment: Module Types System Aspects of SQL Generic SQL Interface: Module: each query or statement Embedded SQL: SQL statements within host-language program SQL statements pre-processed to function

More information

JDBC Java Database Connectivity is a Java feature that lets you connect

JDBC Java Database Connectivity is a Java feature that lets you connect Chapter 4: Using JDBC to Connect to a Database In This Chapter Configuring JDBC drivers Creating a connection Executing SQL statements Retrieving result data Updating and deleting data JDBC Java Database

More information

Java Database Connectivity

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

More information

Marcin Luckner Warsaw University of Technology Faculty of Mathematics and Information Science

Marcin Luckner Warsaw University of Technology Faculty of Mathematics and Information Science Marcin Luckner Warsaw University of Technology Faculty of Mathematics and Information Science mluckner@mini.pw.edu.pl http://www.mini.pw.edu.pl/~lucknerm } JDBC ("Java Database Connectivity ) is a set

More information

Wentworth Institute of Technology COMP570 Database Applications Fall 2014 Derbinsky. SQL Programming. Lecture 8. SQL Programming

Wentworth Institute of Technology COMP570 Database Applications Fall 2014 Derbinsky. SQL Programming. Lecture 8. SQL Programming Lecture 8 1 Outline Context General Approaches Typical Programming Sequence Examples 2 Database Design and Implementation Process Normalization 3 SQL via API Embedded SQL SQLJ General Approaches DB Programming

More information

SQL DML and DB Applications, JDBC

SQL DML and DB Applications, JDBC SQL DML and DB Applications, JDBC Week 4.2 Week 4 MIE253-Consens 1 Schedule Week Date Lecture Topic 1 Jan 9 Introduction to Data Management 2 Jan 16 The Relational Model 3 Jan. 23 Constraints and SQL DDL

More information

These notes add to the JDBC discussion your textbook.

These notes add to the JDBC discussion your textbook. jdbc.txt Fri Dec 09 18:27:00 2016 1 Extra JDBC Notes ------------------ Owen Kaser 21 February 2015 These notes add to the JDBC discussion your textbook. jdbc.txt Fri Dec 09 18:27:00 2016 2 JDBC History

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

Non-interactive SQL. EECS Introduction to Database Management Systems

Non-interactive SQL. EECS Introduction to Database Management Systems Non-interactive SQL EECS3421 - Introduction to Database Management Systems Using a Database Interactive SQL: Statements typed in from terminal; DBMS outputs to screen. Interactive SQL is inadequate in

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

CHAPTER 2 JDBC FUNDAMENTALS

CHAPTER 2 JDBC FUNDAMENTALS CHAPTER 2 JDBC FUNDAMENTALS OBJECTIVES After completing JDBC Fundamentals, you will be able to: Know the main classes in the JDBC API, including packages java.sql and javax.sql Know the difference between

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

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

System Aspects of SQL

System Aspects of SQL System Aspects of SQL SQL Environment User Access Control SQL in Programming Environment Embedded SQL SQL and Java Transactions (Programmers View) SQL Environment: Introduction SQL server Supports operations

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

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

PERSİSTENCE OBJECT RELATİON MAPPİNG

PERSİSTENCE OBJECT RELATİON MAPPİNG PERSİSTENCE Most of the applications require storing and retrieving objects in a persistent storage mechanism. This chapter introduces how to store and retrieve information in a persistent storage with

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

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

CSE 308. Database Issues. Goals. Separate the application code from the database

CSE 308. Database Issues. Goals. Separate the application code from the database CSE 308 Database Issues The following databases are created with password as changeit anticyber cyber cedar dogwood elm clan Goals Separate the application code from the database Encourages you to think

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

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

Introduction to JDBC. JDBC: Java Database Connectivity. Why Access a Database with Java? Compilation. Six Steps. Packages to Import

Introduction to JDBC. JDBC: Java Database Connectivity. Why Access a Database with Java? Compilation. Six Steps. Packages to Import Introduction to JDBC JDBC: Java Database Connectivity JDBC is used for accessing databases from Java applications Information is transferred from relations to objects and vice-versa databases optimized

More information

WebSphere Connection Pooling. by Deb Erickson Shawn Lauzon Melissa Modjeski

WebSphere Connection Pooling. by Deb Erickson Shawn Lauzon Melissa Modjeski WebSphere Connection Pooling by Deb Erickson Shawn Lauzon Melissa Modjeski Note: Before using this information and the product it supports, read the information in "Notices" on page 78. First Edition (August

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

Database Application Development Part 2 - Chapter

Database Application Development Part 2 - Chapter Database Application Development Part 2 - Chapter 6.3-6.7 http://xkcd.com/327 -- CC BY-NC 2.5 Randall Munroe Comp 521 Files and Databases Fall 2014 1 Alternative Approach v Abstract Database interface

More information

Database Application Development

Database Application Development Database Application Development Chapter 6 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Overview Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic

More information