Content Services for JDBC Driver User Guide

Size: px
Start display at page:

Download "Content Services for JDBC Driver User Guide"

Transcription

1 Content Services for JDBC Driver User Guide Version 5.3 SP1 August 2005

2 Copyright EMC Corporation. All rights reserved

3 Table of Contents Preface... 7 Chapter 1 Introducing Content Services for JDBC Driver... 9 Content Services for JDBC Driver an overview... 9 The Docbase JDBC Service SCS JDBC Service Connection pooling Using data sources Chapter 2 Content Services for JDBC Driver Basics Overview SCS JDBC Service requirements Client library requirements functions The Content URL Importing required packages Registering Content Services for JDBC Driver Registering the Docbase JDBC Service Registering the SCS JDBC Service Connecting to a Docbase Specifying a Docbase URL, user name, and password Specifying a Docbase URL including the user name and password Specifying a Docbase URL and Properties object Connecting to a Site Caching Services repository Specifying a database URL, user name, and password Specifying a database URL including the user name and password Specifying a database URL and Properties object Using the dmjdbc.properties file Setting logging levels Creating a statement object Executing DQL queries with the Docbase JDBC Driver Executing SQL queries with the SCS JDBC Service Executing server API methods Closing ResultSet and Statement objects Making changes to the database Committing database changes Retrieving content files from a Docbase Retrieving content files from a Site Caching Services repository Closing the connection Content Services for JDBC Driver User Guide 3

4 Table of Contents Chapter 3 Using Data Sources, JNDI, and Connection Pooling Connecting with a data source Connecting without JNDI Connecting with a data source and JNDI Logging and tracing with a data source Connection pooling Loading JDBC Services Creating the connection pool Using the dmjdbcpool.properties file Obtaining a connection from the pool Returning connections to the pool Connection pooling in server-side applications Using connection pools in Servlets Configuring the WebSphere application server for JDBC Services Configuring to use the JDBC Driver directly Configuring to use DataSources directly Using Content Services for JDBC Driver with the WebSphere application server Appendix A JDBC APIs Appendix B Code Examples Generic JDBC Services code example Inserting, updating, and deleting records JSP code example Example servlet code Connection pooling servlet example Retrieving content files from a Docbase Retrieving content files from a Site Caching Services repository Content Services for JDBC Driver User Guide

5 Table of Contents List of Figures Figure 1 1. Content Services for JDBC Driver Content Services for JDBC Driver User Guide 5

6 Table of Contents List of Tables Table 2 1. Content file location relative to value of URL Table 2 2. connection properties Table 2 3. SCS JDBC Service connection properties Table A 1. JDBC core APIs and methods Table A 2. Table A 3. Table A 4. Table A 5. Table A 6. Table A 7. Table A 8. Table A 9. Table A 10. Table A 11. /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.driver /usupported Content Services for JDBC Driver for JDBC methods in java.sql.connection /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.statement /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.preparedstatement /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.resultset /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.databasemetadata /unsupported Content Services for JDBC Driver for JDBC methods in java.sql.resultsetmetadata /unsupported Content Services for JDBC Driver for JDBC methods in javax.sql.datsource /unsupported Content Services for JDBC Driver for JDBC methods in javax.sql.pooledconnection /unsupported Content Services for JDBC Driver for JDBC methods in javax.sql.connectionpooldatasource Content Services for JDBC Driver User Guide

7 Preface This manual contains the information and instructions you need to use Content Services for JDBC Driver database using the Java Database Connectivity (JDBC) standard. Use Content Services for JDBC Driver to query a Documentum Docbase, perform operations on documents in the Docbase, or access a Documentum Site Caching Services (SCS) repository on your Web site. This manual provides information on using Content Services for JDBC Driver in the applications, servlets, and Java Server Pages (JSPs) that you develop. Intended audience This manual is intended primarily for developers who create servlets, JSPs, or client applications that use Content Services for JDBC Driver. Revision history The following changes have been made to this document. Revision date August 2005 Description Initial publication. Related documentation Users of this manual should have experience in programming in Java. Installation instructions for the Content Services for JDBC Drivers are in the Content Services for JDBC Driver Release Notes. For information on Documentum s server API methods and Document Query Language (DQL), refer to the following manuals: Documentum Content Server API Reference Manual Content Services for JDBC Driver User Guide 7

8 Preface Documentum Content Server DQL Reference Manual 8 Content Services for JDBC Driver User Guide

9 Chapter 1 Introducing Content Services for JDBC Driver This chapter introduces Content Services for JDBC Driver. The chapter discusses the following topics: Content Services for JDBC Driver an overview, page 9 The Docbase JDBC Service, page 10 SCS JDBC Service, page 11 Connection pooling, page 11 Using data sources, page 11 Content Services for JDBC Driver an overview Java Database Connectivity (JDBC) is an interface that allows you to access a database from Java client applications, Java Server Pages (JSPs), or servlets. Content Services for JDBC Drivers lets you connect to a Documentum Docbase or Site Caching Service repository, issue server API commands, perform DQL queries in the Docbase or SQL queries in a Site Caching Services repository, access the Docbase or repository s metadata, and retrieve content files from the Docbase or Site Caching Services repository. Content Services for JDBC Driver provides support for most of the standard JDBC APIs. (Refer to Appendix A, JDBC APIs, for complete information on, which APIs are supported.) You can also use the Java Naming and Directory Interface (JNDI) with Content Services for JDBC Driver, so that your applications can connect to the database using logical names rather than hard-coded database names. You can create and access a connection pool with Content Services for JDBC Driver. Content Services for JDBC Driver supports dynamic queries. Your client applications can use existing database access codes and still work correctly with the Docbase and the Site Caching Services repository. Content Services for JDBC Driver User Guide 9

10 Introducing Content Services for JDBC Driver Content Services for JDBC Driver translates JDBC API calls issued by Java applications, servlets, and JSPs into Documentum server API calls. Content Services for JDBC Driver provides both a Docbase JDBC Drvier and a Site Caching Services JDBC Driver. Figure 1 1, page 10 following, shows role of Content Services for JDBC Driver as an interface between JSPs, servlets, Enterprise Java Beans (EJBs), client applications, and Documentum products: Figure 1-1. Content Services for JDBC Driver The Docbase JDBC Service The Docbase JDBC Service implements the JDBC 2.0 API using Documentum s Document Query Language (DQL) instead of ANSI SQL. 10 Content Services for JDBC Driver User Guide

