JDBC Tutorials

11. Using the DriverManager Class vs Using a DataSource Object for a connection

By: Reema Sen : 2007-10-12

Description: The DriverManager class works with the Driver interface to manage the set of drivers available to a JDBC client. When the client requests a connection and provides a URL, the DriverManager is responsible for finding a driver that recognizes the URL and for using it to connect to the corresponding data source. Connection URLs have the following form:

12. Getting Started with JDBC

By: Priya Mani : 2007-10-12

Description: This tutorial helps you to set up a JDBCâ„¢ development environment. This includes the following steps:

13. Stored Procedures example in SQL

By: Norman Chap : 2007-10-12

Description: A stored procedure is a group of SQL statements that can be called by name. In other words, it is executable code, a mini-program, that performs a particular task that can be invoked the same way one can call a function or method. Traditionally, stored procedures have been written in a DBMS-specific programming language. The latest generation of database products allows stored procedures to be written using the Java programming language and the JDBC API. Stored procedures written in the Java programming language are bytecode portable between DBMSs. Once a stored procedure is written, it can be used and reused because a DBMS that supports stored procedures will, as its name implies, store it in the database.

14. Result Sets, Cursors and Transactions in SQL

By: Manoj Kumar : 2007-10-12

Description: When one user is accessing data in a database, another user may be accessing the same data at the same time. If, for instance, the first user is updating some columns in a table at the same time the second user is selecting columns from that same table, it is possible for the second user to get partly old data and partly updated data. For this reason, DBMSs use transactions to maintain data in a consistent state (data consistency) while allowing more than one user to access a database at the same time (data concurrency).

15. Common SQL Commands

By: Lakshmi : 2007-10-12

Description: SQL commands are divided into categories, the two main ones being Data Manipulation Language (DML) commands and Data Definition Language (DDL) commands. DML commands deal with data, either retrieving it or modifying it to keep it up-to-date. DDL commands create or change tables and other database objects such as views and indexes.

16. Joins example in SQL

By: Kamini : 2007-10-12

Description: A distinguishing feature of relational databases is that it is possible to get data from more than one table in what is called a join. Suppose that after retrieving the names of employees who have company cars, one wanted to find out who has which car, including the make, model, and year of car. This information is stored in another table, Cars, shown in Table below.

17. SELECT Statements

By: Ivan Lim : 2007-10-12

Description: A SELECT statement, also called a query, is used to get information from a table. It specifies one or more column headings, one or more tables from which to select, and some criteria for selection. The RDBMS returns rows of the column entries that satisfy the stated requirements. A SELECT statement such as the following will fetch the first and last names of employees who have company cars:

18. JDBC Basics and JDBC Components

By: Henry : 2007-10-12

Description: This short code fragment instantiates a DriverManager object to connect to a database driver and log into the database, instantiates a Statement object that carries your SQL language query to the database; instantiates a ResultSet object that retrieves the results of your query, and executes a simple while loop, which retrieves and displays those results. It's that simple.

19. Creating Database Connection Pool in Tomcat 5.0 and Tomcat 5.5 for MySQL and Java

By: Emiley J : 2007-10-12

Description: This tutorial gives you a close look at Jakarta Commons Database Connection Pool (DBCP) in Tomcat 5.0 and Tomcat 5.5. DBCP is the database connection pooling technology built into the popular open-source Tomcat servlet engine. Because it’s included with Tomcat, you don’t need to download or install any files or libraries.

20. JDBC and Tomcat context settings

By: Norman Chap : 2007-10-07

Description: JDBC is a standard part of Java and provides a uniform API that can be used to access any relational database. The low-level JDBC API is the foundation for the other database access technologies discussed in this chapter, but many programmers use the JDBC API directly. If your application has fairly limited database access needs, JDBC might be all you need. The advantages of JDBC are simplicity and flexibility. There are only about 25 classes and interfaces in JDBC, and for the most part, to use them you need to know only the basics of SQL. It’s simple. You execute queries and updates written in standard SQL, and each query returns a ResultSet object containing the resulting rows and columns of data. The JDBC API is simple, but it still provides the flexibility to do just about anything you’ll need to do with a database.