Sunday 11 December 2016

Syllabus

Overview
 Three Tiers For J2ee
 Three Tiers For J2se
 The Case Study
 Design Patterns
 Domain And Service Models
Database And SQL Fundamentals
 Relational Databases And SQL
 Database, Schema, Tables, Columns And Rows
 DDL-Creating And Managing Database Objects
 DML-Retrieving And Managing Data
 Sequences , Stored Procedures
 Using SQL Terminals
JDBC Fundamentals
 Making A Connection
 Creating And Executing A Statement
Resultsetmetadata
Properties Class
SQL And Java Datatypes
Creating And Updating Tables
Handling SQL Exceptions And Proper Cleanup
Handling SQL Warning
Advanced JDBC
 SQL Escape Syntax
 Conditional (If) Statements
 Using Prepared Statements
 Using Callable Statements
 Scrollable Result Sets
 Updatable Result Sets
 Transactions , Commits, Rollbacks, And         Savepoints
 Batch Processing
Reading Data From The Excel Sheet Ppt

Blob:
Joining
Database Metadata
Introduction To Row Sets
 Row Sets In Gui And J2ee Programming
 Advantages Of Rowsets , Rowset Specializations
 Use Of Cachedrowsets

JDBC Classes And The Java.Sql
 Drivermanager And Datasource Connection
 Statement,
Preparedstatement,
Callablestatement
 Resultset
 Javax.Sql Package
 Rowsets


Connecting To Databases
 Selecting And Installing A Database Driver
 Connecting To The Database Via A Network          Address
 Connecting To The Database Based On        Information Supplied By Jndi           (The Java        Naming And Directory Interface)
 Using The Java.Sql.Datasource Class
 Increasing Performance With Connection         Pooling

 Opening And Closing The Connection
 Handling Classnotfoundexception And         SQLexception

JDBC Design Patterns
 Overview Of Client Tier, Presentation Tier,         Business Tier, And             Resource Tier Patterns
 The Data Access Object Pattern
 The Value Object Pattern

 The Model-View-Controller Pattern






Friday 3 June 2016

Write a java program to insert a record in dept database by accepting the data from keyboard at runtime using dynamic queries?

Write a java program to insert a record in dept database by accepting the data from keyboard at runtime using dynamic queries?
import java.sql.*;
import java.io.*;
class InsertRecRun {
 public static void main(String[] args) {
   try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    System.out.println("DRIVERS LOADED...");
    Connection con =
    DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:
     BudDinu "," scott "," tiger ");
     System.out.println("CONNECTION OBTAINED...");
     PreparedStatement ps = con.prepareStatement("insert into dept values    
    (?,?,?)");
     DataInputStream dis = new DataInputStream(System.in);
     System.out.println("ENTER DEPARTMENT NUMBER : ");
     String s1 = dis.readLine();
     int dno = Integer.parseInt(s1);
     System.out.println("ENTER DEPARTMENT NAME : ");
     String dname = dis.readLine();
     System.out.println("ENTER LOCATION NAME : ");
     String loc = dis.readLine(); ps.setInt(1, dno);
     ps.setString(2, dname);
     ps.setString(3, loc);
     int i = ps.executeUpdate();
     System.out.println(i + "ROW(s) INSERTED...");
     con.close();
    } catch (Exception e) {
     e.printStackTrace();
    }
   } // main
  } // InsertRecRun