11 Introducing Content Services for JDBC Driver Note: The Docbase JDBC Service also implements the JDBC 3.0 API. However, this API is not supported by Documentum and will throw an SQL exception error. Only use the JDBC 2.0 API. The Docbase JDBC Service supports the SQL3 Blob datatype. It does not support the SQL3 Array, Clob, Ref, and Struct datatypes. You see SQLExceptions if you use JDBC methods that support features not included in DQL. SCS JDBC Service The Site Caching Services JDBC Service is a wrapper driver for database JDBC drivers. A wrapper driver allows your application to communicate with the JDBC drivers for Oracle, Sybase, and other database servers. The SCS JDBC Service supports all features provided by the database driver. Additionally, the SCS JDBC Service uses the SQL3 Blob data type to represent the content files and metadata in the Site Caching Services repository. Connection pooling Content Services for JDBC Driver allows you to create a connection pool for your applications. Connection pooling allows applications to use connections that exist in a pool rather than opening and closing new connections. This speeds up your applications, because new database connections do not have to be constantly created and destroyed. You can use connection pooling with either the SCS JDBC Service or the Docbase JDBC Service. Using data sources The Content Services for JDBC Driver implements the JDBC 2.0 extension API javax.sql. The extension API allows you to use data sources, which are general-purpose objects for specifying databases and other resources to application programs. Java Naming and Directory Interface (JNDI) lets applications find and access remote services and resources, as well as use logical names rather than vendor-specific syntax to access services. Note: The Docbase JDBC Service also implements the JDBC 3.0 API. However, this API is not supported by Documentum and will throw an SQL exception error. Only use the JDBC 2.0 API. Content Services for JDBC Driver User Guide 11

12 Introducing Content Services for JDBC Driver The Content Services for JDBC Driver uses a DocumentumDataSource class that implements the data source interface and provides properties to use when you specify a Docbase to which an application connects. With the Documentum data source enabled, you do not have to register the JDBC Services class name and you can use logical names for URLs and other properties. For full instructions on using the DocumentumDataSource class, refer to Chapter 3, Using Data Sources, JNDI, and Connection Pooling. 12 Content Services for JDBC Driver User Guide

13 Content Services for JDBC Driver Basics Chapter 2 This chapter contains information on the code that must be in your applications in order to use Content Services for JDBC Driver to access a Docbase or Site Caching Services repository. This chapter also tells you how to include DQL or SQL statements in your applications so that you can query a Docbase or Site Caching Services repository. This chapter discusses the following topics: Overview, page 14 Client library requirements, page 14 functions, page 15 The Content URL, page 15 Importing required packages, page 17 Registering Content Services for JDBC Driver, page 17 Connecting to a Docbase, page 18 Connecting to a Site Caching Services repository, page 20 Creating a statement object, page 24 Executing DQL queries with the Docbase JDBC Driver, page 24 Executing SQL queries with the SCS JDBC Service, page 25 Executing server API methods, page 26 Closing ResultSet and Statement objects, page 27 Making changes to the database, page 27 Committing database changes, page 28 Retrieving content files from a Docbase, page 28 Retrieving content files from a Site Caching Services repository, page 30 Closing the connection, page 30 Content Services for JDBC Driver User Guide 13

14 Content Services for JDBC Driver Basics Overview In order to connect to and query a Docbase or Site Caching Services repository, your Java applications must include code for the following tasks: Importing required packages Registering JDBC Services Opening connections to the Docbase or Site Caching Services repository Creating Statement objects Executing queries Returning ResultSet objects from queries Processing the result sets Closing the ResultSet and Statement objects Making changes to the database Committing database changes Closing the database connection Your applications must include information that is specific to Documentum for JDBC for importing packages, registering JDBC Services, and opening connections to the database. However, you use standard Java code for these and other tasks. SCS JDBC Service requirements The SCS JDBC Service is a wrapper driver. To use the SCS JDBC Service, you must have a valid JDBC driver for the database. Your clients must have sufficient privileges to use the database JDBC driver for database access, and the database JDBC driver must have a user name and password for access to the database. The SCS JDBC Service supports all functions supported by the database JDBC driver. Client library requirements The client s Java path must include the following libraries: dfc.jar This library provides the Documentum Foundation Classes library. dfcbase.jar This library provides the Documentum Foundation Classes library. libdmcl40.so 14 Content Services for JDBC Driver User Guide

15 Content Services for JDBC Driver Basics These libraries provide the Documentum Client Libraries API. j2ee.jar This includes the java and javax packages. log4j.jar This library is used by Documentum Foundation Classes to log any Documentum Foundation Classes specific warnings or errors. functions The Docbase JDBC Service and SCS JDBC Service support different functions. The Docbase JDBC Service supports these DQL functions: Scalar functions (UPPER, LOWER, SUBSTR) Aggregate functions (COUNT, MIN, MAX, AVG, SUM) Date functions (DATEDIFF, DATEADD, DATEFLOOR,DATETOSTRING) ID functions The SCS JDBC Service supports all functions supported by the database JDBC Services used in an installation. The Content URL JDBC Services allows you to access content files in a Site Caching Services repository or a Docbase. Site Caching Services publishes documents from the Docbase to the Web site host. When Site Caching Services publishes documents from the Docbase to the Web site host, it does two things:: Publishes the content file from the Docbase to the Web server host s file system The content file is placed on the file system in the target root directory, which is specified when a Web publishing configuration is created. Publishes the attributes associated with the content file to the database table specified in the Web publishing configuration The database table includes an attribute a_webc_url. This attribute contains a partial URL to the location of a given content file on the Web site host s file system. The a_webc_url is the path relative to the target root directory. (Refer to Site Caching Services User Guide for more information on the target root directory.) The target root directory and the a_webc_url for a given document combine to form the absolute path to the location of any content file on the Web server host s file system. Content Services for JDBC Driver User Guide 15

16 Content Services for JDBC Driver Basics If the directory specified by the target root directory is the document root of the HTTP server, the content file can be retrieved by issuing a URL. For example, the following table shows the relationship between the content file location on the file system and the value of a_webc_url. The table assumes that the /local/documentum/webcache_target directory is the target root directory. Table 2-1. Content le location relative to value of URL Content file location on file system \usr\local\documentum\webcache_ target\sports\sports1.htm \usr\local\documentum\webcache_ target\sports\sports2.htm \usr\local\documentum\webcache_ target\business\business1.htm Value of a_webc_url attribute in database table Sports/sports1.htm Sports/sports2.htm Business/business1.htm If the directory /usr/local/documentum is the document root of the HTTP server or the directory /usr/local/documentum/webcache_target is a virtual root "SCS_target" on the HTTP server, the content files can be accessed using the following URLs: htm Alternatively, the content files can be accessed using the following URLs: file:///usr/local/documentum/webcache_target/sports/sports1.htm file:///usr/local/documentum/webcache_target/sports/sports2.htm file:///usr/local/documentum/webcache_target/business/business1.htm Or the following URLs on Windows: file:\\c:\documentum\\webcache_target\\sports\\sports1.htm file:\\c:\documentum\\webcache_target\\sports\\sports2.htm file:\\c:\documentum\\webcache_target\\business\\business1.htm When the Site Caching Services JDBC driver executes a query against the Site Caching Services repository s database, it retrieves the content file by concatenating the contenturl and the a_webc_url. The contenturl is a value defined in the dmjdbc.properties file. For the above examples, the HTTP protocol would use the following contenturl: webcache_target/ If the Site Caching Services JDBC driver and the Site Caching Services target are on the same machine, you can use the file protocol: 16 Content Services for JDBC Driver User Guide

