Statement, Prepared Statement and Callable Statement Are Interfaces Which Providw The Way To Interact With The Databases (Mysql

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

1) Difference between Statement, Prepared Statement And Callable

Statement .
2) Reading a CSV , Text File and Uploading Data to the Database ..
3) Inserting the Image file in to the database .
4) Batch update ..?
Statement, Prepared Statement And Callable Statement are
interfaces which providw the way to interact with the databases (MySQL ,
Oracle , PostGre , MSSQL Server .) And Its having the predefined set of
methods to use .

Statement :- Used to trigger the Static queries (Select * from Employee) ,


Statement does not access any parameters .
Prepared Statement:- Prepared Stament extends Statement Interface and
it provides extra Usefull mechanism when triggering the SAME SQL
statements , Prepared Statement Interface accepts inputs parameters , at
Runtime . Prepared Statement are precompiled hence there execution are
faster .
More Powerfull/funcality and fatser .And Takes parameters at Run time ,
Precompiled
Callable Statement :- Its extending the PreparedStatement used to
execute Stored Procedures which are already compiled in the database .

Type of Tables
========================
Master Table :- Where you manage only one entry for a record
MS_EMPLOYEE
Transaction Table :- Multiple transaction
TX_INVOICE
Mapping Table :- Mapping EMp_Manager / EMP _DEPT
MP_
Where its not 1-1 relationship ..
1- N
N-N

1)

dymanic query Example , Prepared Stament as a Dynamic (RUN TIME) , STATIC(COMPILE TIME)

2)

Difference between Clob And Blob

3) can we insert a binary file as a clob?


4) what is the lengtn limit for the blob?
5)

How to Read/Display ..While discussing the Jsp /Servelt

6)

Batch update ..? what if we have 2 sql statement in proc

7) Driver type jdbc..


8)

Sumedha pendig java qn..

9) User privilege
10) Java Security
11) Transaction

Servlet _

Day -4 7th Oct

Batch Update ..
addBatch(); - Adding the querty to single statmentnt Object
executeBatch(); - Executing the group query
clearBatch(); Clearing the groub query .

CLOB And BLOB


BLOB -Stores Binary Large Object - Large Stream of data ,
or Image
CLOB Character Large Objects , Massive String .

JDBC Driver Types:


Type 1: JDBC- ODBC Bridge Driver (Bridge)

Type 2: Native API / Not Fully Java Driver (Native)

Type 3: AllJava/Net Protocol Driver (Middleware)

Type4 : All Java / Native Protocol Driver (Pure)

1 Completely written in java .


Platform independence , Portable ,
Prefference of Driveres :While accessing the MySQL , Oracle IBM DB2 the prefferd
driver is TYPE-4
If your application accessing multiple database same time ,
TYPE -3 is preffered
TYPE: 2 Driveres are usefull when ever a type 3 or type -4
driver is not available for the databased used .
TYPE -1 :- Testing and development purpose use only .
Not Protable ,
Performance Issue
Servlet , JSP , Java Script , AJAX , CSS 1- weeks
Project 1:- Project 1 Using Java JDBC and My SQL Server /Oracle 10G , Servlet

Project s

Project 2:- Project 1 Using Java JDBC and My SQL Server /Oracle 10G , Servlet , JSP

Spring 3.X
Hibernate .3

You might also like