Here the sample program which will demonstrate creating a table in Oracle. Note, table will be dropped at the end of the program. Just observe the program now and I'll explain the program in details

TableCreationDemo.java
/**
* A demo class to explain database table creation
* @author Santhosh Reddy Mandadi
* @since 08-Jun-2012
* @version 1.0
*/

import java.sql.*;

public class TableCreationDemo
{
public static void main(String[] args) throws Exception
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection connection = DriverManager.getConnection("jdbc:oracle:@localhost:1521:xe","scott","tiger");
String vsql1, vsql2;
vsql1 = "CREATE TABLE PRODUCTS(PID NUMBER, PNAME VARCHAR(20), PRICE NUMBER(10,2)";
vsql2 = "DROP TABLE PRODUCTS";
Statement statement = connection.createStatement();
statement.executeUpdate(vsql1);
System.out.println("PRODUCTS table has been created. Please check the table in DB...");
System.in.read();System.in.read();
statement.executeUpdate(vsql2);
System.out.println("PRODUCTS table has been dropped...");
}
}

Explanation:

Connection connection = DriverManager.getConnection("jdbc:oracle:@localhost:1521:xe","scott","tiger");
When this statement is executed, JDBC driver code establishes the connection with the server and creates a connection object.


Statement statement = connection.createStatement();
When this statement is executed, JDBC driver code creates the statement object.


statement.executeUpdate(vsql1);
When executeUpdate() method is called the JDBC driver code sends create table statement the database server. The database server parses the SQL statement and executes the statement. So, table will be created in DB server.


statement.executeUpdate(vsql2);
When this statement executed, table will be dropped in the DB server.

As explained, this program is operating on the DB server. So, it is called as database client.