17 Content Services for JDBC Driver Basics file:///usr/local/documentum/webcache_target/ on UNIX You can define the contenturl in the dmjdbc.properties file in either way. Refer to Using the dmjdbc.properties file, page 23 for more information on the dmjdbc.properties file. Importing required packages Your client applications must include the following import statements, regardless of whether you are using the Docbase JDBC Service or the SCS JDBC Service: import java.sql.*; for standard JDBC packages import javax.sql.*; for optional JDBC packages To use the extended functionality provided by the Documentum drivers, include this import statement: import com.documentum.oca.jdbc.common.*; To use the Docbase JDBC Service, include this import statement: import com.documentum.oca.jdbc.jdbc20.*; To use the SCS JDBC Service, include this import statement: import com.documentum.oca.jdbc.webcache.*; To use JNDI services, include this import statement: import javax.naming.*; Registering Content Services for JDBC Driver Your applications must include code to register Content Services for JDBC Driver with the program. Register the driver only once. Use the static registerdriver() method of the JDBC DriverManager class to declare the driver name string. Registering the Docbase JDBC Service For the Docbase JDBC Service, the syntax is: DriverManager.registerDriver ( new com.documentum.oca.jdbc.jdbc20.djdbcdriver () ); Content Services for JDBC Driver User Guide 17

18 Content Services for JDBC Driver Basics Alternatively, for JDK-compliant Java Virtual Machines, you can use the forname() method of the java.lang.class class to load JDBC drivers directly: Class.forName ("com.documentum.oca.jdbc.jdbc20.djdbcdriver"); Registering the SCS JDBC Service For the SCS JDBC Service, the syntax for using the registerdriver() method is: DriverManager.registerDriver ( new com.documentum.oca.jdbc.webcache.djdbcdriver () ); Use the following syntax with the forname() method for the SCS JDBC Service: Class.forName ("com.documentum.oca.jdbc.webcache.djdbcdriver"); Connecting to a Docbase Use the static getconnection() method of the JDBC DriverManager class to create a Connection object and connect to the Docbase. You can use the Connection object throughout your code to pass connection information to the underlying database, for creating Statement objects, and retrieving metadata from the database. Inputs required to create the Connection objects are the user name, password, and connection string identifying the JDBC Services to use. When you use the Docbase JDBC Service, you must also provide the name of the Docbase to which you are connecting. Your application can open a connection to the Docbase with or without a data source. This section discusses how to connect to a Docbase without a data source. Refer to Chapter 3, Using Data Sources, JNDI, and Connection Pooling, for information on connecting to a data source. The Documentum Docbase JDBC Service does not support login timeouts. Calling the static DriverManager.setLoginTimeout() method does not have any effect on your application. In each of the following cases, the URLs are not case-sensitive, but the class names are. The getconnection() method can be used with three different signatures. The parameters of signatures are: Database URL, user name, and user password Database URL that includes the user name and user password Database URL and Properties object 18 Content Services for JDBC Driver User Guide

19 Content Services for JDBC Driver Basics The following sections shows you how to create connections with each of these signatures. Specifying a Docbase URL, user name, and password This getconnection() signature takes the URL, user name, and password as separate parameters: getconnection("url","user","password"); The URL should be in the form: jdbc:documentum:oca.docbase@database For example, the following connects a user called bob, whose password is cat, to a Docbase named dog using the Docbase JDBC Service: Connection conn = DriverManager.getConnection ("jdbc:documentum:oca:docbase@dog","bob","cat"); Specifying a Docbase URL including the user name and password This getconnection() signature includes the user name and password in the database URL: getconnection("url") For example, the following connects a user called bob, whose password is cat, to a database named dog, using the Docbase JDBC Service. The URL, which includes the user name and password, is the only parameter: Connection conn = DriverManager.getConnection("jdbc:documentum:oca: docbase:bob/cat@dog"); Specifying a Docbase URL and Properties object This getconnection() signature includes a URL and a Properties object. You must import the java.util.properties class in order to use a Properties object: import java.util.properties; The Properties object can specify user name and password as well as other information. getconnection("url",properties_object_name) The URL should be in the form: Content Services for JDBC Driver User Guide 19

20 Content Services for JDBC Driver Basics jdbc:documentum:oca.docbase The Properties object is an object of the standard Java Properties class. The Docbase JDBC Service supports the properties shown in Table 2 2, page 20. Table 2-2. connection properties Property Datatype Description user String The user name for connecting to the Docbase password String The password for connecting to the Docbase database String The connection string for the Docbase server String The Docbase host name (optional) For example, the following code uses the java.util.properties() and put() methods to create a Properties object called info, then incorporates the Properties object into the getconnection() method: //Import packages and register the driver. import java.sql.*; import javax.sql.*; import java.util.properties; import com.documentum.oca.jdbc.jdbc20.* DriverManager.registerDriver (new com.documentum.oca.jdbc.jdbc20.djdbcdriver()); //Specify the properties object. The user is called bob, // the password is cat, and the Docbase is dog. java.util.properties info = new java.util.properties(); info.put ("user", "bob"); info.put ("password", "cat"); info.put ("database", "dog"); //Specify the Connection object. Connection conn = DriverManager.getConnection("jdbc:documentum:oca:docbase", info); Connecting to a Site Caching Services repository Use the static getconnection() method of the JDBC DriverManager class to create a Connection object and connect to the Site Caching Services repository s underlying database. You can use the Connection object throughout your code to pass connection 20 Content Services for JDBC Driver User Guide

21 Content Services for JDBC Driver Basics information to the underlying database, for creating Statement objects, and retrieving metadata from the database. Inputs required to create the Connection objects are user name, password, and connection string identifying the JDBC Services to use. When you use the SCS JDBC service, you must also provide the name of the database to which you are connecting. Your application can open a connection to the database with or without a data source. This section discusses how to connect to a Docbase without a data source. Refer to Chapter 3, Using Data Sources, JNDI, and Connection Pooling, for information on connecting to a data source. In each of the following cases, the URLs are not case-sensitive, but the class names are. The getconnection() method can be used with three different signatures. The parameters of signatures are: Database URL, user name, and user password Database URL that includes the user name and user password Database URL and Properties object The SCS JDBC Service has its own URL format. This format allows the client to add the database JDBC driver class name and the database driver URL to the Site Caching Services URL string. For example, if the database JDBC driver is called websphere.jdbc.oci.driver, with a URL of jdbc:websphere:oracle, the SCS JDBC Service URL is: jdbc:documentum:oca:webcache@websphere.jdbc.oci.driver/jdbc:websphere:oracle Specifying a database URL, user name, and password Use the following format for the getconnection() method, where the URL, user name, and password takes the String datatype: getconnection("url","username","password"); The URL must have this format, where webcache contains the database JDBC driver class name and its URL other than the database name: jdbc:documentum:oca:webcache@database For example, the following code connects a user named bob whose password cat is to a database called oracle1, using the WebSphere JDBC driver: Connection conn = DriverManager.getConnection ("jdbc:documentum:oca:webcache@websphere.jdbc.oci.driver/jdbc:websphere: oci@oracle1, "bob", "cat"); Content Services for JDBC Driver User Guide 21

22 Content Services for JDBC Driver Basics Specifying a database URL including the user name and password Use the following format for the getconnection() method, where the URL takes the String datatype: getconnection("url"); The URL takes the format: jdbc:documentum:oca:webcache@database The database section of the URL must contain the database JDBC driver class name, the URL for the database JDBC driver, and the user name and password to acceess database: database_driver_class_name/database_url:username/password@database_name For example, this code connects a user called bob with password cat to a database called oracle1: Connection conn = DriverManager.getConnection ("jdbc:documentum:oca:webcache@websphere.jdbc.oci.driver/jdbc:websphere: oci:bob/cat@oracle1"); Specifying a database URL and Properties object Use the following syntax with the getconnection() method to use a Properties object: getconnection("url",properties_object_name); The URL takes the following form: jdbc:documentum:oca Use a Properties object to provide the input. For example, the following code creates a Properties object called info and then opens a connection for the user called bob with password cat to a database called oracle1: java.util.properties info = new java.util.properties(); info.put ("user", "bob"); info.put ("password", "cat"); info.put ("database", "oracle1"); info.put ("jdbc.driver", "websphere.jdbc.oci.driver"); info.put ("jdbc.url", "jdbc:websphere:oracle"); getconnection ("jdbc:documentum:oca:webcache", info); The SCS JDBC Service supports the connection properties shown in Table 2 3, page 23: 22 Content Services for JDBC Driver User Guide

23 Content Services for JDBC Driver Basics Table 2-3. SCS JDBC Service connection properties Property Datatype Description user String The user name for connecting to the Docbase password String The password for connecting to the Docbase database String The connection string for the Docbase jdbc.driver String The database JDBC driver name jdbc.url String The database JDBC driver URL Here is a longer code sample: //Import packages and register the driver. import java.sql.*; import javax.sql.*; import java.util.properties; import com.documentum.oca.jdbc.webcache.* DriverManager.registerDriver (new com.documentum.oca.jdbc.webcache.djdbcdriver()); //Specify the properties object. java.util.properties info = new java.util.properties(); info.put("user", "bob"); info.put ("password", "cat"); info.put ("database", "oracle1"); info.put ("jdbc.driver", "websphere.jdbc.oci.driver"); info.put ("jdbc.url", "jdbc:websphere:oracle"); //Specify the connection object. Connection conn = DriverManager.getConnection("jdbc:documentum:oca:webcache", info); Using the dmjdbc.properties le The dmjdbc.properties file allows you to set the driver name of the database JDBC driver for your installation s database, the URL for the database JDBC driver, and the contenturl that points to the Site Caching Services content repository on your Web server. For example: contenturl= jdbc.url=jdbc:oracle:thin:<user>/<password>@<hostname>:<port>:<sid> jdbc.driver=oracle.jdbc.driver.oracledriver This dmjdbc.properties file points to a contenturl on host eng076, and contains the driver name and driver URL for the Oracle JDBC driver. Content Services for JDBC Driver User Guide 23

24 Content Services for JDBC Driver Basics The jdbc.driver, jdbc.url and contenturl specified in the dmjdbc.properties can be alternatively specified in the Properties Object passed to the getconnection(..) method. Setting logging levels You can set logging levels in the dmjdbc.properties file. There are five logging levels, DEBUG, INFO, WARNING, ERROR, and FATAL. For performance reasons, we recommend setting the logging level to WARNING. If you encounter errors, set the logging level to DEBUG to record more information in the logs. Set the logging level as follows, where loglevel is one of the logging levels: documentum.jdbc.loglevel=loglevel The resulting logs are in the same directory as the dmjdbc.jar file. Creating a statement object After you connect to the Docbase and create your Connection object, you must create a Statement object. Use the createstatement() method of the JDBC Connection object to create the Statement object. For example, the following code creates a Statement object called stmt using the Connection object called conn from the code in the previous sections: Statement stmt=conn.createstatement(); Executing DQL queries with the Docbase JDBC Driver Use the executequery() method of the Statement object to perform a query. The executequery() method takes a DQL statement as input and returns a JDBC ResultSet object. For example, if a Statement object is called stmt, the following code executes a DQL query and creates a ResultSet object called rset: ResultSet rset = stmt.executequery ("select object_name from dm_document where r_creation_date='12/31/1999'"); The ResultSet object is populated with the object_name column of all objects of type dm_document where the r_creation_date is December 31, Content Services for JDBC Driver User Guide

25 Content Services for JDBC Driver Basics Use the next() method of the ResultSet object to iterate through each item retrieved by the query. To use the data in the result set, use the appropriate getjava_data_type() method. For example, the following code uses the getstring() method to retrieve all object_names from the ResultSet object called rset: while (more = rset.next()) { n++; System.out.println("Result" + n + ": " + rset.getstring("object_name")); } Executing SQL queries with the SCS JDBC Service Use the executequery() method of the Statement object to perform a query. The executequery() method takes a SQL statement as input and returns a JDBC ResultSet object. For example, the following code queries a SCS table PROPDB_T80000C01_S, creating a ResultSet object called rset: ResultSet rset = stmt.executequery ("select object_name from PROPDB_T80000C01_S where r_creation_date>to_date('12/31/1999','mm/dd/yyyy')"); The ResultSet object is populated with the object_name column of all objects where the r_creation_date is December 31, Use the next() method of the ResultSet object to iterate through each item retrieved by the query. To use the data in the result set, use the appropriate getjava_data_type() method. For example, the following code uses the getstring() method to retrieve all object_names from the ResultSet object rset: while (more = rset.next()) { n++; System.out.println("Result" + n + ": " + rset.getstring("object_name")); } Content Services for JDBC Driver User Guide 25

26 Content Services for JDBC Driver Basics Executing server API methods Use the CallableStatement interface to execute server API methods with the Docbase JDBC Service. The server API methods associated with the server API functions dmapiget, dmapiexec, and dmapiset are supported in the JDBC Services. For more information about these functions, refer to Documentum Content Server Fundamentals and the Documentum Content Server Object Reference Manual. For more information about server API methods, refer to the Documentum Content Server API Reference Manual. When you issue a server API command, the results are returned as a ResultSet object. For methods using the dmapiget and dmapiexec functions, use the following syntax: {? = call apicommand (arg1,arg2,'...',argn)} For methods using the dmapiset function, use the following syntax: {? = call apicommand (arg1,arg2,'...',argn) value} For example, to get the creation date of an object: {? = call get ( e000021,r_creation_date,dd-mon-yy)}; To set a router s plan_end_date attribute to June 4, 2001: {? = call set ( e000021,plan_end_date,dd/mm/yy) 04/06/01} Your client application must use the JDBC CallableStatement? syntax to set the datatype for data returned by these commands. For example, to set the return type to the Java String type: call.registeroutparameter(1,types.varchar); The following code sample gets the creation date of an object, inserts the author name, and saves the inserted value: // Get the creation date. CallableStatement call = con.preparecall("{? = call get ( ec2e8,?, dd-mon-yy)}"); call.registeroutparameter(1, Types.VARCHAR); call.setstring(2, "r_creation_date"); call.execute(); String date = call.getstring(1); System.out.println("Creation Date = " + date); // Insert author. call = con.preparecall("{? = call insert ( ec2e8,authors[1]) Haden Fox}"); call.registeroutparameter(1, Types.BIT); call.execute(); Boolean b = call.getboolean(1); Boolean bb = new Boolean(b); System.out.println("API set = " + bb.tostring()); // Save the insert value. call = con.preparecall("{? = call save ( ec2e8}"); 26 Content Services for JDBC Driver User Guide

27 Content Services for JDBC Driver Basics call.registeroutparameter(1, Types.BIT); call.execute(); b = call.getboolean(1); bb = new Boolean(b); System.out.println("API save = " + bb.tostring()); call.close(); con.close(); Closing ResultSet and Statement objects Your code must use the close() method to close any ResultSet and Statement objects after the application processes them. If you do not explicitly close ResultSet and Statement objects, memory leaks can occur. Closing ResultSet and Statement objects also releases cursors in the database and reduces the risk of running out of cursors. For example, for a ResultSet object called rset and a Statement object called stmt, use the following syntax to close the objects: rset.close(); stmt.close(); When you close a Statement object created by a particular Connection object, the connection remains open. Making changes to the database Use standard JDBC syntax and APIs to make changes to the database. To do this, create a PreparedStatement object using the preparedstatement() method. You can then use the setmethod_name() methods on the PreparedStatement object in order to bind data into the prepared statement and send it to the database. For example, the following syntax uses a PreparedStatement object called pstmt to execute INSERT operations that add two rows to the dm_document table: // Prepare to insert new names in the table. PreparedStatement pstmt = conn.preparestatement ("insert into dm_document (object_name, subject) values (?,?)"); // Add JdbcTest1 as object name and cake1 as subject. pstmt.setstring(1, "JdbcTest1");// The first? is for object_name. pstmt.setstring(2, "cake1");// The second? is for subject. // Insert the row. pstmt.execute(); // Add JdbcTest2 as object name and cake2 as subject. pstmt.setstring(1, "JdbcTest2");// The first? is for object_name. pstmt.setstring(2, "cake2");// The second? is for subject. Content Services for JDBC Driver User Guide 27

28 Content Services for JDBC Driver Basics // Insert the row. pstmt.executeupdate(); // Close the statement. pstmt.close(); Site Caching Services repositories are located on Web sites, and the documents in them are modified in the originating Docbase rather than on the Web site. Therefore, we recommend that you do not directly modify the Site Caching Services repository s database or the content files located in the repository. Committing database changes By default, database operations such as INSERT, UPDATE, and DELETE are committed automatically upon execution (auto-commit mode). You can disable auto-commit mode by setting it to FALSE. For example, the following code calls the setautocommit() method on a Connection object called conn: conn.setautocommit(false); If you set auto-commit to FALSE, you must then ma nually commit database changes: conn.commit(); You must also manually roll back any database change: conn.rollback(); Retrieving content les from a Docbase You can retrieve content files from a Docbase in two ways: To retrieve only primary renditions, use the command getblob( _content ) after locating the content file by referencing the corresponding object attributes in the Docbase. You can then use the Getfile API and CallableStatement interface to retrieve nonprimary renditions. For a complete code sample using getblob( _content ), refer to Retrieving content files from a Docbase, page 90. To retrieve primary or nonprimary renditions, use the Blob interface. The following code uses the first method. It obtains the object ID of a document called test.txt and then uses the object ID to retrieve the nonprimary PDF rendition of test.txt: //Get object ID. select r_object_id from dm_document where object_name='test.txt' 28 Content Services for JDBC Driver User Guide

29 Content Services for JDBC Driver Basics //Use Getfile API to retrieve nonprimary PDF rendition. String filename="c:\\temp\\tempfile.pdf"; CallableStatement cs = con.preparecall("{? = call getfile(?,?,pdf,0)}"); cs.registeroutparameter(1, Types.VARCHAR); cs.setstring(2, r_object_id); cs.setstring(3, filename); cs.execute() ; The following examples use the Blob interface to retrieve both primary and nonprimary renditions of documents in the Docbase. The ResultSet interface of JDBC Services allows you to pass the format of the document as an argument to the getblob method. For example, you can use following code to retrieve nonprimary renditions: String format = format; Blob b = rs.getblob(format) ; InputStream is = b.getbinarystream(); If the format were specified as pdf, the syntax would be: String format = pdf; Blob b = rs.getblob(pdf) ; InputStream is = b.getbinarystream(); For example, the following code retrieves both the primary rendition of a document, in text format, and a nonprimary PDF rendition: // After issuing DQL query and obtaining resultset while ( rs.next() ) { Blob b1 = rs.getblob("_content"); // Primary 'txt' rendition to be retrieved InputStream is1 = b1.getbinarystream() ; // Process InputStream is1 Blob b2 = rs.getblob("pdf"); // Non-primary 'pdf' rendition to be retrieved InputStream is2 = b2.getbinarystream(); // Process InputStream is2 } You can also retrieve the contents of a given format as a particular page by passing the format and the page number as arguments to the getblob method: String format="format"; int page = 0; Blob b = rs.getblob(format, page); InputStream is = b.getbinarystream(); You can pass the page number to the older version of the syntax as well: rs.getblob("_content", int page) Content Services for JDBC Driver User Guide 29

30 Content Services for JDBC Driver Basics Retrieving content les from a Site Caching Services repository Use the getblob( _content ) command to retrieve content files from a Site Caching Services repository. For example: Blob blob = rs.getblob("_content"); InputStream contents = blob.getbinarystream(); Once the content file is retrieved, use the common Java InputStream functions for manipulating or displaying the content file. The content file s location is a URL composed of the repository host s URL (called the base URL) plus the path to the content file (called the local URL). For example, the base URL might be and the local URL might be /buzz/news/pr2000/widgets html. The local URL is stored in the database as the a_webc_url attribute of the propdb_id_s and propdb_id_r tables. The base URL should be stored in the default database JDBC driver properties file by JDBC driver administrator. Use one of these three formats: contenturl= contenturl= contenturl=file://localhost/c: For complete sample code, refer to Retrieving content files from a Site Caching Services repository, page 91. Closing the connection You must close the database connection when your work is finished. For a Connection object called conn, the syntax is: conn.close(); 30 Content Services for JDBC Driver User Guide

31 Using Data Sources, JNDI, and Connection Pooling Chapter 3 Using Content Services for JDBC Driver, you can connect to the Docbase or Site Caching Services repository using data sources, which are general-purpose objects for specifying databases and other resources to application programs. Using data sources minimize the amount of database-specific code you must write in your applications, thereby reducing code maintenance and allowing greater code portability. Data sources also allow you to use the Java Naming and Directory Interface (JNDI). JNDI lets applications find and access remote services and resources, and use logical names rather than vendor-specific syntax to access services. You can use JDBC Services to create and access a connection pool. A connection pool consists of a pool of reusable Docbase connections. Connection pooling allows the reuse of connections, reduces the demands on you hardware, and allows your applications faster access to the database. This chapter discusses the following topics: Connecting with a data source, page 31 Logging and tracing with a data source, page 33 Connection pooling, page 34 Configuring the WebSphere application server for JDBC Services, page 38 Using Content Services for JDBC Driver with the WebSphere application server, page 45 Connecting with a data source You can connect to a Docbase using a data source with or without JNDI. In either case, your code must create an instance of the DocumentumDataSource class, initialize the connection properties of the DocumentumDataSource instance, and create a connection instance. Content Services for JDBC Driver User Guide 31

32 Using Data Sources, JNDI, and Connection Pooling Connecting without JNDI This code creates a DocumentumDataSource called dds and sets the ServerName, DatabaseName, User, and Password properties of the data source: DocumentumDataSource dds = new DocumentumDataSource(); dds.setservername("domain"); dds.setdatabasename("docbase"); dds.setuser("username"); dds.setpassword("password"); Connection conn = dds.getconnection(); You must include the server host name and Docbase name, as well as the user name and password to be used for connecting to the database. This code allows you to incorporate the user name and password in the getconnection() method and override the user name and password in the DocumentumDataSource instance: // optionally override the user name and password: Connection conn = dds.getconnection("username, "password"); Connecting with a data source and JNDI You can connect to the Docbase using a data source and JNDI. This minimizes the amount of vendor-specific code in your applications and allows you to use logical names instead. Only the code that binds a data source instance to a JNDI logical name needs to contain vendor-specific, hard-coded property settings. To connect using a data source and JNDI, you must import the correct packages, initialize the connection properties, register the data source with JNDI, and open the connection. First, import the required packages: import javax.naming.*; Next, create a DocumentumDataSource instance and initialize its connection properties. For example, this code creates a DocumentumDataSource instance called dds: DocumentumDataSource dds = new DocumentumDataSource(); dds.setservername("domain"); dds.setdatabasename("docbase"); dds.setuser("username"); dds.setpassword("password"); Then, register the data source instance with JNDI. The following example registers the data source instance with the WebSphere Application Server, which is providing the JNDI services: Context ctx = null; // Get JNDI services provider's environment. 32 Content Services for JDBC Driver User Guide

33 Using Data Sources, JNDI, and Connection Pooling Hashtable env = new Hashtable(); env.put(context.initial_context_factory, "websphere.jndi.wlinitialcontextfactory"); env.put(context.provider_url, "t3://localhost:7001"); // Bind Data Source with WebSphere Server. ctx = new InitialContext(env); ctx.bind("jdbc/documentum/oca", dds); At any point in your application following the ctx.bind() call, you can use the logical name jdbc/documentum/oca to open a connection to the Docbase described by the properties of the DocumentumDataSource instance dds. Last, use the logical name jdbc/documentum/oca to perform a lookup and open a connection to the Docbase: Connection conn = null; DocumentumDataSource dds = (DocumentumDataSource)ctx.lookup("jdbc/documentum/oca"); conn = dds.getconnection(); Logging and tracing with a data source When you create a data source instance, logging and tracing capabilities are disabled by default. You enable logging and tracing in an application by registering a character stream that JDBC uses to output logging and tracing information. A character stream records logging and tracing information for a specific data source instance. If you have multiple data source instances, you must register the character stream with each data source instance. The DriverManager class maintains its own character stream for logging and tracing information. Logging and tracing information written to a log stream registered to a data source instance is not written to the DriverManager class s character stream. The DocumentumDataSource class uses the following standard data source methods for logging and tracing: public synchronized void setlogwriter(printwriter pw) public synchronized PrintWriter getlogwriter() When you obtain a DocumentumDataSource instance from a JNDI name lookup, the DocumentumDataSource s PrintWriter is not set, even if PrintWriter was set when a data source instance was first bound to the JNDI name. Content Services for JDBC Driver User Guide 33

34 Using Data Sources, JNDI, and Connection Pooling Connection pooling Use connection pooling to create a pool of reusable database connections for your applications. Connection pooling services are provided by the application server you use. JDBC Services provides support for the connection pooling features of your application server. You can use connection pooling with or without JNDI. The pool grows dynamically based on the number of required connections. JDBC Services can automatically refresh configurations that are stale because of database errors. JDBC Services can be configured to automatically close connections that have been idle for too long. JDBC Services logs a stack trace of where idle connections were opened. JDBC Services blocks threads until a pooled connection is available. You can implement JDBC Services by changing the driver class and URL of a non-connection pooling JDBC driver. JDBC Services can be used in connection pooling with different application servers. Connection pooling is configured differently by each specific application server. Refer to Using Content Services for JDBC Driver with the WebSphere application server, page 45 for information on connection pooling with the IBM WebSphere Application Server. Loading JDBC Services JDBC Services automatically registers itself with the JDBC DriverManager class when DriverManager loads the JDBCConnectionPoolDriver class. The connection pool driver keeps a list of pools as a static variable, so you may want to do one of the following: You can keep a reference to an instance of the JdbcConnectionPoolDriver class where the garbage collector won t reclaim it. You can run Java with the -noclassgc flag. Use the following code to load the driver: Class.forName("com.Documentum.jdbc.pool.JdbcConnectionPoolDriver"); Import the correct classes: import com.documentum.oca.jdbc.pool.*; import com.documentum.oca.servlet.*; 34 Content Services for JDBC Driver User Guide

35 Using Data Sources, JNDI, and Connection Pooling Creating the connection pool When you create a new connection pool, you must name it and assign a number of initialization parameters. Once you create the pool, it is automatically registered with the pool driver, and you can start opening connections with it immediately. For example: // Initialization parameters are kept in a hash table. Hashtable args = new Hashtable(); // Call the underlying driver -- in this case, the Docbase driver. args.put("jdbc.driver", "com.documentum.oca.jdbc.jdbc20.djdbcdriver"); // The URL to connect the underlyng driver with the server. args.put("jdbc.url", "jdbc:documentum:oca:docbase"); // These are properties that get passed to DriverManager.getConnection(...). Properties jdbcproperties = new Properties(); jdbcproperties.put("username", "user_name"); jdbcproperties.put("password", "User_password"); jdbcproperties.put("database", "Docbase_name"); args.put("jdbc.properties", jdbcproperties); // The initial size of the pool. args.put("pool.initialsize", new Integer(initial_size)); // The maximum size to which the pool. args.put("pool.maxsize", new Integer(maximum_size)); // Each time the pool grows, it grows by the number of connections indicated. args.put("pool.growblock", new Integer(pool_growth)); // Wait time between connections, in milliseconds. args.put("pool.createwaittime", new Integer(creation_interval)); // Create the pool. JdbcConnectionPool dctmpool = new JdbcConnectionPool("dctmPool", args); Specify the parameters initial_size, maximum_size, and so on in the dmjdbcpool.properties file. Using the dmjdbcpool.properties le The dmjdbcpool.properties file contains parameters to be set for using connection pooling with JDBC Services. The file shipped in the tar file contains the necessaries entries. Specify the pooling-related properties in this properties file. Obtaining a connection from the pool After you create a connection pool, your applications must obtain a connection from the pool. For example, if your connection pool is called MyConnectionPool: String url = "jdbc:documentum:oca:pool"; Connection c = DriverManager.getConnection(jdbc:documentum:oca:pool:MyConnectionPool); Content Services for JDBC Driver User Guide 35

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Oracle Database 10g Java Web

Oracle Database 10g Java Web Oracle Database 10g Java Web 2005 5 Oracle Database 10g Java Web... 3... 3... 4... 4... 4 JDBC... 5... 5... 5 JDBC... 6 JDBC... 8 JDBC... 9 JDBC... 10 Java... 11... 12... 12... 13 Oracle Database EJB RMI/IIOP...

More information

Database Programming. Week 9. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford

Database Programming. Week 9. *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford Database Programming Week 9 *Some of the slides in this lecture are created by Prof. Ian Horrocks from University of Oxford SQL in Real Programs We have seen only how SQL is used at the generic query interface

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

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

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

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

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

file:///home/jagadish/downloads/dtd-changes-connection-pool...

file:///home/jagadish/downloads/dtd-changes-connection-pool... file:///home/jagadish/downloads/... 1 of 10 11/08/2011 10:24 AM Date Version Author Remarks Oct-13-2006 1 Jagadish Ramu/Kshitiz Saxena Created Dec-10-2006 1.01 Jagadish Ramu Changed default values for

More information

More Database Programming. CS157A Chris Pollett Nov. 2, 2005.

More Database Programming. CS157A Chris Pollett Nov. 2, 2005. More Database Programming CS157A Chris Pollett Nov. 2, 2005. Outline JDBC SQLJ Introduction Last day we went over some JDBC and SQLJ code examples from prior classes. Today, we will discuss JDBC and SQLJ

More information

access to a JCA connection in WebSphere Application Server

access to a JCA connection in WebSphere Application Server Understanding connection transitions: Avoiding multithreaded access to a JCA connection in WebSphere Application Server Anoop Ramachandra (anramach@in.ibm.com) Senior Staff Software Engineer IBM 09 May

More information

Lecture 9&10 JDBC. Mechanism. Some Warnings. Notes. Style. Introductory Databases SSC Introduction to DataBases 1.

Lecture 9&10 JDBC. Mechanism. Some Warnings. Notes. Style. Introductory Databases SSC Introduction to DataBases 1. Lecture 9&10 JDBC Java and SQL Basics Data Manipulation How to do it patterns etc. Transactions Summary JDBC provides A mechanism for to database systems An API for: Managing this Sending s to the DB Receiving

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

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

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

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

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

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

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

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

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

Chapter 5: Advanced SQL" Chapter 5: Advanced SQL"

Chapter 5: Advanced SQL Chapter 5: Advanced SQL Chapter 5: Advanced SQL" Database System Concepts, 6 th Ed.! Silberschatz, Korth and Sudarshan See www.db-book.com for conditions on re-use " Chapter 5: Advanced SQL" Accessing SQL From a Programming Language!

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

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

CSE 135. Three-Tier Architecture. Applications Utilizing Databases. Browser. App. Server. Database. Server

CSE 135. Three-Tier Architecture. Applications Utilizing Databases. Browser. App. Server. Database. Server CSE 135 Applications Utilizing Databases Three-Tier Architecture Located @ Any PC HTTP Requests Browser HTML Located @ Server 2 App Server JDBC Requests JSPs Tuples Located @ Server 1 Database Server 2

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

SMS Service. Type Source Remarks Common? Service interface for the SMS Service. egovframework.com.cop.sms.service.egovsmsinfoservice.

SMS Service. Type Source Remarks Common? Service interface for the SMS Service. egovframework.com.cop.sms.service.egovsmsinfoservice. SMS Service Summary The SMS Service provides the interface for using the M-Gov s SMS service, and you can access it by request. This service layer provides easier access and usability to the SMS feature

More information

How to program applications. CS 2550 / Spring 2006 Principles of Database Systems. SQL is not enough. Roadmap

How to program applications. CS 2550 / Spring 2006 Principles of Database Systems. SQL is not enough. Roadmap How to program applications CS 2550 / Spring 2006 Principles of Database Systems 05 SQL Programming Using existing languages: Embed SQL into Host language ESQL, SQLJ Use a library of functions Design a

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

Servlet 5.1 JDBC 5.2 JDBC

Servlet 5.1 JDBC 5.2 JDBC 5 Servlet Java 5.1 JDBC JDBC Java DataBase Connectivity Java API JDBC Java Oracle, PostgreSQL, MySQL Java JDBC Servlet OpenOffice.org ver. 2.0 HSQLDB HSQLDB 100% Java HSQLDB SQL 5.2 JDBC Java 1. JDBC 2.

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

CHAPTER 44. Java Stored Procedures

CHAPTER 44. Java Stored Procedures CHAPTER 44 Java Stored Procedures 752 Oracle Database 12c: The Complete Reference You can write stored procedures, triggers, object type methods, and functions that call Java classes. In this chapter,

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

Java Technologies Resources and JNDI

Java Technologies Resources and JNDI Java Technologies Resources and JNDI The Context How to access all these resources in a similar manner? A resource is a program object that provides connections to other systems such as: database servers,

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

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

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

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

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

Enterprise JavaBeans. Layer:08. Persistence

Enterprise JavaBeans. Layer:08. Persistence Enterprise JavaBeans Layer:08 Persistence Agenda Discuss "finder" methods. Describe DataSource resources. Describe bean-managed persistence. Describe container-managed persistence. Last Revised: 11/1/2001

More information

DB Programming. Database Systems

DB Programming. Database Systems DB Programming Database Systems 1 Agenda MySQL data types Altering the Schema More Advanced MySQL JDBC DB Coding Tips 2 MySQL Data Types There are 3 main groups of types: Numeric Date String http://dev.mysql.com/doc/refman/5.6/en/data-types.html

More information

Topic 12: Database Programming using JDBC. Database & DBMS SQL JDBC

Topic 12: Database Programming using JDBC. Database & DBMS SQL JDBC Topic 12: Database Programming using JDBC Database & DBMS SQL JDBC Database A database is an integrated collection of logically related records or files consolidated into a common pool that provides data

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

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

Web Applications and Database Connectivity using JDBC (Part II)

Web Applications and Database Connectivity using JDBC (Part II) Web Applications and Database Connectivity using JDBC (Part II) Advanced Topics in Java Khalid Azim Mughal khalid@ii.uib.no http://www.ii.uib.no/~khalid/atij/ Version date: 2007-02-08 ATIJ Web Applications

More information

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI BEAWebLogic Server and WebLogic Express Programming WebLogic JNDI Version 10.0 Document Revised: March 30, 2007 Contents 1. Introduction and Roadmap Document Scope and Audience.............................................

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

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer About the Tutorial JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database. JDBC works with Java on a variety of platforms, such as Windows, Mac

More information

Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge

Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge 175 Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge numbers of records without the risk of corruption

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

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

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

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

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

JDBC Guide. RDM Server 8.2

JDBC Guide. RDM Server 8.2 RDM Server 8.2 JDBC Guide 1 Trademarks Raima Database Manager ("RDM"), RDM Embedded, RDM Server, RDM Mobile, XML, db_query, db_revise and Velocis are trademarks of Birdstep Technology and may be registered

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

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

IBM WebSphere Application Server V4.0. Performance. 10/02/01 Copyright 2001 IBM Corporation WS40ST11.prz Page 248 of of 28

IBM WebSphere Application Server V4.0. Performance. 10/02/01 Copyright 2001 IBM Corporation WS40ST11.prz Page 248 of of 28 IBM WebSphere Application Server V4.0 Performance Page 248 of 401 1 of 28 Performance Enhancements to WebSphere V4.0 Performance Enhancement Overview Dynamic Caching of Servlets/JSPs Performance Monitoring

More information

DB Programming. Database Systems, Presented by Rubi Boim

DB Programming. Database Systems, Presented by Rubi Boim DB Programming Database Systems, 2008-2009 Presented by Rubi Boim 1 Agenda Project Details Basic Oracle Usage Little More Complex Oracle stuff.. JDBC Coding Tips 2 Database project TV/Movies DB Examples:

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

Using IBM-Informix datatypes with IDS 10 and web application server Keshava Murthy, IBM Informix Development

Using IBM-Informix datatypes with IDS 10 and web application server Keshava Murthy, IBM Informix Development IBM GLOBAL SERVICES Using IBM-Informix datatypes with IDS 10 and web application server Keshava Murthy, IBM Informix Development Sept. 12-16, 2005 Orlando, FL 1 Agenda JDBC Datatypes IDS 10 Datatypes Java

More information

SQL in a Server Environment

SQL in a Server Environment SQL in a Server Environment Vaidė Narváez Computer Information Systems January 13th, 2011 The Three-Tier Architecture Application logic components Copyright c 2009 Pearson Education, Inc. Publishing as

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 Programming Course Overview. Duration: 35 hours. Price: $900

Java Programming Course Overview. Duration: 35 hours. Price: $900 978.256.9077 admissions@brightstarinstitute.com Java Programming Duration: 35 hours Price: $900 Prerequisites: Basic programming skills in a structured language. Knowledge and experience with Object- Oriented

More information

Using the Transaction Service

Using the Transaction Service 15 CHAPTER 15 Using the Transaction Service The Java EE platform provides several abstractions that simplify development of dependable transaction processing for applications. This chapter discusses Java

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

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

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

Connect JDBC TM. User s Guide and Reference

Connect JDBC TM. User s Guide and Reference Connect JDBC TM User s Guide and Reference March 2002 2002 DataDirect Technologies. All rights reserved. Printed in the U.S.A. DataDirect, DataDirect Connect, and SequeLink are registered trademarks, and

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

Best Practices for Boosting Java Application Performance and Availability on IBM DB2

Best Practices for Boosting Java Application Performance and Availability on IBM DB2 Best Practices for Boosting Java Application Performance and Availability on IBM DB2 Pallavi Priyadarshini Architect, JCC DB2 Connect, IBM pallavipr@in.ibm.com Agenda DB2 JDBC driver architecture and ecosystem

More information

Acknowledgments About the Authors

Acknowledgments About the Authors Acknowledgments p. xi About the Authors p. xiii Introduction p. xv An Overview of MySQL p. 1 Why Use an RDBMS? p. 2 Multiuser Access p. 2 Storage Transparency p. 2 Transactions p. 3 Searching, Modifying,

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

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

Table of Contents. Introduction... xxi

Table of Contents. Introduction... xxi Introduction... xxi Chapter 1: Getting Started with Web Applications in Java... 1 Introduction to Web Applications... 2 Benefits of Web Applications... 5 Technologies used in Web Applications... 5 Describing

More information

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1

Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introduction... xv SECTION 1: DEVELOPING DESKTOP APPLICATIONS USING JAVA Chapter 1: Getting Started with Java... 1 Introducing Object Oriented Programming... 2 Explaining OOP concepts... 2 Objects...3

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

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

JDBC drivers are divided into four types or levels. The different types of jdbc drivers are: 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

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

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

Oracle Universal Connection Pool Developer's Guide. 12c Release 2 (12.2)

Oracle Universal Connection Pool Developer's Guide. 12c Release 2 (12.2) Oracle Universal Connection Pool Developer's Guide 12c Release 2 (12.2) E85765-01 June 2017 Oracle Universal Connection Pool Developer's Guide, 12c Release 2 (12.2) E85765-01 Copyright 1999, 2017, Oracle

More information

EMC Documentum Composer

EMC Documentum Composer EMC Documentum Composer Version 6 SP1 User Guide P/N 300 005 253 A01 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com Copyright 2008 EMC Corporation. All rights

More information

EMC Documentum Composer

EMC Documentum Composer EMC Documentum Composer Version 6.0 SP1.5 User Guide P/N 300 005 253 A02 EMC Corporation Corporate Headquarters: Hopkinton, MA 01748 9103 1 508 435 1000 www.emc.com Copyright 2008 EMC Corporation. All

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

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